Active Shell Session | Unable to close

Apr 14, 2022
4
0
1
Since Feb 14th, we've had an open Shell listed in Tasks that I'm unable to close. I do not see any active users in any of our nodes besides myself. Not sure what to do, but I would like to remove it.

Below are screenshots that show what pops up when I try to stop the session: 'Unable to open file - No such file or directory' followed by an error on the status screen.

Node and username redacted.

1649938924887.png

1649938715395.png
1649938952640.png
 

Attachments

  • 1649938504089.png
    1649938504089.png
    9 KB · Views: 10
You should be able to tell whether there is actually an open session since Feb 14th by issuing who while logged in as root on the node. If there is actually a corresponding session you should investigate what is running (and why), with ps -A | grep <tty-id> and with ps auxwf | grep <tty-id> to see what depends on what. If you can find a process, and if it isn't running anything important you should be able to kill it with the kill <pid> command.

Nonetheless, this is still a rather bizarre error. It seems the underlying log file disappeared for some reason which should prompt it to display an error, not indicate that there is still a running terminal process. Which pve version are you running? pveversion -v
 
Last edited:
Yeah I ran who and there isn't anyone else logged in besides me. I've been having other issues getting the firewall to work as well which I'll be creating threads for as weeks of searching hasn't helped me yet.

Here is the output of pveversion -v:

proxmox-ve: 7.1-1 (running kernel: 5.13.19-2-pve)
pve-manager: 7.1-10 (running version: 7.1-10/6ddebafe)
pve-kernel-helper: 7.1-8
pve-kernel-5.13: 7.1-6
pve-kernel-5.11: 7.0-10
pve-kernel-5.13.19-3-pve: 5.13.19-7
pve-kernel-5.13.19-2-pve: 5.13.19-4
pve-kernel-5.13.19-1-pve: 5.13.19-3
pve-kernel-5.11.22-7-pve: 5.11.22-12
pve-kernel-5.11.22-5-pve: 5.11.22-10
pve-kernel-5.11.22-1-pve: 5.11.22-2
ceph-fuse: 15.2.13-pve1
corosync: 3.1.5-pve2
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown2: 3.1.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.22-pve2
libproxmox-acme-perl: 1.4.1
libproxmox-backup-qemu0: 1.2.0-1
libpve-access-control: 7.1-5
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.1-2
libpve-guest-common-perl: 4.0-3
libpve-http-server-perl: 4.1-1
libpve-storage-perl: 7.0-15
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 4.0.11-1
lxcfs: 4.0.11-pve1
novnc-pve: 1.3.0-1
proxmox-backup-client: 2.1.3-1
proxmox-backup-file-restore: 2.1.3-1
proxmox-mini-journalreader: 1.3-1
proxmox-widget-toolkit: 3.4-5
pve-cluster: 7.1-3
pve-container: 4.1-3
pve-docs: 7.1-2
pve-edk2-firmware: 3.20210831-2
pve-firewall: 4.2-5
pve-firmware: 3.3-4
pve-ha-manager: 3.3-1
pve-i18n: 2.6-2
pve-qemu-kvm: 6.1.0-3
pve-xtermjs: 4.12.0-1
qemu-server: 7.1-4
smartmontools: 7.2-1
spiceterm: 3.2-2
swtpm: 0.7.0~rc1+2
vncterm: 1.7-1
zfsutils-linux: 2.1.2-pve1
 
This problem exists even now in 2025.

I have shells open since oct 2024 and nov 2024.

how do I find the tty value for the below commands. who reports only me logged in and nobody else.

ps -A | grep <tty-id> and with ps auxwf | grep <tty-id>

I understand i can kill the task but how do I find which task is it ?

1737261717440.png

1737262104260.png
 
Seeing this as well. I currently see root (my user account) with 2 shells open at all times, on localhost.

If I go into the actual web shell, there are three open sessions. My terminal is a bit squished right now, but it looks like this:
1737263906194.png

pts/0 and pts/2 are the mysterious ones.

In both cases, vncshell is holding them open, without any errors.
1737264047558.png

I just popped over to a VM configured to use the web VNC for interaction, and clicking into that opened a new item in the task associated with that VM in the description, which then stopped cleanly when I clicked away, so this is something else.

A bit more digging with ps:
1737264291385.png

I have a monitor plugged into my PVE node, and even with the monitor turned off, I suppose it could be generating a login prompt, which would account for one of those. Also, the getty@tty1.service is active.

I've also got a serial port (a real, DE-9 one), hooked up to a terminal server and set up to provide a serial console for the node. serial-getty@ttyS0.service is active.

So, in my case, I'm guessing the output of the Tasks window is technically correct. I have two local shell sessions active. It just looks odd to see them hanging there. Are they supposed to hang open like that even if I'm not logged in on those ttys?
 
Got mine solved finally.

did a
#ps -eaX
got the output - found 2 nos. ssh daemons running - dont know why they were there - but it was a ssh to another host - not done by us but proxmox for sure. - killing them worked and now I have no unknown terminal / tasks running
 

Attachments

  • 1737270760586.png
    1737270760586.png
    36.4 KB · Views: 6
  • 1737270793509.png
    1737270793509.png
    20.5 KB · Views: 5
Seeing this as well. I currently see root (my user account) with 2 shells open at all times, on localhost.

If I go into the actual web shell, there are three open sessions. My terminal is a bit squished right now, but it looks like this:
View attachment 80973

pts/0 and pts/2 are the mysterious ones.

In both cases, vncshell is holding them open, without any errors.
View attachment 80974

I just popped over to a VM configured to use the web VNC for interaction, and clicking into that opened a new item in the task associated with that VM in the description, which then stopped cleanly when I clicked away, so this is something else.

A bit more digging with ps:
View attachment 80975

I have a monitor plugged into my PVE node, and even with the monitor turned off, I suppose it could be generating a login prompt, which would account for one of those. Also, the getty@tty1.service is active.

I've also got a serial port (a real, DE-9 one), hooked up to a terminal server and set up to provide a serial console for the node. serial-getty@ttyS0.service is active.

So, in my case, I'm guessing the output of the Tasks window is technically correct. I have two local shell sessions active. It just looks odd to see them hanging there. Are they supposed to hang open like that even if I'm not logged in on those ttys?


just do - ps -eaX

if you find any other tty apart from pts/0 - kill thoes unknown processes (if you have no other session running) and you should be ok

1737271900256.png