nwtgck / piping-server-rust

Infinitely transfer between every device over pure HTTP with pipes or browsers
MIT License
288 stars 19 forks source link

'Socket not connected' error behind reverse proxy #573

Open fungs opened 5 months ago

fungs commented 5 months ago

Hi,

I observed that, when running piping-server-rust behind HAProxy, I'm getting the following error after each (successful) transfer:

[ERROR piping_server] Failed to serve HTTP connection: hyper::Error(Shutdown, Os { code: 107, kind: NotConnected, message: "Socket not connected" })
[ERROR piping_server] Failed to serve HTTP connection: hyper::Error(Shutdown, Os { code: 107, kind: NotConnected, message: "Socket not connected" })

I'm not sure what this means, and if this might be related to the timeout parameters. However, I've set timeouts generously and the reverse proxy is running on the same local system as piping-server.

Any ideas?

fungs commented 5 months ago

Possibly related:

nwtgck commented 3 weeks ago

@fungs Does HAProxy work with other HTTP server like nginx or nwtgck/pipng-server (not rust) instead of piping-server-rust?

fungs commented 3 weeks ago

@nwtgck I haven't tried piping-server instead of piping-server-rust, but HAProxy should work with any kind of HTTP server, it is one of the oldest reverse proxies around and part of many commercial cloud offerings. For me, the error and related issues are more likely pointing to the rust stack. Somehow the software loses the HTTP connection back to the reverse proxy. Then, HAProxy just terminates the connection after the configure timeout.

nwtgck commented 3 weeks ago

@fungs Sorry. I missied "each (successful) transfer."

Does curl http://your-local-haproxy/version print the Piping Server version without errors?