3 在docker中使用镜部署成功后,使用流数据订阅端显示成功,但收不到数据

我部署了一个DolphinDB的docker服务,使用Python客户端订阅了流数据,订阅成功,但没收到数据,查看节点日志,如下所示:



2022-09-23 20:03:26.084867 <WARNING> :The publish connection to site localhost:20001 doesn't exist.
2022-09-23 20:03:26.084839 <INFO> :Received a request to stop publishing table [trades] to site localhost:20001
2022-09-23 20:03:26.083032 <INFO> :New connection from ip = 172.17.0.1 port = 58250
2022-09-23 20:03:26.082969 <INFO> :Created a new socket connection. Number of connections: 9
2022-09-23 20:03:26.081608 <INFO> :Close a connection with index=9. Number of remaining connections: 8
2022-09-23 20:03:26.081052 <ERROR> :AsynchronousPublisherImp::closeConnection 172.17.0.1:20001 #0 with error: Failed to connect. Connection refused
telnet 127.0.0.1 20001 容器宿主机是端口是正常的。想问一下为什么订阅的推送会去访问docker中桥网络的端口。我还需要做什么配置才能在客户端收到数据?


宿主机服务端口监听正常

lsof -i:20001
COMMAND    PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
python3.6 5037   cz    5u  IPv4 0x394eec70203d60b7      0t0  TCP *:microsan (LISTEN)


容器内能访问到宿主机服务端口

/data/ddb/server # ping 192.168.3.27
PING 192.168.3.27 (192.168.3.27): 56 data bytes
64 bytes from 192.168.3.27: seq=0 ttl=37 time=0.348 ms
64 bytes from 192.168.3.27: seq=1 ttl=37 time=0.556 ms
/data/ddb/server # telnet 192.168.3.27 20001
Connected to 192.168.3.27

现在关键问题是dolphindb没有去访问宿主机而去访问容器内的桥网络的端口
/data/ddb/server # telnet 172.18.0.1 20001
telnet: can't connect to remote host (172.18.0.1): Connection refused
/data/ddb/server # telnet 172.18.0.1 20001
telnet: can't connect to remote host (172.18.0.1): Connection refused

需要特殊的配置吗?




请先 登录 后评论

1 个回答

wale

流数据现在是push到客户端监听端口的,所以你要先检查一下docker能否访问宿主机的订阅端口

请先 登录 后评论
  • 1 关注
  • 0 收藏,1048 浏览
  • gn21 提出于 2022-09-24 04:21

相似问题