SSH Problem "stdin: is not a tty" - CentOS 6 LXC

Mario Aldayuz

Member
Feb 9, 2016
39
4
8
34
Greensboro, NC
First problem:

I have one out of several containers that recently began displaying the following error when trying to SSH:

Code:
stdin: is not a tty

Following some Google advice I did the following:

Code:
root@node1:~# ssh {IP ADRESS} /bin/bash -i
root@{IP ADDRESS}'s password:
stdin: is not a tty
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
stdin: is not a tty

I've checked the logs and can't find anything too out of the ordinary.

This is the output of
Code:
lsof /dev/pts/*

Code:
root@ct100 [~]# lsof /dev/pts/*
lsof /dev/pts/*
COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
mingetty  1346 root    0u   CHR  136,1      0t0    4 /dev/pts/1
mingetty  1346 root    1u   CHR  136,1      0t0    4 /dev/pts/1
mingetty  1346 root    2u   CHR  136,1      0t0    4 /dev/pts/1
mingetty  1348 root    0u   CHR  136,2      0t0    5 /dev/pts/2
mingetty  1348 root    1u   CHR  136,2      0t0    5 /dev/pts/2
mingetty  1348 root    2u   CHR  136,2      0t0    5 /dev/pts/2
mingetty  1350 root    0u   CHR  136,3      0t0    6 /dev/pts/3
mingetty  1350 root    1u   CHR  136,3      0t0    6 /dev/pts/3
mingetty  1350 root    2u   CHR  136,3      0t0    6 /dev/pts/3
mingetty  1352 root    0u   CHR  136,4      0t0    7 /dev/pts/4
mingetty  1352 root    1u   CHR  136,4      0t0    7 /dev/pts/4
mingetty  1352 root    2u   CHR  136,4      0t0    7 /dev/pts/4
mingetty  1354 root    0u   CHR  136,5      0t0    8 /dev/pts/5
mingetty  1354 root    1u   CHR  136,5      0t0    8 /dev/pts/5
mingetty  1354 root    2u   CHR  136,5      0t0    8 /dev/pts/5
bash      1396 root    0u   CHR  136,1      0t0    4 /dev/pts/1
bash      1396 root    1u   CHR  136,1      0t0    4 /dev/pts/1
bash      1396 root    2u   CHR  136,1      0t0    4 /dev/pts/1
bash      1396 root  255u   CHR  136,1      0t0    4 /dev/pts/1
bash      1444 root    0u   CHR  136,0      0t0    3 /dev/pts/0
bash      1444 root    1u   CHR  136,0      0t0    3 /dev/pts/0
bash      1444 root    2u   CHR  136,0      0t0    3 /dev/pts/0
bash      1444 root  255u   CHR  136,0      0t0    3 /dev/pts/0
bash      1535 root    0u   CHR  136,4      0t0    7 /dev/pts/4
bash      1535 root    1u   CHR  136,4      0t0    7 /dev/pts/4
bash      1535 root    2u   CHR  136,4      0t0    7 /dev/pts/4
bash      1535 root  255u   CHR  136,4      0t0    7 /dev/pts/4
bash      1738 root    0u   CHR  136,4      0t0    7 /dev/pts/4
bash      1738 root    1u   CHR  136,4      0t0    7 /dev/pts/4
bash      1738 root    2u   CHR  136,4      0t0    7 /dev/pts/4
bash      1738 root  255u   CHR  136,4      0t0    7 /dev/pts/4
bash     26339 root    0u   CHR  136,1      0t0    4 /dev/pts/1
bash     26339 root    1u   CHR  136,1      0t0    4 /dev/pts/1
bash     26339 root    2u   CHR  136,1      0t0    4 /dev/pts/1
bash     26339 root  255u   CHR  136,1      0t0    4 /dev/pts/1

Second (related) problem:

Same container when trying to access the console (in tty mode) via the Proxmox web interface does not have a display for extended periods of time. When I up the tty count to 6 (max) it works better.

The two problems appear to be related and happened unexpectedly after the node and containers were restarted. Other containers on the same node with the exact same parameters do not have this issue, so I think I've got it down to being a problem inside the LXC container. This is a production container...so I can't really migrate everyone off until I figure out exactly what the issue is.
 
TTT - Need assistance - issue still not resolved. Would prefer to find the root cause and repair without having to migrate data out of the container and import to new install.
 
In addition to this topic. If you experience this error "Server refused to allocate pty" while connecting with SSH to the container, try the following. From the host-node connect to the container with the following command: "pct enter [container-ID]". Then edit /etc/rc.sysinit and look for this line: /sbin/start_udev
Remove that line and restart the container and you might be good to go!
This problem occured to me when migrating openvz templates based on centos 6 to Proxmox VE4.

Regards,
Ruben

FYI - this resolved the issue.
 
+1 - This fixed the issue for me too. It was driving me nutty - thank you Ruben!
Just edit /etc/rc.d/rc.sysinit and comment out the line that says: /sbin/start_udev - then re-boot the container.
Bingo!
 
Not working for me... Backup a centos6 LXC container from Prox4.4 and restored on Prox5.2. Commented or not commented the line, after reboot still having the "stdin: is not a tty" message and cannot ssh to the container.
Any help?
 
Thanks janos. I will try. But my case was from LXC on Prox4.4 to LXC Prox5.2. Not OpenVZ to LXC.
 

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!