[SOLVED] Reboot server and get on lxc Server refused to allocate pty

Bidi

Renowned Member
Feb 12, 2016
109
2
83
37
Hello guys,

I just rebooted the server and now when i turned on all the lxc on it i get Server refused to allocate pty
Before i reboot it i stoped the lxc manualy and after i rebooted it.

The big think is i`m able to login using winscp but putty no, and if i enter on the server and after on the lxc pct enter 100 is working the server but when i try to open some apps is not working.

itryed even with but is not working :( can anyone help me ?
  1. Enter to VPS, edit /etc/rc.sysinit
  2. Find /sbin/start_udev then comment out: #/sbin/start_udev
  3. Reboot VPS
When i trey screen to run on the server i get

[root@2 home]# screen
Cannot access '/dev/pts/2': No such file or directory
[root@2 home]#

[root@2 pts]# echo "" > 2 bash: 2: Read-only file system

I had proxmox 5.2 and update it to proxmox 5.3
 
Last edited:
Please post the config of one affected container.
Which OS-version is the container running?
Is there by any chance a `/etc/fstab` inside the container? - If yes please post its contents
 
Finaly founded the problem.

The VPS was migrated long time ago from proxmox 3.5 now after i update from 5.2 to 5.3...etc all the openvz migrated on proxmox 5 they dont like the new kernel so i migrate them all back to proxmox 3.5

What i dont understand is why it just not updateing the kernel on the lxc or to keep them working or if is there a way to fix this cuz i whant them to migrate them back to v5 but with the curent kernel not old one
 
Proxmox VE 3.x has been EOL for quite long now. I would not recommend to keep your containers running there!
If the containers worked with PVE 5.2 then they should work with PVE 5.3 - I guess you have `devpts` somewhere in the containers `/etc/fstab` - and this is not needed and does not work with LXC 3.0.1 and newer.
 
Proxmox VE 3.x has been EOL for quite long now. I would not recommend to keep your containers running there!
If the containers worked with PVE 5.2 then they should work with PVE 5.3 - I guess you have `devpts` somewhere in the containers `/etc/fstab` - and this is not needed and does not work with LXC 3.0.1 and newer.


Yes i got this
none /dev/pts devpts rw,gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0

If i remove it dose it will work on 5.3 ?
"Proxmox VE 3.x has been EOL for quite long now." I know but i dont have any other options because i`m not able to migrate them to proxmox 5.3 because of the problem mentioned so i`m sort of stuck there with some server with 3.4/3.5
 
Can't guarantee that it will work - but it's one of the solutions which helps in those cases - so try to remove both lines and start the container again.

Else our documentation regarding migrating from OpenVZ to LXC was focussed on PVE 3.x and 4.x but check it out in case the problem remains:
https://pve.proxmox.com/wiki/Convert_OpenVZ_to_LXC
 
Can't guarantee that it will work - but it's one of the solutions which helps in those cases - so try to remove both lines and start the container again.

Else our documentation regarding migrating from OpenVZ to LXC was focussed on PVE 3.x and 4.x but check it out in case the problem remains:
https://pve.proxmox.com/wiki/Convert_OpenVZ_to_LXC


Just tested and i work, centos openvz from proxmox 3.4 restored on 5.3 erased fstab and all normal now

Thank you
 
You're welcome - glad it worked out!

Please mark the thread as SOLVED, so that others know what to expect! - Thanks
 
Proxmox VE 3.x has been EOL for quite long now. I would not recommend to keep your containers running there!
If the containers worked with PVE 5.2 then they should work with PVE 5.3 - I guess you have `devpts` somewhere in the containers `/etc/fstab` - and this is not needed and does not work with LXC 3.0.1 and newer.

Commenting to point out that fstab indeed contains a devpts rule if you migrate a centos 6 openvz container to proxmox 5.3. Having this rule was no problem untill recently but commenting this line out works seems to aid in a solution.
 
  • Like
Reactions: hk@
I get the same error : "Server refused to allocate pty" when I try to log in to SSH. As the /etc/fstab in my lxc container (migrated from Proxmox 3.1) is completely empty, not sure why i am getting this error.

I am also unable to log in to the Console in the gui. It just hangs.

Inside the container I have these devpts'es and tty entries.

Code:
root@vsr5 [~]# mount| grep devpts
devpts on /dev/lxc/console type devpts (rw,relatime,mode=600,ptmxmode=000)
devpts on /dev/console type devpts (rw,relatime,mode=600,ptmxmode=000)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1024)
devpts on /dev/ptmx type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1024)
devpts on /dev/lxc/tty1 type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1024)
devpts on /dev/lxc/tty2 type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1024)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1024)

---

root@vsr5 [~]# ll /dev
crw-rw-rw-  1 root root   5,  0 Dec  2 17:52 tty
lrwxrwxrwx  1 root root       8 Dec  2 17:52 tty1 -> lxc/tty1
lrwxrwxrwx  1 root root       8 Dec  2 17:52 tty2 -> lxc/tty2

---

root@vsr5 [~]# ll /dev/lxc
total 0
drwxr-xr-x 2 root root    100 Dec  2 17:04 ./
drwxr-xr-x 4 root root    420 Dec  2 17:04 ../
c--x--x--- 1 root root 136, 1 Dec  2 17:04 console
crw--w---- 1 root root 136, 0 Dec  2 17:04 tty1
crw--w---- 1 root root 136, 1 Dec  2 17:04 tty2


On the Proxmox 6 node, I just have this:

Code:
root@pmx5:~# mount | grep devpts
devpts on /dev/pts type devpts (rw,relatime,mode=600,ptmxmode=000)
---
root@pmx5:~# mount | grep shm
tmpfs on /dev/shm type tmpfs (rw)
 
Proxmox VE 3.x has been EOL for quite long now. I would not recommend to keep your containers running there!
If the containers worked with PVE 5.2 then they should work with PVE 5.3 - I guess you have `devpts` somewhere in the containers `/etc/fstab` - and this is not needed and does not work with LXC 3.0.1 and newer.

>> I guess you have `devpts` somewhere in the container

Where should I be looking for devpts other than in /etc/fstab?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!