Re: AutoSSH problem
On 06/01/18 23:03, René Berber wrote: The behavior looks normal. Quoting from the autossh man page: "Startup behaviour If the ssh session fails with an exit status of 1 on the very first try, autossh 1.' will assume that there is some problem with syntax or the connection setup, and will exit rather than retrying; 2.' There is a "starting gate" time. If the first ssh process fails within the first few seconds of being started, autossh assumes that it never made it "out of the starting gate", and exits. This is to handle initial failed authentication, connection, etc. This time is 30 seconds by default, and can be adjusted (see the AUTOSSH_GATETIME environment variable below). If AUTOSSH_GATETIME is set to 0, then both behaviours are disabled: there is no "starting gate", and autossh will restart even if ssh fails on the first run with an exit status of 1. The "starting gate" time is also set to 0 when the -f flag to autossh is used. " Thank you for highlighting this point, René. You are right: it "looks" normal, from far :) However, looking closer to the log, you should see (or not, looking back at it it's not obvious) that I halted the connection the server about three minutes in: 2018/06/01 13:17:41 autossh[20680]: set alarm for 600 secs Connection to lanvaux.fr closed by remote host. 2018/06/01 13:20:52 autossh[20680]: check on child 4988 So something still doesn't line up. :/ I may try my dumpo-magic (I think it's actually called "DebugDiag", https://blogs.msdn.microsoft.com/chaun/2013/11/12/steps-to-catch-a-simple-crash-dump-of-a-crashing-process/) But as said earlier it's probably going to poop (no pun intended) about AutoSSH being a cygwin program. I will take a read on how debugging goes on Cygwin, or look at AutoSSH 1.4e (and how to get it.) Kindest regards, Thank you for your answer! -- Germain Le Chapelain Lanvaux Computer Games Limited http://lanvaux.fr -- 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
Re: AutoSSH problem
autossh[20680]: check on child 20916 2018/06/01 13:26:01 autossh[20680]: set alarm for 105 secs ssh: connect to host lanvaux.fr port 22: Connection timed out 2018/06/01 13:26:22 autossh[20680]: check on child 20916 2018/06/01 13:26:22 autossh[20680]: ssh exited with error status 255; restarting ssh 2018/06/01 13:26:22 autossh[20680]: expired child, returning 1 2018/06/01 13:26:22 autossh[20680]: checking for grace period, tries = 12 2018/06/01 13:26:22 autossh[20680]: sleeping for grace time 98 secs The service was not running and the same error ("Signal 14") was reported on the event log at 1:27:46 PM If that doesn't help, then we may have to get more aggressive and use strace. Thank you! I was wondering where to go next. I am looking forward to an education on the subject! Hadn't you answered I would have tried a tool from Microsoft that watches after Services and saves a dump when a particular one crashes; But I don't know if this work with Cygwin programs: I would have needed a pdb, then, to debug I am not very familiar with software development in Cygwin, I will have a look at strace. I also forgot to mention in my first post: did you note that the latest update to AutoSSH was about signals ? :p I am willing to bet that installing the package 1.4e (I don't know how to do that, from the top if my head) will solve our issue. Of course we would lose the other fixes that happened in it. Thank you again for your reply! Kind regards; -- Germain Le Chapelain http://lanvaux.fr -- 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
AutoSSH problem
Hi, I am experiencing troubles trying to set up a reverse SSH tunnel: I have installed AutoSSH as such: cygrunsrv.exe -I AutoSSH -p /bin/autossh -a "-M 2 -R *:5900:localhost:5900 s...@lanvaux.fr" -y tcpip --type auto -e AUTOSSH_NTSERVICE=yes 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 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.) 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? It is AutoSSH 1.4f Thank you very much! Kind regards; -- Germain Le Chapelain http://lanvaux.fr -- 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