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

Unable to establish connection #26262

Open
xingxingzaixian opened this issue Jun 22, 2024 · 2 comments
Open

Unable to establish connection #26262

xingxingzaixian opened this issue Jun 22, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@xingxingzaixian
Copy link

【环境】

  • OS: 官方docker镜像的环境,主机系统是mac 12.1
  • 内存、CPU、磁盘均剩余很多
  • TDengine Version 3.3.0.3

【问题】

  1. 使用go连接器重复写入了几次数据,就连接不上了,报:Unable to establish connection
  2. 在容器内使用taos命令打印如下:
Welcome to the TDengine Command Line Interface, Client Version:3.3.0.3
Copyright (c) 2023 by TDengine, all rights reserved.

failed to connect to server, reason: Unable to establish connection

【排查】

  1. 在容器内taos命令都无法连接,应��不是网络的问题
  2. 使用检查命令taos -n server -P 6030 -l 1000,服务端正常,打印如下:
network test server is initialized, port:6030
request is received, size:1373
request is received, size:2241
request is received, size:2599
request is received, size:2599
request is received, size:2599
request is received, size:2424
request is received, size:2545
request is received, size:2424
  1. 使用检查命令taos -n client -h v3s2 -P 6030 -l 1000,客户端异常,打印如下:
network test client is initialized, the server is v3s2:6030
request is sent, size:1000
response not received since Unable to establish connection
request is sent, size:1000
response not received since Unable to establish connection
request is sent, size:1000
response not received since Unable to establish connection
request is sent, size:1000
response not received since Unable to establish connection
request is sent, size:1000
response not received since Unable to establish connection
request is sent, size:1000
response not received since Unable to establish connection
  1. 查看容器日志docker logs tdengine,打印如下:
06/22 08:17:36.177053 00000240 error "execute sql: insert into `keeper_monitor_041e1a041859502d8e8d0aaf4c804483` using keeper_monitor tags ('3c8eaca273b3:6043') values ( now,  0.016667, 0.363261, 0), error: [0x200] db is not specified" model=monitor
06/22 08:17:51.155097 00000034 taos_ADAPTER error "" req_id=0x1bd203f05c401b2d model=restful sql=insert into `keeper_monitor_041e1a041859502d8e8d0aaf4c804483` using keeper_monitor tags ('3c8eaca273b3:6043') values ( now,  0.016667, 0.363261, 0) error_code=512 error_msg=db is not specified
06/22 08:17:51.155182 00000034 taos_ADAPTER info "| 200 |  10.29068432s |       127.0.0.1 | POST | %2Frest%2Fsql%2Flog " model=web req_id=0x1bd203f05c401b2d
06/22 08:17:51.155466 00000240 error "execute sql: insert into `keeper_monitor_041e1a041859502d8e8d0aaf4c804483` using keeper_monitor tags ('3c8eaca273b3:6043') values ( now,  0.016667, 0.363261, 0), error: [0x200] db is not specified" model=monitor
06/22 08:18:06.154524 00000034 taos_ADAPTER error "" model=restful req_id=0x1bd203f05fe01b2e sql=insert into `keeper_monitor_041e1a041859502d8e8d0aaf4c804483` using keeper_monitor tags ('3c8eaca273b3:6043') values ( now,  0.000000, 0.363261, 0) error_code=512 error_msg=db is not specified
06/22 08:18:06.154626 00000034 taos_ADAPTER info "| 200 | 10.290092271s |       127.0.0.1 | POST | %2Frest%2Fsql%2Flog " model=web req_id=0x1bd203f05fe01b2e
06/22 08:18:06.155165 00000240 error "execute sql: insert into `keeper_monitor_041e1a041859502d8e8d0aaf4c804483` using keeper_monitor tags ('3c8eaca273b3:6043') values ( now,  0.000000, 0.363261, 0), error: [0x200] db is not specified" model=monitor
06/22 08:18:21.137543 00000034 taos_ADAPTER error "" error_code=512 error_msg=db is not specified sql=insert into `keeper_monitor_041e1a041859502d8e8d0aaf4c804483` using keeper_monitor tags ('3c8eaca273b3:6043') values ( now,  0.008333, 0.363261, 0) model=restful req_id=0x1bd203f063901b2f
06/22 08:18:21.137606 00000034 taos_ADAPTER info "| 200 | 10.294782277s |       127.0.0.1 | POST | %2Frest%2Fsql%2Flog " model=web req_id=0x1bd203f063901b2f
06/22 08:18:21.137817 00000240 error "execute sql: insert into `keeper_monitor_041e1a041859502d8e8d0aaf4c804483` using keeper_monitor tags ('3c8eaca273b3:6043') values ( now,  0.008333, 0.363261, 0), error: [0x200] db is not specified" model=monitor
06/22 08:18:36.134518 00000034 taos_ADAPTER error "" model=restful req_id=0x1bd203f067301b30 error_code=512 error_msg=db is not specified sql=insert into `keeper_monitor_041e1a041859502d8e8d0aaf4c804483` using keeper_monitor tags ('3c8eaca273b3:6043') values ( now,  0.008333, 0.363261, 0)
06/22 08:18:36.134609 00000034 taos_ADAPTER info "| 200 | 10.291394501s |       127.0.0.1 | POST | %2Frest%2Fsql%2Flog " model=web req_id=0x1bd203f067301b30
06/22 08:18:36.134995 00000240 error "execute sql: insert into `keeper_monitor_041e1a041859502d8e8d0aaf4c804483` using keeper_monitor tags ('3c8eaca273b3:6043') values ( now,  0.008333, 0.363261, 0), error: [0x200] db is not specified" model=monitor
06/22 08:18:51.110730 00000034 taos_ADAPTER error "" model=restful req_id=0x1bd203f06ae01b31 sql=insert into `keeper_monitor_041e1a041859502d8e8d0aaf4c804483` using keeper_monitor tags ('3c8eaca273b3:6043') values ( now,  0.016667, 0.363261, 0) error_code=512 error_msg=db is not specified
06/22 08:18:51.110811 00000034 taos_ADAPTER info "| 200 | 10.289384779s |       127.0.0.1 | POST | %2Frest%2Fsql%2Flog " model=web req_id=0x1bd203f06ae01b31
06/22 08:18:51.111118 00000240 error "execute sql: insert into `keeper_monitor_041e1a041859502d8e8d0aaf4c804483` using keeper_monitor tags ('3c8eaca273b3:6043') values ( now,  0.016667, 0.363261, 0), error: [0x200] db is not specified" model=monitor
06/22 08:19:06.119129 00000034 taos_ADAPTER error "" error_code=512 error_msg=db is not specified model=restful req_id=0x1bd203f06e801b32 sql=insert into `keeper_monitor_041e1a041859502d8e8d0aaf4c804483` using keeper_monitor tags ('3c8eaca273b3:6043') values ( now,  0.008333, 0.363261, 0)
06/22 08:19:06.119192 00000034 taos_ADAPTER info "| 200 | 10.297751138s |       127.0.0.1 | POST | %2Frest%2Fsql%2Flog " req_id=0x1bd203f06e801b32 model=web
06/22 08:19:06.119561 00000240 error "execute sql: insert into `keeper_monitor_041e1a041859502d8e8d0aaf4c804483` using keeper_monitor tags ('3c8eaca273b3:6043') values ( now,  0.008333, 0.363261, 0), error: [0x200] db is not specified" model=monitor
06/22 08:19:21.088960 00000034 taos_ADAPTER error "" error_code=512 error_msg=db is not specified model=restful req_id=0x1bd203f072301b33 sql=insert into `keeper_monitor_041e1a041859502d8e8d0aaf4c804483` using keeper_monitor tags ('3c8eaca273b3:6043') values ( now,  0.008333, 0.364855, 0)
06/22 08:19:21.089059 00000034 taos_ADAPTER info "| 200 | 10.288681932s |       127.0.0.1 | POST | %2Frest%2Fsql%2Flog " model=web req_id=0x1bd203f072301b33
06/22 08:19:21.089434 00000240 error "execute sql: insert into `keeper_monitor_041e1a041859502d8e8d0aaf4c804483` using keeper_monitor tags ('3c8eaca273b3:6043') values ( now,  0.008333, 0.364855, 0), error: [0x200] db is not specified" model=monitor
06/22 08:19:36.098295 00000034 taos_ADAPTER error "" error_code=512 error_msg=db is not specified req_id=0x1bd203f075d01b34 model=restful sql=insert into `keeper_monitor_041e1a041859502d8e8d0aaf4c804483` using keeper_monitor tags ('3c8eaca273b3:6043') values ( now,  0.008333, 0.364855, 0)
06/22 08:19:36.098463 00000034 taos_ADAPTER info "| 200 | 10.298395684s |       127.0.0.1 | POST | %2Frest%2Fsql%2Flog " model=web req_id=0x1bd203f075d01b34
06/22 08:19:36.098828 00000240 error "execute sql: insert into `keeper_monitor_041e1a041859502d8e8d0aaf4c804483` using keeper_monitor tags ('3c8eaca273b3:6043') values ( now,  0.008333, 0.364855, 0), error: [0x200] db is not specified" model=monitor
@xingxingzaixian xingxingzaixian added the bug Something isn't working label Jun 22, 2024
@xingxingzaixian
Copy link
Author

重启容器docker restart tdengine,服务正常,这不是解决方法,还是要稳定,公司用的influxdb,本来最近在调研能不能切换到tdengine,今天出这个问题就有点劝退了,如果生产上出现这个问题,咱总不能靠重启服务器来解决吧
上面的检测结果服务端运行正常,但是客户端运行不正常,那是不是用原生连接的方式就不会有影响。我当前使用的是rest和ws方式进行连接。连接异常的时候查看了容器中的进行:

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   2780   384 ?        Ss   Jun21   0:02 /tini -- /usr/bin/entrypoint.sh taosd
root         6  0.0  0.0   2892   512 ?        S    Jun21   0:00 /bin/sh /usr/bin/entrypoint.sh taosd
root        34  3.7  4.9 4166876 394044 ?      Sl   Jun21  18:44 taosadapter
root       240  0.0  0.3 1617148 29036 ?       Sl   Jun21   0:26 taoskeeper
root       263  0.3  0.7 992048 63784 ?        Sl   Jun21   2:00 taos-explorer
root       877  0.0  0.0   7636  3968 pts/0    Ss   08:14   0:00 bash
root       917  0.0  0.0  10072  3200 pts/0    R+   08:16   0:00 ps aux
@yu285
Copy link
Contributor

yu285 commented Jun 25, 2024

怀疑是服务端停了然后又重新拉了起来,在停止的瞬间出现了这个报错。但是需要具体排查,可以加我微信a15652223354。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
2 participants