No prompt for containers

kgolick

New Member
Nov 13, 2016
5
1
1
39
Hi,

I encounter some problems when I want to use the console feature for a container.
The prompt does not appear. The only text that I see on the screen is: "
Connected to tty 1
Type <Ctrl+a q> to exit the console, <Ctrl+a Ctrl+a> to enter Ctrl+a itself
"

Apparently the same thing happens if I go to the pve machine and try to lxc-console on the container. lxc-attach works fine.

From what I tested this happens on: Ubuntu 16.04 and Debian 8.0 containers.
I've tested also Ubuntu 14.04 / Centos 7 containers and they work fine.

If there is other info that can help, just let me know and i'll put-it here.

Edit: If I wait 5-6 minutes they start to work. They are no other containers / processes on the machine, so the cpu usage is 0%. On the Ubuntu 14.04 / Centos 7 it works instantly.

Thank you!
 

Attachments

  • Screenshot from 2016-11-13 02:48:33.png
    Screenshot from 2016-11-13 02:48:33.png
    42 KB · Views: 80
Last edited:
Sometimes the inittab or systemd-init-stuff is not filled appropriate to start those consoles. Please log in to the container with pct enter <VMID> and check the /etc/inittab and post the output of ps auxf.
 
Sometimes the inittab or systemd-init-stuff is not filled appropriate to start those consoles. Please log in to the container with pct enter <VMID> and check the /etc/inittab and post the output of ps auxf.

Hello,
Thank you for your reply!

pct console <vmid> didn't worked,
but pct enter <vmid> worked

ps auxf output (in the first 5 minutes, when it doesn't work):
root@aaa:~# ps auxf
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 204 0.0 0.6 18272 3376 ? Ss 11:25 0:00 /bin/bash
root 214 0.0 0.5 34424 2936 ? R+ 11:25 0:00 \_ ps auxf
root 1 0.0 1.0 37152 5252 ? Ss 11:24 0:00 /sbin/init
root 39 0.0 1.0 35276 5328 ? Ss 11:24 0:00 /lib/systemd/systemd-journald
root 71 0.0 0.3 4416 1632 ? Ss 11:24 0:00 /sbin/ifup -a --read-environment
root 197 0.0 0.1 4508 788 ? S 11:24 0:00 \_ /bin/sh -c /sbin/dhclient -1 -6 -pf /run/dhclient6.eth0.pid -lf /var/lib/dhcp/dhclient6.eth0.leases -I -df /var/lib/dhcp/dhclient.eth0.leases eth0
root 198 0.0 0.7 16120 3736 ? S 11:24 0:00 \_ /sbin/dhclient -1 -6 -pf /run/dhclient6.eth0.pid -lf /var/lib/dhcp/dhclient6.eth0.leases -I -df /var/lib/dhcp/dhclient.eth0.leases eth0
root 102 0.0 1.0 272836 5544 ? Ssl 11:24 0:00 /usr/lib/accountsservice/accounts-daemon
syslog 103 0.0 0.5 256396 3144 ? Ssl 11:24 0:00 /usr/sbin/rsyslogd -n
root 104 0.0 0.2 20100 1272 ? Ss 11:24 0:00 /lib/systemd/systemd-logind
root 111 0.0 0.4 26068 2588 ? Ss 11:24 0:00 /usr/sbin/cron -f
message+ 112 0.0 0.7 42892 3892 ? Ss 11:24 0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
root 131 0.0 0.3 4508 1796 ? S 11:24 0:00 /bin/sh /etc/init.d/ondemand background
root 136 0.0 0.1 4380 804 ? S 11:24 0:00 \_ sleep 60
root 163 0.0 0.1 16120 856 ? Ss 11:24 0:00 /sbin/dhclient -1 -v -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases -I -df /var/lib/dhcp/dhclient6.eth0.leases eth0


ps auxf output (after 5 minutes, when it works):
root@aaa:~# ps auxf
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 204 0.0 0.6 18272 3380 ? Ss 11:25 0:00 /bin/bash
root 353 0.0 0.5 34424 2952 ? R+ 11:31 0:00 \_ ps auxf
root 1 0.0 1.0 37152 5252 ? Ss 11:24 0:00 /sbin/init
root 39 0.0 1.0 35276 5648 ? Ss 11:24 0:00 /lib/systemd/systemd-journald
root 102 0.0 1.1 272836 5788 ? Ssl 11:24 0:00 /usr/lib/accountsservice/accounts-daemon
syslog 103 0.0 0.5 256396 3144 ? Ssl 11:24 0:00 /usr/sbin/rsyslogd -n
root 104 0.0 0.2 20100 1272 ? Ss 11:24 0:00 /lib/systemd/systemd-logind
root 111 0.0 0.4 26068 2588 ? Ss 11:24 0:00 /usr/sbin/cron -f
message+ 112 0.0 0.7 42892 3892 ? Ss 11:24 0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
root 226 0.0 1.1 65612 6168 ? Ss 11:29 0:00 /usr/sbin/sshd -D
root 229 0.0 0.3 12844 1864 pts/1 Ss+ 11:29 0:00 /sbin/agetty --noclear --keep-baud pts/1 115200 38400 9600 vt220
root 231 0.0 0.3 12844 1860 lxc/console Ss+ 11:29 0:00 /sbin/agetty --noclear --keep-baud console 115200 38400 9600 vt220
root 232 0.0 0.3 12844 1848 pts/0 Ss+ 11:29 0:00 /sbin/agetty --noclear --keep-baud pts/0 115200 38400 9600 vt220
root 344 0.0 0.8 65408 4396 ? Ss 11:29 0:00 /usr/lib/postfix/sbin/master
postfix 346 0.0 0.8 67476 4400 ? S 11:29 0:00 \_ pickup -l -t unix -u -c
postfix 347 0.0 0.8 67524 4396 ? S 11:29 0:00 \_ qmgr -l -t unix -u

About /etc/inittab I can't find this.

Thank you!
 
Yes, the *getty are the processes I was looking for. It seems that your system needs a lot of time to boot properly. It can also be seen with postfix, which is not there in your first ps output. You need to find out about the ondemand service which sleeps at least once 60 seconds.
 
Yes, the *getty are the processes I was looking for. It seems that your system needs a lot of time to boot properly. It can also be seen with postfix, which is not there in your first ps output. You need to find out about the ondemand service which sleeps at least once 60 seconds.

Apparently if I pct enter <vmid> and kill this:

root 83 0.0 0.3 4416 1776 ? Ss 11:37 0:00 /sbin/ifup -a --read-environment
root 209 0.0 0.1 4508 756 ? S 11:37 0:00 \_ /bin/sh -c /sbin/dhclient -1 -6 -pf /run/dhclient6.eth0.pid -lf /var/lib/dhcp/dhclient6.eth0.leases -I -df /var/lib/dhcp/dhclient.eth0.leases eth0
root 210 0.0 0.7 16120 3728 ? S 11:37 0:00 \_ /sbin/dhclient -1 -6 -pf /run/dhclient6.eth0.pid -lf /var/lib/dhcp/dhclient6.eth0.leases -I -df /var/lib/dhcp/dhclient.eth0.leases eth0

I can ssh or use the console instantly.
 
I know the problem with IPv6 DHCP.
When you dont need IPv6, set IPv6 to Static in the CT config and leave the fields empty, that should deactivate IPv6 and solve the problem.
In addition you can deactivate IPv6 in your conatiner:

echo "net.ipv6.conf.all.disable_ipv6 = 1" > /etc/sysctl.d/01-disable-ipv6.conf
sed -i -e '$i \echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6\n' /etc/rc.local
 

Attachments

  • Zwischenablage05.jpg
    Zwischenablage05.jpg
    25.1 KB · Views: 34
I know the problem with IPv6 DHCP.
When you dont need IPv6, set IPv6 to Static in the CT config and leave the fields empty, that should deactivate IPv6 and solve the problem.
In addition you can deactivate IPv6 in your conatiner:

echo "net.ipv6.conf.all.disable_ipv6 = 1" > /etc/sysctl.d/01-disable-ipv6.conf
sed -i -e '$i \echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6\n' /etc/rc.local
Thank you very much!
This solved the problem!
 
  • Like
Reactions: neonmaus
Strange, I never have to set this to static because my default here is static. Maybe it depends on the container itself.
 

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!