Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDBC connector: TDengine Error: failed to connect to server #489

Closed
derchLee opened this issue Sep 10, 2019 · 7 comments
Closed

JDBC connector: TDengine Error: failed to connect to server #489

derchLee opened this issue Sep 10, 2019 · 7 comments
Assignees
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@derchLee
Copy link

General Questions
在cetnos上安装client,执行jdbc连接,提示TDengine Error: failed to connect to server
Before you ask a question, please:

  1. 在第一台centos上安装TDengine,源码执行./install.sh
  2. 在另一台相通网络的centos安装client,源码执行./install_client
    3.两台服务器的防火墙全部关闭的
    4.在安装client的服务器上用jdbc连接TDengine提示TDengine Error: failed to connect to server
    image
    同样的程序在第一台上执行就没问题。
    If all the ways above couldn't help, please clearly and concisely describe what the question is.
@derchLee derchLee added help wanted Extra attention is needed question Further information is requested labels Sep 10, 2019
@fangpanpan fangpanpan changed the title 在cetnos上安装client,执行jdbc连接,提示TDengine Error: failed to connect to server JDBC connector: TDengine Error: failed to connect to server Sep 10, 2019
@guanshengliang
Copy link
Contributor

When you find a problem, first open the log, add a line in /etc/taos/taos.cfg,
debugFlag 135
After clearing the log file in /var/log/taos and restarting the program, send the log to us.

@guanshengliang
Copy link
Contributor

From the error message, there is no IP address of 172.24.4.52 on the client.

@guanshengliang guanshengliang self-assigned this Sep 11, 2019
@derchLee
Copy link
Author

Sorry for the unclear meaasge.
添加debug信息,清理日志后重新操作了一下,以下是client端的日志信息。

            new log file                      

==================================================
09/10 21:45:10.638033 7facb67f1700 ERROR UTL can't get card name from ip:172.24.4.52
09/10 21:45:10.638224 7facb67f1700 UTL timezone not configured, set to system default: (EDT, -0400)
09/10 21:45:10.638285 7facb67f1700 UTL taos config & system info:
09/10 21:45:10.638294 7facb67f1700 UTL ==================================
09/10 21:45:10.638297 7facb67f1700 UTL serverIp: 0.0.0.0
09/10 21:45:10.638299 7facb67f1700 UTL localIp: 172.24.4.53
09/10 21:45:10.638302 7facb67f1700 UTL mgmtShellPort: 6030
09/10 21:45:10.638303 7facb67f1700 UTL vnodeShellPort: 6035
09/10 21:45:10.638306 7facb67f1700 UTL configDir: /etc/taos
09/10 21:45:10.638308 7facb67f1700 UTL logDir: /var/log/taos
09/10 21:45:10.638309 7facb67f1700 UTL numOfThreadsPerCore: 0.000000
09/10 21:45:10.638338 7facb67f1700 UTL rpcTimer: 300(ms)
09/10 21:45:10.638341 7facb67f1700 UTL rpcMaxTime: 600(s)
09/10 21:45:10.638344 7facb67f1700 UTL shellActivityTimer: 3(s)
09/10 21:45:10.638346 7facb67f1700 UTL meterMetaKeepTimer: 7200(s)
09/10 21:45:10.638348 7facb67f1700 UTL metricMetaKeepTimer: 600(s)
09/10 21:45:10.638350 7facb67f1700 UTL defaultDB:
09/10 21:45:10.638351 7facb67f1700 UTL defaultUser: root
09/10 21:45:10.638353 7facb67f1700 UTL timezone: (EDT, -0400)
09/10 21:45:10.638355 7facb67f1700 UTL locale: en_US.UTF-8
09/10 21:45:10.638357 7facb67f1700 UTL charset: UTF-8
09/10 21:45:10.638359 7facb67f1700 UTL numOfLogLines: 10000000
09/10 21:45:10.638361 7facb67f1700 UTL asyncLog: 1
09/10 21:45:10.638363 7facb67f1700 UTL debugFlag: 135
09/10 21:45:10.638365 7facb67f1700 UTL taosDebugFlag: 135
09/10 21:45:10.638367 7facb67f1700 UTL tmrDebugFlag: 131
09/10 21:45:10.638369 7facb67f1700 UTL cDebugFlag: 135
09/10 21:45:10.638370 7facb67f1700 UTL jniDebugFlag: 135
09/10 21:45:10.638372 7facb67f1700 UTL odbcDebugFlag: 135
09/10 21:45:10.638374 7facb67f1700 UTL uDebugFlag: 135
09/10 21:45:10.638376 7facb67f1700 UTL qDebugFlag: 131
09/10 21:45:10.638378 7facb67f1700 UTL gitinfo: b99bb7a
09/10 21:45:10.638381 7facb67f1700 UTL buildinfo: Built by root at 2019-08-22 17:35
09/10 21:45:10.638384 7facb67f1700 UTL version: 1.6.1.7
09/10 21:45:10.638385 7facb67f1700 UTL dataDir: /var/lib/taos
09/10 21:45:10.638388 7facb67f1700 UTL os pageSize: 4096(KB)
09/10 21:45:10.638390 7facb67f1700 UTL os openMax: 4096
09/10 21:45:10.638391 7facb67f1700 UTL os streamMax: 16
09/10 21:45:10.638393 7facb67f1700 UTL os numOfCores: 4
09/10 21:45:10.638394 7facb67f1700 UTL os totalDisk: 91(GB)
09/10 21:45:10.638396 7facb67f1700 UTL os totalMemory: 7821(MB)
09/10 21:45:10.638400 7facb67f1700 UTL os sysname: Linux
09/10 21:45:10.638402 7facb67f1700 UTL os nodename: localhost.localdomain
09/10 21:45:10.638403 7facb67f1700 UTL os release: 3.10.0-957.el7.x86_64
09/10 21:45:10.638405 7facb67f1700 UTL os version: #1 SMP Thu Nov 8 23:39:32 UTC 2018
09/10 21:45:10.638407 7facb67f1700 UTL os machine: x86_64
09/10 21:45:10.638408 7facb67f1700 UTL ==================================
09/10 21:45:10.638410 7facb67f1700 TSC starting to initialize TAOS client ...
09/10 21:45:10.638411 7facb67f1700 TSC Local IP address is:172.24.4.53
09/10 21:45:10.647764 7facb67f1700 UTL tsc scheduler is initialized, numOfThreads:2
09/10 21:45:10.648043 7facb67f1700 UTL pool:0x7fac8801ffd0 is setup, maxId:512
09/10 21:45:10.650433 7facb67f1700 UTL tmr scheduler is initialized, numOfThreads:1
09/10 21:45:10.650484 7facb67f1700 UTL open udp socket:172.24.4.53:0
09/10 21:45:10.650609 7facb67f1700 UTL open udp socket:172.24.4.53:0
09/10 21:45:10.650639 7faca12d4700 RPC TSC-vnode UDP thread is created, index:0
09/10 21:45:10.650680 7facb67f1700 RPC TSC-vnode UDP connection is initialized, ip:172.24.4.53 port:0 threads:2
09/10 21:45:10.650696 7facb67f1700 RPC TSC-vnode RPC is openned, numOfThreads:2
09/10 21:45:10.650720 7faca0ad3700 RPC TSC-vnode UDP thread is created, index:1
09/10 21:45:10.657280 7facb67f1700 UTL pool:0x7fac8804ba10 is setup, maxId:5000
09/10 21:45:10.670117 7facb67f1700 UTL pool:0x7fac88064e40 is setup, maxId:5000
09/10 21:45:10.677445 7facb67f1700 UTL open udp socket:172.24.4.53:0
09/10 21:45:10.678473 7facb67f1700 RPC TSC-mgmt UDP connection is initialized, ip:172.24.4.53 port:0 threads:1
09/10 21:45:10.678547 7fac83fff700 RPC TSC-mgmt UDP thread is created, index:0
09/10 21:45:10.679408 7facb67f1700 UTL pool:0x7fac88096be0 is setup, maxId:2000
09/10 21:45:10.679627 7facb67f1700 RPC TSC-mgmt RPC is openned, numOfThreads:1
09/10 21:45:10.680099 7facb67f1700 TSC taos client is initialized successfully
09/10 21:45:10.680139 7facb67f1700 TSC 0x7fac880ddb20 SQL cmd:28 will be processed, name:
09/10 21:45:10.680169 7facb67f1700 RPC TSC-mgmt cid:0 sid:1, ID allocated, used:1, old id:0
09/10 21:45:10.680181 7facb67f1700 RPC TSC-mgmt cid:0 sid:1 id:root, TAOS connection is allocated, localPort:0 pConn:0x7faca01530f0
09/10 21:45:10.680189 7facb67f1700 RPC TSC-mgmt UDP connection is setup, ip: 172.24.4.52:6030, local: 172.24.4.53:4050
09/10 21:45:10.680194 7facb67f1700 RPC TSC-mgmt cid:0 sid:1 id:root, nw connection is set up, ip:172.24.4.52:6030 localPort:0 pConn:0x7faca01530f0
09/10 21:45:10.680199 7facb67f1700 TSC 0x7fac880ddb20 msg:connect is sent to server
09/10 21:45:10.680228 7facb67f1700 RPC TSC-mgmt cid:0 sid:1 id:root, connect is sent to 172.24.4.52:6030, len:185 tranId:64814 pConn:0x7faca01530f0
09/10 21:45:10.680313 7facb67f1700 RPC TSC-mgmt msg is sent to 0x340418ac:6030 len:185 ret:185 localPort:53775 chandle:0x8807e3c8
09/10 21:45:10.680322 7facb67f1700 RPC TSC-mgmt msg sent, len:185 source:0x01000000 dest:0x00000000 tranId:64814 pConn:0x7faca01530f0
09/10 21:45:10.680327 7facb67f1700 TSC 0x7fac880ddb20 send msg ret:117 code:0 sig:0x7fac880ddb20
09/10 21:45:11.029946 7faca1ad5700 RPC TSC-mgmt cid:0 sid:1 id:root, expected connect-rsp is not received, pConn:0x7faca01530f0
09/10 21:45:11.029980 7faca1ad5700 RPC TSC-mgmt cid:0 sid:1 id:root, re-send msg:connect to 172.24.4.52:6030 pConn:0x7faca01530f0
09/10 21:45:11.030058 7faca1ad5700 RPC TSC-mgmt msg is sent to 0x340418ac:6030 len:185 ret:185 localPort:53775 chandle:0x8807e3c8
09/10 21:45:11.379962 7faca1ad5700 RPC TSC-mgmt cid:0 sid:1 id:root, expected connect-rsp is not received, pConn:0x7faca01530f0
09/10 21:45:11.379988 7faca1ad5700 RPC TSC-mgmt cid:0 sid:1 id:root, re-send msg:connect to 172.24.4.52:6030 pConn:0x7faca01530f0
09/10 21:45:11.380066 7faca1ad5700 RPC TSC-mgmt msg is sent to 0x340418ac:6030 len:185 ret:185 localPort:53775 chandle:0x8807e3c8
09/10 21:45:11.729917 7faca1ad5700 RPC TSC-mgmt cid:0 sid:1 id:root, expected connect-rsp is not received, pConn:0x7faca01530f0
09/10 21:45:11.729946 7faca1ad5700 RPC TSC-mgmt cid:0 sid:1 id:root, failed to send msg:connect to 172.24.4.52:6030 pConn:0x7faca01530f0
09/10 21:45:11.729963 7facb5b1a700 TSC 0x7fac880ddb20 msg:(nil) is received from server, pConn:0x7faca01530f0
09/10 21:45:11.729980 7facb5b1a700 TSC 0x7fac880ddb20 no response from ip:0x340418ac
09/10 21:45:11.730017 7facb5b1a700 RPC TSC-mgmt cid:0 sid:1 id:root, TAOS connection closed, pConn:0x7faca01530f0
09/10 21:45:11.730083 7facb67f1700 TSC 0x7fac880ddb20 start to free sql object
09/10 21:45:11.730147 7facb67f1700 TSC 0x7fac880ddb20 start to free local reducer
09/10 21:45:11.730166 7facb67f1700 TSC 0x7fac880ddb20 local reducer has been freed, abort
09/10 21:45:11.730209 7facb67f1700 TSC 0x7fac880dda30 DB connection is closed
09/10 21:45:11.730218 7facb67f1700 ERROR JNI jobj:0x7facb67f06b8, taos:(nil), connect to tdengine failed, host=172.24.4.52, user=root, dbname=, port=0
09/10 21:45:11.731889 7facb67f1700 ERROR JNI jobj:0x7facb67f0648, connection is closed

@guanshengliang
Copy link
Contributor

修改过配置文件吗
JDBC的链接参数设置情况如何

@guanshengliang
Copy link
Contributor

从日志上看客户端的IP地址为172.24.4.53,服务端的地址为172.24.4.52

@guanshengliang
Copy link
Contributor

从日志上看,仍然是网络问题

09/10 21:45:11.729980 7facb5b1a700 TSC 0x7fac880ddb20 no response from ip:0x340418ac

@derchLee
Copy link
Author

JDBC的配置是从demo中复制出来的。查看是因为同时安装了firewall和iptables导致的网络问题,卸载iptables后正常了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants