answer
June 11, 2025, 12:54am
1
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
tjh
June 11, 2025, 2:35am
2
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.
tjh
June 11, 2025, 2:52am
4
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.
answer
June 11, 2025, 3:02am
5
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
answer
June 16, 2025, 7:50am
7
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?