Erroe: failed to write to incoming websocket: ConnectionClosed

Author: wnz99Created Jun 4, 2021Updated Feb 14, 2025

Hi,

I'm having an issue with:

tunnelto 0.1.18

I'm trying to tunnel a wss connection however I'm getting an error. The same connection works with ngrock. The following are the two commands and the error logs:

ngrok http -region eu -hostname=### 172.28.1.3:8080
tunnelto --host 172.28.1.3 --subdomain ###--port 8080 -v

Logs:

101             GET     /v1/graphql
 DEBUG tunnelto::local                   > read from local service: "<non utf8>"
 DEBUG tunnelto::introspect::console_log > no log line for response
 INFO  tunnelto                          > got end stream [StreamId([206, 121, 210, 111, 39, 161, 7, 18])]
 DEBUG tunnelto                          > Processed packet: "END STREAM"
 DEBUG tunnelto::local                   > read from local service: "<non utf8>"
 DEBUG tunnelto::introspect::console_log > no log line for response
 WARN  tunnelto::local                   > closing stream
 DEBUG tunnelto::local                   > read from local service: "<non utf8>"
 DEBUG tunnelto::introspect::console_log > no log line for response
 WARN  tunnelto::local                   > closing stream
 ERROR tunnelto::introspect              > failed to write to incoming websocket: ConnectionClosed
 INFO  tunnelto::local                   > done reading from client stream
 ERROR tunnelto::introspect              > failed to write to incoming websocket: ConnectionClosed
 INFO  tunnelto::local                   > done reading from client stream
 ERROR tunnelto::introspect              > failed to write to incoming websocket: ConnectionClosed
 INFO  tunnelto::local                   > done reading from client stream
 ERROR tunnelto::introspect              > failed to write to incoming websocket: ConnectionClosed
 INFO  tunnelto::local                   > done reading from client stream
 DEBUG tunnelto::local                   > read from local service: "<non utf8>"
 DEBUG tunnelto::introspect::console_log > no log line for response
 WARN  tunnelto::local                   > closing stream
 ERROR tunnelto::introspect              > failed to write to incoming websocket: ConnectionClosed
 INFO  tunnelto::local                   > done reading from client stream
 ERROR tunnelto::introspect              > failed to write to incoming websocket: ConnectionClosed
 INFO  tunnelto::local                   > done reading from client stream
 INFO  tunnelto                          > stream["stream_iB4XD1s61LE"] -> init
 DEBUG tunnelto                          > Processed packet: "INIT STREAM"
 INFO  tunnelto                          > stream["stream_iB4XD1s61LE"] -> new data: 991
 INFO  tunnelto::local                   > setting up local stream: stream_iB4XD1s61LE
 INFO  tunnelto                          > forwarded to local tcp (stream_iB4XD1s61LE)
 DEBUG tunnelto                          > Processed packet: "STREAM DATA"
 DEBUG tunnelto::local                   > wrote to local service: 991
 DEBUG tunnelto::local                   > read from local service: "HTTP/1.1 101 Switching Protocols\r\nconnection: upgrade\r\nupgrade: websocket\r\nsec-websocket-accept: SKh2fziQyGpvgv3E0GZTAMiTZnI=\r\ndate: Fri, 04 Jun 2021 14:23:41 GMT\r\n\r\n"