RobotWebTools / rosbridge_suite

Server Implementations of the rosbridge v2 Protocol
https://robotwebtools.github.io
BSD 3-Clause "New" or "Revised" License
919 stars 519 forks source link

WebSocket opening handshake timeout (peer did not finish the opening handshake in time) (NGROK) #837

Closed spygibas closed 1 year ago

spygibas commented 1 year ago

Description PARAMETERS

NODES / rosapi (rosapi/rosapi_node) rosbridge_websocket (rosbridge_server/rosbridge_websocket)

ROS_MASTER_URI=http://localhost:11311

process[rosbridge_websocket-1]: started with pid [1113478] process[rosapi-2]: started with pid [1113479] 2023-02-16 14:41:55+0700 [-] Log opened. [INFO] [1676533315.115108, 219980.241000]: Rosapi started 2023-02-16 14:41:55+0700 [-] registered capabilities (classes): 2023-02-16 14:41:55+0700 [-] - <class 'rosbridge_library.capabilities.call_service.CallService'> 2023-02-16 14:41:55+0700 [-] - <class 'rosbridge_library.capabilities.advertise.Advertise'> 2023-02-16 14:41:55+0700 [-] - <class 'rosbridge_library.capabilities.publish.Publish'> 2023-02-16 14:41:55+0700 [-] - <class 'rosbridge_library.capabilities.subscribe.Subscribe'> 2023-02-16 14:41:55+0700 [-] - <class 'rosbridge_library.capabilities.defragmentation.Defragment'> 2023-02-16 14:41:55+0700 [-] - <class 'rosbridge_library.capabilities.advertise_service.AdvertiseService'> 2023-02-16 14:41:55+0700 [-] - <class 'rosbridge_library.capabilities.service_response.ServiceResponse'> 2023-02-16 14:41:55+0700 [-] - <class 'rosbridge_library.capabilities.unadvertise_service.UnadvertiseService'> 2023-02-16 14:41:55+0700 [-] WebSocketServerFactory starting on 9090 2023-02-16 14:41:55+0700 [-] Starting factory <autobahn.twisted.websocket.WebSocketServerFactory object at 0x7fc4cf6deee0> 2023-02-16 14:41:55+0700 [-] [INFO] [1676533315.344923, 219980.432000]: Rosbridge WebSocket server started at ws://localhost:9090 2023-02-16 14:42:17+0700 [-] dropping connection to peer tcp4:127.0.0.1:40236 with abort=True: WebSocket opening handshake timeout (peer did not finish the opening handshake in time) 2023-02-16 14:42:47+0700 [-] dropping connection to peer tcp4:127.0.0.1:40238 with abort=True: WebSocket opening handshake timeout (peer did not finish the opening handshake in time)

-- Detail I use rosbridge_suite with ngrok to make robot can online NGROK detail: I make forward tcp://0.tcp.ap.ngrok.io:[port] --> localhost:9090 and for rosbridge I run these command roslaunch rosbridge_server rosbridge_websocket.launch address:=localhost websocket_external_port:=[port from ngrok] websocket_ping_interval:=20 and use server on cloud to connect with robot with roslib working normal but I have problem some time found WebSocket opening handshake timeout (peer did not finish the opening handshake in time)

Can anybody know what can I solve these problem ?

spygibas commented 1 year ago

CLOSED Problem on ngrok

ammarazab1 commented 11 months ago

@spygibas Hello How are you can you describe how you solve it because I face the same issue ?

Thanks in Advance

spygibas commented 6 months ago

@spygibas Hello How are you can you describe how you solve it because I face the same issue ?

Thanks in Advance @ammarazab1

It cannot solve problem because ngrok server, Please make your tunnel server, I make my server and test forward port to tunnel via my server and not found that problem, Please test with Localtunnel then you can guide to make your server tunnel Good Luck!