public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andrew Schulman <schulman.andrew@epa.gov>
To: cygwin@cygwin.com
Subject: Re: AutoSSH problem
Date: Fri, 01 Jun 2018 05:44:00 -0000	[thread overview]
Message-ID: <4sl1hdd5chcc9er6naq2vgiaitkh72otuj@4ax.com> (raw)
In-Reply-To: <1fd63f27-9d18-446c-24a4-326b09998c08@lanvaux.fr>

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

  reply	other threads:[~2018-06-01  5:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-31 12:16 Germain Le Chapelain
2018-06-01  5:44 ` Andrew Schulman [this message]
2018-06-04 15:38 ` Greg Freemyer
     [not found] <1527847720.60014.ezmlm@cygwin.com>
2018-06-01 22:32 ` Germain Le Chapelain
2018-06-01 23:03   ` René Berber
     [not found] <1527971948.18809.ezmlm@cygwin.com>
2018-06-03  2:34 ` Germain Le Chapelain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4sl1hdd5chcc9er6naq2vgiaitkh72otuj@4ax.com \
    --to=schulman.andrew@epa.gov \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).