mobile-shell / mosh

Mobile Shell
https://mosh.org
GNU General Public License v3.0
12.7k stars 743 forks source link

Mosh unexpectedly shutting down (client side) on OSX #1317

Closed andrewlow closed 7 months ago

andrewlow commented 8 months ago

I'm a long term user of mosh. Thank you for creating and maintaining such an useful tool.

I've run mosh on multiple servers and multiple clients for years.

Recently - and it may be since the most recent OSX Sonoma update (14.3.1) -- every once in a while, my mac will disconnect (all?) of my mosh sessions. This may be related to my machine going to sleep / changing networks.

I get the following output on the client side

mosh did not shut down cleanly. Please note that the
mosh-server process may still be running on the server.
[mosh is exiting.]

The session is orphaned on the server side. When I re-connect to the same machine using mosh, I am informed there is a disconnected session.

In the past - I've run mosh on the same OSX machine for weeks, across multiple networks.

At first I thought this was possibly a version problem, as my client install was older (1.35?) .. but I've since updated to the latest version

% mosh --version
mosh 1.4.0 [build mosh-1.4.0]
Copyright 2012 Keith Winstein <mosh-devel@mit.edu>
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

What steps do I take to further gather evidence as to what is happening to the client side mosh?

andrewlow commented 8 months ago

It if helps - when the disconnect happens (and I think it's related to closing my laptop lid and the machine hitting some sort of sleep state) -- all of my mosh sessions appear to exit.

Multiple mosh clients connected to multiple different servers. Including one that is a virtual machine that is hosted locally using UTM.

achernya commented 8 months ago

Can you reproduce on a different Mac? This sounds like something in your system is killing mosh.

andrewlow commented 7 months ago

Unfortunately trying to reproduce on a different Mac is impractical, but I do acknowledge that this may be something unique to my system install.

Maybe I can dig out the culprit in the system logs. I'll look there. [ugh.. no luck so fare in the standard logs]

andrewlow commented 7 months ago

and.. the problem has gone away.. closing

Very mysterious, but clearly a ghost in the machine.

mgolub2 commented 2 months ago

I also have this issue - randomly, all of my mosh connections close on the client side, leaving all the severs up and sessions disconnected. I noticed it start happening after I switched from tailscale to ZeroTier, but I also updated mosh and a bunch of other things at the same time...

I also have little snitch running, which might be a culprit?