The console interface is not functioning properly

This error occurred when I configured:set system console device ttyS0 speed 9600
commit;

[ system console ]
Traceback (most recent call last):
  File "/usr/libexec/vyos/services/vyos-configd", line 146, in run_script
    script.apply(c)
  File "/usr/libexec/vyos//conf_mode/system_console.py", line 128, in apply
    restart_login_consoles(prompt_user=False, quiet=False)
  File "/usr/lib/python3/dist-packages/vyos/utils/serial.py", line 113, in restart_login_consoles
    cmd(f'systemctl restart {unit_name}')
  File "/usr/lib/python3/dist-packages/vyos/utils/process.py", line 189, in cmd
    raise OSError(code, feedback)
PermissionError: [Errno 1] failed to run command: None systemctl restart [email protected]
returned: 
exit code: 1

You tell us nothing about the hardware, nor the version of VyOS you have.

Do you have a serial port on ttyS0?
What version of VyOS etc.


image

I’m on 1.4.2 and for me, /dev/ttyS0 is owned as follows:

root@ferrari:/home/tim# ls -la /dev/ttyS0
crw--w---- 1 root tty 4, 64 Apr  7 05:22 /dev/ttyS0

You could try the following:

sudo chown root.tty /dev/ttyS0

and see if that makes a difference.

Either way I think this probably needs a bug logged.

The problem persists:
root@vyos-A:~# chown root:tty /dev/ttyS0
root@vyos-A:~# ls -l /dev/ttyS0
crw-rw---- 1 root tty 4, 64 May 29 17:04 /dev/ttyS0

root@vyos-A:~# systemctl status [email protected]
[email protected] - Serial Getty on ttyS0
Loaded: loaded (/run/systemd/system/[email protected]; enabled; preset: enabled)
Drop-In: /etc/systemd/system/[email protected]
└─aftervyos.conf
Active: inactive (dead)
Docs: man:agetty(8)
man:systemd-getty-generator(8)
systemd for Administrators, Part XVI

May 29 17:04:07 vyos-A systemd[1]: [email protected]: Bound to unit dev-ttyS0.device, but unit isn’t active.
May 29 17:04:07 vyos-A systemd[1]: Dependency failed for Serial Getty on ttyS0.
May 29 17:04:07 vyos-A systemd[1]: [email protected]: Job [email protected]/start failed with result ‘dependency’.
Jun 11 00:39:20 vyos-A systemd[1]: [email protected]: Bound to unit dev-ttyS0.device, but unit isn’t active.
Jun 11 00:39:20 vyos-A systemd[1]: Dependency failed for Serial Getty on ttyS0.
Jun 11 00:39:20 vyos-A systemd[1]: [email protected]: Job [email protected]/start failed with result ‘dependency’.
root@vyos-A:~# systemctl start [email protected]

So it is some customer build issue, or the platform doesn’t have serial devices
Something similar for ARM was here ⚓ T7484 ARM64 config fails to commit due to ttyS0 console

1 Like

systemctl status [email protected]
[email protected] - Serial Getty on ttyAMA0
Loaded: loaded (/lib/systemd/system/[email protected]; enabled-runtime; preset: enabled)
Drop-In: /etc/systemd/system/[email protected]
└─aftervyos.conf
Active: active (running) since Mon 2025-06-16 11:51:15 CST; 1s ago
Docs: man:agetty(8)
man:systemd-getty-generator(8)
systemd for Administrators, Part XVI
Process: 6356 ExecStartPre=/usr/libexec/vyos/init/vyos-config SERIAL (code=exited, status=0/SUCCESS)
Main PID: 6358 (agetty)
Tasks: 1 (limit: 9426)
Memory: 188.0K
CPU: 9ms
CGroup: /system.slice/system-serial\x2dgetty.slice/[email protected]
└─6358 /sbin/agetty -o “-p – \u” --keep-baud 115200,57600,38400,9600 - vt220

Jun 16 11:51:15 vyos-A systemd[1]: Started Serial Getty on ttyAMA0.
Is the arm64 architecture the default serial port interface for ttyAMA0?