GNU screen - Unable to reattach to screen after lost connection

I was using irssi in screen but lost connection. After I ssh'd back in to the server, I can no longer attach to that screen. screen -ls shows that the screen is already attached.

I tried screen -D to force detach it, and it said detach but screen -ls still says it's attached. I tried screen -x and it just hangs there.

[sub@server ~]$ screen -ls 
There are screens on:
 4033.poe (Detached)
 7728.irssi (Attached)
2 Sockets in /var/run/screen/S-sub.

What can I do now?


If you are trying to connect the 'Attached' screen, then run screen -xr irssi. The uppercase '-X' sends a command to one of the screen sessions, the lowercase '-x' option allows you to reconnect to an attached session. But you still need to give the session name since there is more than one.


I have cleared this behavior up in the past by killing the shell that started the screen session. Basically, killing all bash instances for my user that were not owned by screen.


You gave it a non-default name. Try this: screen -RD irssi