delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/06/01/01:44:39

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:references
:mime-version:content-type:content-transfer-encoding; q=dns; s=
default; b=N18pjeM2xVx4vXjYyu4UKe0xOPdAXSDpcWU6bedDHjjJD35vewf7X
80nvuj0d3MBfTTxgMLJaSUoH72PEF02Hexb6i9Bx8datV0M/FxPSOgA66rp0DK4G
LRC3oNSM/0ztDWU6W1Sd7wK/ejTIByMb0Q0PQvwp+WLuidR/Ehd50Q=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:references
:mime-version:content-type:content-transfer-encoding; s=default;
bh=MKEf8h6faCeewRNB9ANTvBLEWy4=; b=Q7nL96vg4WH7zW7bLKmDm2YHxqmz
He6ubbh/wshxw2OCnKH1rIjt+6JEIkDoJLpDPpAQJon0zak5OTDLMoSVUywywUQG
qe7+aZVygO4H/5nSA5pbaLqkxxJd1vnBRTzaVxw0IitHoIcmqpd2dWwaf8GlayST
lEEtapRLZcRV1j0=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.6 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=H*Ad:D*gov, 8336, U*SMI, autossh
X-HELO: blaine.gmane.org
To: cygwin AT cygwin DOT com
From: Andrew Schulman <schulman DOT andrew AT epa DOT gov>
Subject: Re: AutoSSH problem
Date: Fri, 01 Jun 2018 01:44:16 -0400
Lines: 75
Message-ID: <4sl1hdd5chcc9er6naq2vgiaitkh72otuj@4ax.com>
References: <1fd63f27-9d18-446c-24a4-326b09998c08 AT lanvaux DOT fr>
Mime-Version: 1.0
X-Archive: encrypt
X-IsSubscribed: yes
Note-from-DJ: This may be spam

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 AT lanvaux DOT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019