0

from time to time, sshuttle fails on first attempt to connect, but if I just retry, it's OK. No big deal for webpages, but if app startup requires multiple connection, it might become a problem.

Currently I'm launching it as:

sshuttle -NHvr  <alias from .ssh/config> 0.0.0.0/0 --exclude <ip of alias> --dns -e 'ssh -o "ServerAliveInterval 60" -o "ServerAliveCountMax 120"' --no-latency-control

latency controll does not influence it, without customized ssh invocation I had the same issue.

Any idea what can cause/fix the problem?

UPDATE: by 'retry' I meant retrying the http request, not restarting the app. I also tried to add

-o "ConnectionAttempts 5" -o "ConnectTimeout 15"

to allow more connection attempts and generous timeouts, but no luck. In logs I see:

error was: nowrite: [Errno 107] Transport endpoint is not 

connected or

error was: uread: [Errno 104] Connection reset by peer

on target host there is running some super-crazy/obsoleted/low-quality/proprietary vpn, I'm not sure if cannot be somehow induced by that. But the point of sshuttle here is not having to install this unsecure vpn on all computers. But working directly on pc with this vpn I don't observer any issues.

Martin Mucha
  • 555
  • 1
  • 5
  • 19
  • "sshuttle fails on first attempt to connect, but if I just retry, it's OK" – Do you mean you need to invoke `sshuttle` again? Or is it about retrying whatever wants to use the VPN? – Kamil Maciorowski Mar 17 '23 at 10:49
  • the latter, retrying the request. In this case, re-running the java app. – Martin Mucha Mar 17 '23 at 11:00

0 Answers0