Products > Computers

make tmux & screen able to survive socket failure during session attached

(1/7) > >>

DiTBho:
Usually if a socket error occurs when you re-attach a session you lose what you were doing.

--- Code: ---# screen -R development
do stuff
CTRL A D  ---> de-attach ... (the process runs the background)
...
later
...
# screen -r development ---> re-attach
=====Zaap socket error========

--- End code ---

Socket error might occur due to loss of wifi signal, either because the router or switch is turned off, or because there are serious noises, such as to cause packets to be lost and the tcp/ip timeout to be triggered.

To partially solve this, I am using a RS422 <==> optical-fiber connection between the remote server and the local terminal.
So I am working with GNU/Screen attached to /dev/ttyS3 (uart).

This way my working session survives a socket failure

Is there to do something similar with { screen, tmux }, on /dev/pts ? under ssh?

I can patch/modify/recompile { screen, tmux, whatever ... } from sources  :D

DiTBho:
( GNU/Linux running on both local terminal and remote server )

JohanH:

--- Quote from: DiTBho on January 14, 2025, 10:32:25 pm ---Usually if a socket error occurs when you re-attach a session you lose what you were doing.

--- End quote ---

I don't understand your use case. I've lost connection hundreds of times without losing any work/data, that's the whole point with running screen or tmux on the remote server. I have some vague memory that some socket error would have happened at some point, but it must be more than 10 years ago.

DiTBho:

--- Quote from: JohanH on January 14, 2025, 11:05:19 pm ---I don't understand your use case. I've lost connection hundreds of times without losing any work/data, that's the whole point with running screen or tmux on the remote server. I have some vague memory that some socket error would have happened at some point, but it must be more than 10 years ago.

--- End quote ---

I never noticed it before because I've never had such a poor connection as these days  :-//
As I said:
No problem with detached session. Which is the point of using screen. You put a process in the background.
The problem I have is when a re-attached something and then the ssh-connection is lost.
Mobaxterm on Windows { XP, 10 } exposes the same problem.

DiTBho:
the error rate is up to 40% packets lost  :o :o :o

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod