TTY error on CentOS 6 container

Hey,

I’m not sure if this is a bug, that’s why i’ll ask here first.

I’ve seen in all of my centos 6 containers the following error in /var/log/messages

Nov 2 16:37:07 web init: tty (console) main process (17253) terminated with status 1
Nov 2 16:37:07 web init: tty (console) main process ended, respawning
Nov 2 16:37:07 web init: tty (/dev/tty[1-6]) main process (17254) terminated with status 1
Nov 2 16:37:07 web init: tty (/dev/tty[1-6]) main process ended, respawning
Nov 2 16:37:07 web /sbin/mingetty[17256]: console: vhangup() failed
Nov 2 16:37:07 web /sbin/mingetty[17257]: tty[1-6]: No such file or directory

Is this a LXD/LXC/LXCFS bug or something that i haven’t setup correctly?

Thanks!

Latest versions of ubuntu (host machine) lxd and lxcfs.

If a clean centos6 template is used it will be reproduces.

LXD doesn’t configure ttys by default only the container’s /dev/console but there seems to be an init job to run gettys and they are complaining about missing ttys. It’s not serious at all.

Yeah, I know it is not serious, i’ve running over an year like this :slight_smile: :slight_smile: :slight_smile:

But developers are logging some application logs in /var/log/messages and it is bugging them and they are bugging me

Is there some work around or?

I’ve found a “solution”
open /etc/init/tty.conf
and comment out

respawn
instance $TTY
exec /sbin/mingetty $TTY

The logs stopped.

I will watch over closely if some regressions occur.

1 Like

I’d recommend:

echo manual > /etc/init/start-ttys.override
reboot

That should disable the upstart job that spawns those.

Hmm, or not, I wonder if the upstart version in centos is too old for that…

Working alternative:

echo ACTIVE_CONSOLES= >> /etc/sysconfig/init
reboot