Reputation: 136665
When I try to resume a screen session with
$ screen -r name
I get
WriteMessage: Bad file descriptor
How can I fix that? (Ideally being able to resume the screen, but at least remove it if resuming is not possible)
The problem why it occurs might be that the SSH connection was interrupted.
Upvotes: 8
Views: 2682
Reputation: 27611
I got this error when trying to detach all screens with screen -D
. I had attached the screen with
screen -R screen-name-here
To detach, I needed to specify the screen name:
screen -D screen-name-here
Upvotes: 0
Reputation: 691
This worked for me:
screen -R
screen -r <pid>
instead of screen -r <name>
If the screen didn't detach from previous ssh session, you might also need to kill dead sshd process.
Upvotes: 5