AutoSSH problem

Andrew Schulman schulman.andrew@epa.gov
Fri Jun 1 05:44:00 GMT 2018


Hi. I'm glad someone is using autossh. I don't use it myself any more, and as a
package maintainer it's impossible for me to tell if anyone else is.

> I have installed AutoSSH as such:
> 
> cygrunsrv.exe -I AutoSSH -p /bin/autossh -a "-M 20000 -R 
> *:5900:localhost:5900 SMI@lanvaux.fr" -y tcpip --type auto -e 
> AUTOSSH_NTSERVICE=yes

That all seems correct.

> Now, it works great, except if the ssh service at lanvaux.fr would 
> become unavailable.
> 
> In this case, the service stops.
> 
> In the log viewer, I only get the following message in the system log:
> 
> The description for Event ID 0 from source AutoSSH cannot be found. 
> Either the component that raises this event is not installed on your 
> local computer or the installation is corrupted. You can install or 
> repair the component on the local computer.
> 
> If the event originated on another computer, the display information had 
> to be saved with the event.
> 
> The following information was included with the event:
> 
> AutoSSH: PID 8336: service `AutoSSH' failed: signal 14 raised

SIGALRM?

> and in autoSSH.log:
> 
> ssh: connect to host lanvaux.fr port 22: Connection timed out
> 2018/05/29 10:39:39 autossh[8424]: ssh exited with error status 255; 
> restarting ssh
> 2018/05/29 10:40:29 autossh[8424]: starting ssh (count 12)
> 2018/05/29 10:40:29 autossh[8424]: ssh child pid is 14616
> ssh: connect to host lanvaux.fr port 22: Connection timed out
> 2018/05/29 10:40:50 autossh[8424]: ssh exited with error status 255; 
> restarting ssh
> 2018/05/29 10:42:02 autossh[8424]: starting ssh (count 13)
> 2018/05/29 10:42:02 autossh[8424]: ssh child pid is 20004
> ssh: connect to host lanvaux.fr port 22: Connection timed out
> 2018/05/29 10:42:23 autossh[8424]: ssh exited with error status 255; 
> restarting ssh
> 2018/05/29 10:44:01 autossh[8424]: starting ssh (count 14)
> 2018/05/29 10:44:01 autossh[8424]: ssh child pid is 3056
> ssh: connect to host lanvaux.fr port 22: Connection timed out
> 2018/05/29 10:44:22 autossh[8424]: ssh exited with error status 255; 
> restarting ssh
> 2018/05/29 16:43:41 autossh[17172]: starting ssh (count 1)
> 
> (16:43:41 is when we manually restarted the service.)
> 
> From reading the AutoSSH manpage, I was expecting ssh to always try to 
> reconnect (except if it fails on the first try.)

Yes, it should. But in this case it looks as though the service process crashed
(around 10:44).

> When I noticed the first failure, I tried changing the service settings 
> for AutoSSH to restart all the time, but that didn't do it.
> 
> Am I missing something regarding AutoSSH configuration?

No, it seems like a bug. To find out more, please add "-e AUTOSSH_DEBUG=true" to
your service definition, and restart the service. autossh will send debugging
output to autossh.log. After the service fails again, post the log output here
from the last few minutes before it failed.

If that doesn't help, then we may have to get more aggressive and use strace.

Andrew


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list