ttys 1-2 have disappeared

Asked by jgreenso

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 8.10
Release: 8.10
Codename: intrepid

We got to our console only to find no prompt, and it echo back what we typed.

We managed to log in by switching ttys to one that had a login prompt.

Next:

$ ps ax | grep getty
 4342 tty4 Ss+ 0:00 /sbin/getty 38400 tty4
 4343 tty5 Ss+ 0:00 /sbin/getty 38400 tty5
 4347 tty3 Ss+ 0:00 /sbin/getty 38400 tty3
 4349 tty6 Ss+ 0:00 /sbin/getty 38400 tty6
20146 pts/3 R+ 0:00 grep getty

~$ ls -l /etc/event.d/
total 76
-rw-r--r-- 1 root root 260 2008-09-30 00:54 control-alt-delete
-rw-r--r-- 1 root root 299 2008-09-30 00:54 logd
-rw-r--r-- 1 root root 552 2008-09-30 00:54 rc0
-rw-r--r-- 1 root root 342 2008-09-30 00:54 rc1
-rw-r--r-- 1 root root 403 2008-09-30 00:54 rc2
-rw-r--r-- 1 root root 403 2008-09-30 00:54 rc3
-rw-r--r-- 1 root root 403 2008-09-30 00:54 rc4
-rw-r--r-- 1 root root 403 2008-09-30 00:54 rc5
-rw-r--r-- 1 root root 422 2008-09-30 00:54 rc6
-rw-r--r-- 1 root root 485 2008-09-30 00:54 rc-default
-rw-r--r-- 1 root root 392 2008-09-30 00:54 rcS
-rw-r--r-- 1 root root 575 2008-09-30 00:54 rcS-sulogin
-rw-r--r-- 1 root root 558 2008-09-30 00:54 sulogin
-rw-r--r-- 1 root root 306 2008-09-30 00:54 tty1
-rw-r--r-- 1 root root 300 2008-09-30 00:54 tty2
-rw-r--r-- 1 root root 300 2008-09-30 00:54 tty3
-rw-r--r-- 1 root root 300 2008-09-30 00:54 tty4
-rw-r--r-- 1 root root 300 2008-09-30 00:54 tty5
-rw-r--r-- 1 root root 300 2008-09-30 00:54 tty6

$ cat /etc/event.d/tty1
# tty1 - getty
#
# This service maintains a getty on tty1 from the point the system is
# started until it is shut down again.

start on stopped rc2
start on stopped rc3
start on stopped rc4
start on stopped rc5

stop on runlevel 0
stop on runlevel 1
stop on runlevel 6

respawn
exec /sbin/getty 38400 tty1

There's nothing in /var/log/ (grepped for 'getty').

Any ideas why these ttys would have disappeared and regardless how does one restart them in a safe way (it's a production LAMP box)?

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
jgreenso (james-green-mjog) said :
#1

This is more serious than first thought.

As we control+d the console to log out it does not respawn. An ssh session proves that our account has been logged out (no more bash on that tty). However no new login prompt is visible.

We therefore have three more console logs left before we have to either reboot or restart some script somewhere.

Revision history for this message
jgreenso (james-green-mjog) said :
#2

Output of sudo initctl list:

control-alt-delete (stop) waiting
logd (stop) waiting
rc-default (stop) waiting
rc0 (stop) waiting
rc1 (stop) waiting
rc2 (stop) waiting
rc3 (stop) waiting
rc4 (stop) waiting
rc5 (stop) waiting
rc6 (stop) waiting
rcS (stop) waiting
rcS-sulogin (stop) waiting
sulogin (stop) waiting
tty1 (stop) waiting
tty2 (stop) waiting
tty3 (stop) waiting
tty4 (stop) waiting
tty5 (stop) waiting
tty6 (stop) waiting

And runlevel:
N 2

Compare that with another working 8.10 server. Same runlevel output, different initctl list:

control-alt-delete (stop) waiting
last-good-boot (stop) waiting
logd (stop) waiting
rc-default (stop) waiting
rc0 (stop) waiting
rc1 (stop) waiting
rc2 (stop) waiting
rc3 (stop) waiting
rc4 (stop) waiting
rc5 (stop) waiting
rc6 (stop) waiting
rcS (stop) waiting
rcS-sulogin (stop) waiting
sulogin (stop) waiting
tty1 (start) running, process 4739
tty2 (start) running, process 4126
tty3 (start) running, process 4129
tty4 (start) running, process 4116
tty5 (start) running, process 4117
tty6 (start) running, process 4131

Revision history for this message
Jari Pennanen (jari-pennanen) said :
#3

To restart ttys do this
"sudo start tty1"
"sudo start tty2"

Revision history for this message
Jari Pennanen (jari-pennanen) said :
#4

Sorry for not mentioning,

Reason they disappear is because something has caused the respawning thing to die or not allowed to start. I have this same problem, I had to restart using "sudo start tty1"... tty6, all the ttys to get them respawn again.

You can try if you have same respawn problem by ctrl+alt+F3 (assuming tty3 is still alive) and logging in, and logout, if you don't get getty, you definitely have same problem.

This might be bug, http://ubuntuforums.org/showthread.php?t=1058964

Revision history for this message
CR (ubuntu-glass-box) said :
#5

I'm running Ubuntu Server 8.10 and see the same problem - quite a killer actually as it's not respawning the serial console tty - and if the network is not up, I have no way to "sudo start ttyS0" without physically going to the console - defeating the purpose of having a serial console!

Any idea why the respawn stuff is not happening? - it's kind of broken for a "server" system...

Revision history for this message
jgreenso (james-green-mjog) said :
#6

I have created a bug report for this issue: https://bugs.launchpad.net/ubuntu/+bug/330004

Revision history for this message
Launchpad Janitor (janitor) said :
#7

This question was expired because it remained in the 'Open' state without activity for the last 15 days.