-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Other]: The service is running, but the WebSocket connection failed. #2983
Comments
Hello! Thank you for filing an issue. If this is a bug report, please include relevant logs to help us debug the problem. Join slack 🤖 to connect and communicate with our developers. |
Which version of the SDK are you using? |
You can use IP:11001 to test if the server is available. |
你好,SDK从升级到现在,已经工作了7天了,没有问题,但是昨天晚上测试完成后,今天起来就连接不上了,IP:11001 的网页端可以登录,并且可以收发消息 |
Hello, the SDK has been working for 7 days since the upgrade. There is no problem. However, after the test was completed last night, I can't connect to it today. The web page with IP: 11001 can log in and send and receive messages. |
flutter_openim_sdk: 3.8.2+1,sever3.8.2 |
你好,我尝试了多种办法,重启服务器,最后是卸载apk,重启手机,再次调试,就可以了。我在此之前尝试了不卸载APK,flutter demo一直显示重新连接、连接失败,退出登录新账号依旧如此,但是明明server已经工作了,从11001就可以,以后如果再次出现,我应该用什么应对策略,除了卸载,我能想到的就是token缓存再本地了,但是我又尝试过退出再次登录,就很奇怪 |
Hello, I tried various methods, restarted the server, and finally uninstalled the apk, restarted the phone, and debugged again, and it worked. I tried not to uninstall the APK before, but the flutter demo kept showing reconnection and connection failure. It still showed the same problem after logging out and logging in with a new account, but it was clear that the server was already working, starting from 11001. If it happens again in the future, what response strategy should I use? , in addition to uninstalling, all I can think of is to cache the token locally, but I tried to log out and log in again, and it was very strange. |
有找到问题吗, 我也遇到过好几次这个问题, 只有10001端口websocket服务会出现这个问题, 其他服务并不会 |
Have you found the problem? I have encountered this problem several times. Only the 10001 port websocket service will have this problem, and other services will not. |
What would you like to share?
你好,我用的是docker版部署的3.8.2,从3.8.1更新的,然后3.8.2在服务器上运行了7天左右,晚上是测试好然后去睡了,第二天突然连接不上了,我重启了所有容器,测试了网页版是可以连接成功并且互相发消息的,但是app端就连接不上,提示[flutter_openim_sdk] ** Flutter : MethodCall(connectListener, {errCode: 10000, errMsg: dial tcp xxx.xx.xx.xx:10001: i/o timeout, type: onConnectFailed}),确实没有解决这个问题的能力,特来请教,下面是日志
Additional information
----------------------server--------------------
2024-12-20 04:45:07.464 �[33mWARN�[0m �[33m[PID:276] �[0m �[33mopenim-msggateway �[0m [3.8.2] [msggateway/http_error.go:23] ws connection error {"remoteAddr": "167.94.138.59:53950", "connID": "383fdb6136464f71a21b4fda3d14bedf", "error": "token is empty: 1602 args err, need token, sendID, platformID"}
2024-12-20 04:45:15.769 �[33mWARN�[0m �[33m[PID:276] �[0m �[33mopenim-msggateway �[0m [3.8.2] [msggateway/http_error.go:23] ws connection error {"remoteAddr": "167.94.138.59:39874", "connID": "a2ffe669cb15d675a4d94f27f40ba31a", "error": "token is empty: 1602 args err, need token, sendID, platformID"}
[2024-12-20 06:11:05 UTC] �[0;34mStarting tools primarily involves component verification and other preparatory tasks.�[0m
Starting /openim-server/_output/bin/tools/linux/amd64/check-free-memory -c /openim-server/config/
System available memory is sufficient: 1.86GB
Starting /openim-server/_output/bin/tools/linux/amd64/check-free-memory -c /openim-server/config/ successfully
Starting /openim-server/_output/bin/tools/linux/amd64/check-component -c /openim-server/config/
check-component Index: 0, Config Path: /openim-server/config/
Redis check succeeded.
Kafka check succeeded.
MinIO check succeeded.
Etcd check succeeded.
Mongo check succeeded.
All components checks passed successfully.
Starting /openim-server/_output/bin/tools/linux/amd64/check-component -c /openim-server/config/ successfully
Starting /openim-server/_output/bin/tools/linux/amd64/seq -c /openim-server/config/
seq task Redis Ping failed, Address=[localhost:16379], Username=, ClusterMode=false: dial tcp [::1]:16379: connect: connection refused
seq task success!
Starting /openim-server/_output/bin/tools/linux/amd64/seq -c /openim-server/config/ successfully
[2024-12-20 06:11:06 UTC] �[0;32mAll tools executed successfully�[0m
[2024-12-20 06:11:06 UTC] �[0;34mStarting services involves multiple RPCs and APIs and may take some time. Please be patient�[0m
[2024-12-20 06:11:06 UTC] �[0;32mAll services are running normally.�[0m
[2024-12-20 06:11:06 UTC] �[0;34mDisplay details of the ports listened to by the service:�[0m
2024-12-20 06:11:07.392 �[31mERROR�[0m �[31m[PID:81] �[0m �[31mopenim-push �[0m [3.8.2] [mw/rpc_client_interceptor.go:58] RPC Client Response Error - getAllOnlineUsers {"operationID": "1734675070242917384", "funcName": "/openim.user.user/getAllOnlineUsers", "error": "rpc error: code = Unavailable desc = last connection error: connection error: desc = "transport: Error while dialing: dial tcp 172.19.0.4:10320: connect: connection refused""}
2024-12-20 06:11:07.396 �[33mWARN�[0m �[33m[PID:81] �[0m �[33mopenim-push �[0m [3.8.2] [rpccache/online.go:103] initUsersOnlineStatus: getAllOnlineUsers failed {"operationID": "1734675070242917384", "error": "14 last connection error: connection error: desc = "transport: Error while dialing: dial tcp 172.19.0.4:10320: connect: connection refused""}
2024-12-20 06:11:07.555 �[31mERROR�[0m �[31m[PID:119] �[0m �[31mopenim-push �[0m [3.8.2] [mw/rpc_client_interceptor.go:58] RPC Client Response Error - getAllOnlineUsers {"operationID": "1734675068274547064", "funcName": "/openim.user.user/getAllOnlineUsers", "error": "rpc error: code = Unavailable desc = last connection error: connection error: desc = "transport: Error while dialing: dial tcp 172.19.0.4:10320: connect: connection refused""}
2024-12-20 06:11:07.558 �[33mWARN�[0m �[33m[PID:119] �[0m �[33mopenim-push �[0m [3.8.2] [rpccache/online.go:103] initUsersOnlineStatus: getAllOnlineUsers failed {"operationID": "1734675068274547064", "error": "14 last connection error: connection error: desc = "transport: Error while dialing: dial tcp 172.19.0.4:10320: connect: connection refused""}
2024-12-20 06:11:07.889 �[31mERROR�[0m �[31m[PID:118] �[0m �[31mopenim-push �[0m [3.8.2] [mw/rpc_client_interceptor.go:58] RPC Client Response Error - getAllOnlineUsers {"operationID": "1734675070440245874", "funcName": "/openim.user.user/getAllOnlineUsers", "error": "rpc error: code = Unavailable desc = last connection error: connection error: desc = "transport: Error while dialing: dial tcp 172.19.0.4:10320: connect: connection refused""}
2024-12-20 06:11:07.894 �[33mWARN�[0m �[33m[PID:118] �[0m �[33mopenim-push �[0m [3.8.2] [rpccache/online.go:103] initUsersOnlineStatus: getAllOnlineUsers failed {"operationID": "1734675070440245874", "error": "14 last connection error: connection error: desc = "transport: Error while dialing: dial tcp 172.19.0.4:10320: connect: connection refused""}
[2024-12-20 06:11:07 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-push -i 0 -c /openim-server/config/, PID: 80 is not listening on any ports.�[0m
2024-12-20 06:11:07.931 �[31mERROR�[0m �[31m[PID:105] �[0m �[31mopenim-push �[0m [3.8.2] [mw/rpc_client_interceptor.go:58] RPC Client Response Error - getAllOnlineUsers {"operationID": "1734675068584064050", "funcName": "/openim.user.user/getAllOnlineUsers", "error": "rpc error: code = Unavailable desc = last connection error: connection error: desc = "transport: Error while dialing: dial tcp 172.19.0.4:10320: connect: connection refused""}
2024-12-20 06:11:07.932 �[33mWARN�[0m �[33m[PID:105] �[0m �[33mopenim-push �[0m [3.8.2] [rpccache/online.go:103] initUsersOnlineStatus: getAllOnlineUsers failed {"operationID": "1734675068584064050", "error": "14 last connection error: connection error: desc = "transport: Error while dialing: dial tcp 172.19.0.4:10320: connect: connection refused""}
[2024-12-20 06:11:07 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-push -i 1 -c /openim-server/config/, PID: 81 is listening on ports: 12171, 10171�[0m
[2024-12-20 06:11:07 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-push -i 2 -c /openim-server/config/, PID: 82 is not listening on any ports.�[0m
2024-12-20 06:11:07.953 �[31mERROR�[0m �[31m[PID:90] �[0m �[31mopenim-push �[0m [3.8.2] [mw/rpc_client_interceptor.go:58] RPC Client Response Error - getAllOnlineUsers {"operationID": "1734675072000072337", "funcName": "/openim.user.user/getAllOnlineUsers", "error": "rpc error: code = Unavailable desc = last connection error: connection error: desc = "transport: Error while dialing: dial tcp 172.19.0.4:10320: connect: connection refused""}
2024-12-20 06:11:07.984 �[33mWARN�[0m �[33m[PID:90] �[0m �[33mopenim-push �[0m [3.8.2] [rpccache/online.go:103] initUsersOnlineStatus: getAllOnlineUsers failed {"operationID": "1734675072000072337", "error": "14 last connection error: connection error: desc = "transport: Error while dialing: dial tcp 172.19.0.4:10320: connect: connection refused""}
2024-12-20 06:11:08.087 �[31mERROR�[0m �[31m[PID:83] �[0m �[31mopenim-push �[0m [3.8.2] [mw/rpc_client_interceptor.go:58] RPC Client Response Error - getAllOnlineUsers {"operationID": "1734675068411548236", "funcName": "/openim.user.user/getAllOnlineUsers", "error": "rpc error: code = Unavailable desc = last connection error: connection error: desc = "transport: Error while dialing: dial tcp 172.19.0.4:10320: connect: connection refused""}
[2024-12-20 06:11:08 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-push -i 3 -c /openim-server/config/, PID: 83 is listening on ports: 10173�[0m
2024-12-20 06:11:08.223 �[33mWARN�[0m �[33m[PID:83] �[0m �[33mopenim-push �[0m [3.8.2] [rpccache/online.go:103] initUsersOnlineStatus: getAllOnlineUsers failed {"operationID": "1734675068411548236", "error": "14 last connection error: connection error: desc = "transport: Error while dialing: dial tcp 172.19.0.4:10320: connect: connection refused""}
[2024-12-20 06:11:08 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-push -i 4 -c /openim-server/config/, PID: 90 is listening on ports: 12174, 10174�[0m
2024-12-20 06:11:08.388 �[31mERROR�[0m �[31m[PID:80] �[0m �[31mopenim-push �[0m [3.8.2] [mw/rpc_client_interceptor.go:58] RPC Client Response Error - getAllOnlineUsers {"operationID": "1734675071161731424", "funcName": "/openim.user.user/getAllOnlineUsers", "error": "rpc error: code = Unavailable desc = last connection error: connection error: desc = "transport: Error while dialing: dial tcp 172.19.0.4:10320: connect: connection refused""}
2024-12-20 06:11:08.390 �[33mWARN�[0m �[33m[PID:80] �[0m �[33mopenim-push �[0m [3.8.2] [rpccache/online.go:103] initUsersOnlineStatus: getAllOnlineUsers failed {"operationID": "1734675071161731424", "error": "14 last connection error: connection error: desc = "transport: Error while dialing: dial tcp 172.19.0.4:10320: connect: connection refused""}
2024-12-20 06:11:08.587 �[31mERROR�[0m �[31m[PID:82] �[0m �[31mopenim-push �[0m [3.8.2] [mw/rpc_client_interceptor.go:58] RPC Client Response Error - getAllOnlineUsers {"operationID": "1734675069631310795", "funcName": "/openim.user.user/getAllOnlineUsers", "error": "rpc error: code = Unavailable desc = last connection error: connection error: desc = "transport: Error while dialing: dial tcp 172.19.0.4:10320: connect: connection refused""}
[2024-12-20 06:11:08 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-push -i 5 -c /openim-server/config/, PID: 105 is listening on ports: 12175, 10175�[0m
2024-12-20 06:11:08.689 �[33mWARN�[0m �[33m[PID:82] �[0m �[33mopenim-push �[0m [3.8.2] [rpccache/online.go:103] initUsersOnlineStatus: getAllOnlineUsers failed {"operationID": "1734675069631310795", "error": "14 last connection error: connection error: desc = "transport: Error while dialing: dial tcp 172.19.0.4:10320: connect: connection refused""}
[2024-12-20 06:11:09 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-push -i 6 -c /openim-server/config/, PID: 118 is listening on ports: 12176, 10176�[0m
[2024-12-20 06:11:10 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-push -i 7 -c /openim-server/config/, PID: 119 is listening on ports: 10177, 12177�[0m
[2024-12-20 06:11:10 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-msgtransfer -i 0 -c /openim-server/config/, PID: 131 is listening on ports: 12020�[0m
[2024-12-20 06:11:11 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-msgtransfer -i 1 -c /openim-server/config/, PID: 135 is listening on ports: 12021�[0m
[2024-12-20 06:11:13 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-msgtransfer -i 2 -c /openim-server/config/, PID: 136 is listening on ports: 12022�[0m
[2024-12-20 06:11:15 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-msgtransfer -i 3 -c /openim-server/config/, PID: 137 is listening on ports: 12023�[0m
[2024-12-20 06:11:15 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-msgtransfer -i 4 -c /openim-server/config/, PID: 140 is listening on ports: 12024�[0m
[2024-12-20 06:11:16 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-msgtransfer -i 5 -c /openim-server/config/, PID: 158 is listening on ports: 12025�[0m
[2024-12-20 06:11:16 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-msgtransfer -i 6 -c /openim-server/config/, PID: 159 is listening on ports: 12026�[0m
[2024-12-20 06:11:16 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-msgtransfer -i 7 -c /openim-server/config/, PID: 166 is listening on ports: 12027�[0m
[2024-12-20 06:11:16 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-rpc-auth -i 0 -c /openim-server/config/, PID: 76 is listening on ports: 12200, 10200�[0m
[2024-12-20 06:11:16 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-api -i 0 -c /openim-server/config/, PID: 176 is listening on ports: 10002, 12002�[0m
[2024-12-20 06:11:16 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-rpc-user -i 0 -c /openim-server/config/, PID: 79 is listening on ports: 12320, 10320�[0m
[2024-12-20 06:11:16 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-rpc-conversation -i 0 -c /openim-server/config/, PID: 124 is listening on ports: 12220, 10220�[0m
[2024-12-20 06:11:16 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-rpc-third -i 0 -c /openim-server/config/, PID: 129 is listening on ports: 12300, 10300�[0m
[2024-12-20 06:11:17 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-rpc-group -i 0 -c /openim-server/config/, PID: 77 is listening on ports: 12260, 10260�[0m
[2024-12-20 06:11:17 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-rpc-friend -i 0 -c /openim-server/config/, PID: 175 is listening on ports: 12240, 10240�[0m
[2024-12-20 06:11:17 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-rpc-msg -i 0 -c /openim-server/config/, PID: 78 is listening on ports: 12280, 10280�[0m
[2024-12-20 06:11:17 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-crontask -i 0 -c /openim-server/config/, PID: 130 is not listening on any ports.�[0m
[2024-12-20 06:11:17 UTC] �[0;32mCmdline: /openim-server/_output/bin/platforms/linux/amd64/openim-msggateway -i 0 -c /openim-server/config/, PID: 181 is listening on ports: 10001, 12140, 10140�[0m
2024-12-20 06:20:42.017 �[33mWARN�[0m �[33m[PID:82] �[0m �[33mopenim-push �[0m [3.8.2] [push/push_handler.go:92] it’s been a while since the message was sent {"platform": "Web", "connID": "b12572c52be3a4d951e2e689dfd8c020", "operationID": "e683c6db-19fb-4259-a92f-3a0e4d899be9", "opUserID": "5201975002", "msg": "msgData:{sendID:"5201975002" recvID:"9777047535" clientMsgID:"ab1874fca6afd0d007ffa633813102d3" serverMsgID:"9560e25e4614f24ac0b2a1bf0dadb901" senderPlatformID:5 senderNickname:"你好3" sessionType:1 msgFrom:100 contentType:113 content:"{\"msgTips\":\"yes\"}" sendTime:1734675091641 createTime:1734675091641 status:1 options:{key:"conversationUpdate" value:false} options:{key:"history" value:false} options:{key:"offlinePush" value:false} options:{key:"persistent" value:false} options:{key:"senderConversationUpdate" value:false} options:{key:"senderSync" value:false} options:{key:"unreadCount" value:false}} conversationID:"si_5201975002_9777047535"", "sec": 1734675091, "nowSec": 1734675642, "nowSec-sec": 551}
2024-12-20 06:20:42.298 �[33mWARN�[0m �[33m[PID:82] �[0m �[33mopenim-push �[0m [3.8.2] [push/push_handler.go:92] it’s been a while since the message was sent {"platform": "Web", "connID": "b12572c52be3a4d951e2e689dfd8c020", "operationID": "b6d173a1-c8bc-4aa6-9166-753490dccd8b", "opUserID": "5201975002", "msg": "msgData:{sendID:"5201975002" recvID:"9777047535" clientMsgID:"33892ab5538535858bfba536c928f3f7" serverMsgID:"123c3dc9a4f8a07d77fe0c753d91e192" senderPlatformID:5 senderNickname:"你好3" sessionType:1 msgFrom:100 contentType:113 content:"{\"msgTips\":\"yes\"}" sendTime:1734675093145 createTime:1734675093145 status:1 options:{key:"conversationUpdate" value:false} options:{key:"history" value:false} options:{key:"offlinePush" value:false} options:{key:"persistent" value:false} options:{key:"senderConversationUpdate" value:false} options:{key:"senderSync" value:false} options:{key:"unreadCount" value:false}} conversationID:"si_5201975002_9777047535"", "sec": 1734675093, "nowSec": 1734675642, "nowSec-sec": 549}
2024-12-20 06:20:42.730 �[33mWARN�[0m �[33m[PID:82] �[0m �[33mopenim-push
----------------------flutter-demo--------------------
I/GoLog (10285): 2024-12-20 07:18:40.438 INFO [PID:10285] [v3.8.2] [flutter/Android] [interaction/long_conn_mgr.go:321] sendPingMessage {"operationID": "1734678880250", "goroutine ID:": 219}
I/GoLog (10285): 2024-12-20 07:18:40.438 DEBUG [PID:10285] [v3.8.2] [flutter/Android] [interaction/long_conn_mgr.go:332] ping Message Started {"operationID": "1734678880250", "goroutine ID:": 219, "opid": "1734679120476061211"}
I/GoLog (10285): 2024-12-20 07:18:40.439 DEBUG [PID:10285] [v3.8.2] [flutter/Android] [interaction/long_conn_mgr.go:341] ping Message failed, connection {"operationID": "1734678880250", "connStatus": 2, "goroutine ID:": 219, "opid": "1734679120476061211"}
[flutter_openim_sdk] ** Flutter : MethodCall(connectListener, {errCode: 10000, errMsg: dial tcp xxx.xx.xx.xx:10001: i/o timeout, type: onConnectFailed})
The text was updated successfully, but these errors were encountered: