Configuring Serial over LAN - Can't login on ttyS0

Latest response

I am setting up SoL on Cisco UCS, I have everything working great up to the point when I try to login, as both root and non-root user.   I have verified that speed, flow control, and term emulation match between my BIOS settings and /etc/init/ttyS0.conf.   I can enter the BIOS screens and the grub menu, but I just can't login.  I'm wondering if SElinux might be blocking it.

 

I'm also having an issue with 5.5, in this case I can login fine but the startup messages are a stream of control charaxters.

 

I have followed the KB article.

https://access.redhat.com/knowledge/articles/7212

 

Any thoughts?

 

Karl Vietmeier

Responses

SELinux shouldn't be blocking this. I use serial console all the time on RHEL4, RHEL5 and RHEL6 virtual machines (following How do I set up a guest so that the virsh and xm console commands work for my KVM or Xen guests on RHEL?) and they all have SELinux enabled in enforcing mode.

 

What RHEL version are you using? (Major and minor version please — 6.1 had a known issue; cf. Why do I unable to login from serial console with plymouth details plugin from Red Hat Enterprise Linux 6.1?) Do you get the system boot messages on the serial console? Do you get a login prompt on the serial console? If so, what error message is reported when you try to log in on it? Are there any related entries in /var/log/messages that could shed light on this?

 

As for the issue on 5.5, does removing "rhgb" (or "rhgb quiet") from the kernel command line / GRUB config help?

Hello,

 

Is ttyS0 listed in /etc/securetty ?

 

-- Pai

Version:

cat redhat-releaseRed Hat Enterprise Linux Server release 6.3 (Santiago)

Red Hat Enterprise Linux Server release 6.3 (Santiago)

2.6.32-279.2.1.el6.x86_64


I have the fix for the 6.1 issue.

plymouth-0.8.3-24.el6.x86_64



I have noticed that the port is opening and closing constantly:

Nov  9 15:05:54 phx2-dc-echorhev01 init: serial (ttyS0) main process (30120) terminated with status 1

Nov  9 15:05:54 phx2-dc-echorhev01 init: serial (ttyS0) main process ended, respawning

Nov  9 15:08:44 phx2-dc-echorhev01 init: ttyS0 main process ended, respawning

Nov  9 15:08:54 phx2-dc-echorhev01 init: serial (ttyS0) main process (30256) terminated with status 1

Nov  9 15:08:54 phx2-dc-echorhev01 init: serial (ttyS0) main process ended, respawning

Nov  9 15:11:44 phx2-dc-echorhev01 init: ttyS0 main process ended, respawning

Nov  9 15:11:54 phx2-dc-echorhev01 init: serial (ttyS0) main process (30390) terminated with status 1

Nov  9 15:11:54 phx2-dc-echorhev01 init: serial (ttyS0) main process ended, respawning

Nov  9 15:14:44 phx2-dc-echorhev01 init: ttyS0 main process ended, respawning

Nov  9 15:14:54 phx2-dc-echorhev01 init: serial (ttyS0) main process (30527) terminated with status 1

Nov  9 15:14:54 phx2-dc-echorhev01 init: serial (ttyS0) main process ended, respawning

Nov  9 15:17:44 phx2-dc-echorhev01 init: ttyS0 main process ended, respawning

Nov  9 15:17:54 phx2-dc-echorhev01 init: serial (ttyS0) main process (30660) terminated with status 1

Nov  9 15:17:54 phx2-dc-echorhev01 init: serial (ttyS0) main process ended, respawning

Nov  9 15:20:44 phx2-dc-echorhev01 init: ttyS0 main process ended, respawning

Nov  9 15:20:54 phx2-dc-echorhev01 init: serial (ttyS0) main process (30794) terminated with status 1

Nov  9 15:20:54 phx2-dc-echorhev01 init: serial (ttyS0) main process ended, respawning

Nov  9 15:23:44 phx2-dc-echorhev01 init: ttyS0 main process ended, respawning

Nov  9 15:23:54 phx2-dc-echorhev01 init: serial (ttyS0) main process (30931) terminated with status 1

Nov  9 15:23:54 phx2-dc-echorhev01 init: serial (ttyS0) main process ended, respawning

Nov  9 15:26:44 phx2-dc-echorhev01 init: ttyS0 main process ended, respawning

Nov  9 15:26:54 phx2-dc-echorhev01 init: serial (ttyS0) main process (31068) terminated with status 1

Nov  9 15:26:54 phx2-dc-echorhev01 init: serial (ttyS0) main process ended, respawning

Nov  9 15:29:44 phx2-dc-echorhev01 init: ttyS0 main process ended, respawning

Nov  9 15:29:54 phx2-dc-echorhev01 init: serial (ttyS0) main process (31204) terminated with status 1



[root@phx2-dc-echorhev01 etc]# tail -f /var/log/messages

Nov  9 15:17:54 phx2-dc-echorhev01 init: serial (ttyS0) main process ended, respawning

Nov  9 15:20:44 phx2-dc-echorhev01 init: ttyS0 main process ended, respawning

Nov  9 15:20:54 phx2-dc-echorhev01 init: serial (ttyS0) main process (30794) terminated with status 1

Nov  9 15:20:54 phx2-dc-echorhev01 init: serial (ttyS0) main process ended, respawning

Nov  9 15:23:44 phx2-dc-echorhev01 init: ttyS0 main process ended, respawning

Nov  9 15:23:54 phx2-dc-echorhev01 init: serial (ttyS0) main process (30931) terminated with status 1

Nov  9 15:23:54 phx2-dc-echorhev01 init: serial (ttyS0) main process ended, respawning

Nov  9 15:26:44 phx2-dc-echorhev01 init: ttyS0 main process ended, respawning

Nov  9 15:26:54 phx2-dc-echorhev01 init: serial (ttyS0) main process (31068) terminated with status 1

Nov  9 15:26:54 phx2-dc-echorhev01 init: serial (ttyS0) main process ended, respawning

Nov  9 15:29:44 phx2-dc-echorhev01 init: ttyS0 main process ended, respawning

Nov  9 15:29:54 phx2-dc-echorhev01 init: serial (ttyS0) main process (31204) terminated with status 1

Nov  9 15:29:54 phx2-dc-echorhev01 init: serial (ttyS0) main process ended, respawning


And when I run "initctl reload-configuration" I get a file not found error on /etc/init.conf

Nov  9 15:31:51 phx2-dc-echorhev01 init: /etc/init.conf: Unable to load configuration: No such file or directory


And ttyS0 is in /etc/securetty

Removed rhgb quiet from grub.conf, but same beahvior persists on 5.5

I see the grub menu and BIOS screens just fine, I can enter both and navigate different screens.  When the login prompt comes up and I try to login I get "login failed".

The constant respawning seen in your messages log is definitely not a good sign. I'm afraid that I can't tell from the available data what is causing this. I would recommend to open a support case for this issue and to add a detailed sosreport (as generated e.g. by "sosreport -k rpm.rpmva -k selinux.fixfiles -k startup.servicestatus") to it as a basis for analysis.

Problem solved!

Turns out, like most of these types of things, it was stupidly simple, once I figured it out.

The key:

In 6.3 once you add the "console=ttyS0,115200" parameter to the kernel boot string in grub.conf, there is nothing else you need to do.   Upstart will detect that ttyS0 is being used and create the appropriate device and agetty instance.  Including adding ttyS0 to /etc/securetty.  

I had created a /etc/init/serial-ttyS0.conf file which created a conflicting /dev/ttyS0 process.   When I removed it and killed the extra agetty PID, everything started working. 

So - if you want/need to change the parameters of the ttyS0 sessoin you simply edit the agetty command in /etc/init/serial.conf.   The KB article and the serial.conf comments are somewhat misleading.

 

In the end, SoL works great for accessing UCS Blades, in fact, I kind of prefer it since I rarely use Virtual Media anyway.

 

 

 

The 5.5 issue resolved as well, simple syntax issue.

Fix:  You cannot have a space between the ttyS0 and speed parameters.

Karl, thanks so much for sharing your findings! I'll follow-up with our Knowledge team about needed revisions to the KB article.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.