works when I systemctl startrestart, but not on boot?

ovall goal: voctocore (server runs forever) starts, and a client connects,
sends some commands, disconnects.   This should happen any time the server
starts.  on boot, when I systemctrl restart, if the process errors and
systemd restarts it.

voctocore is a live video mixer process that often runs headless.  I have
it set to open a window to monitor the mix process, but in general it
should be treated like a headless server.

There are a few clients that will need to connect once the server is up and
accepting connections.  The one I am using for this post
is voctocore-cmds.py - it sends some config over a network socket.   other
clients: save source and mixed video to disk, stream mix to internet,
monitor audio and alert when problems are detected.


- core starts on boot. good.
- -cmds does not seem to run (bad)
- systemctl restart core - core restarts (good)
- -cmds does not seem to run (consistent)
- systemctl start -cmds - cmds run! (surprising?)
- systemctl restart core - core restarts and -cmds runs! (good)
Here is a dump of all the things.
note: the /usr/bin/date can be removed, no change other than no date in the
logs.

serve voctocore is part of https://github.com/voc/voctomix

client
https://github.com/CarlFK/voctomix-outcasts/blob/master/voctocore-cmds.py

videoteam@gator:~$ sudo systemctl cat  videoteam-voctocore.service
videoteam-voctocore-cmds.service
# /etc/systemd/system/videoteam-voctocore.service
# lifted from cm/bundlewrap/bundles/voctocore/files/voctomix2-voctocore.service
# dest: /usr/local/lib/systemd/system/voctomix2-voctocore.service

[Unit]
Description=ccc voctomix core
After=network.target
After=graphical.target

[Service]
User=videoteam
Group=videoteam

Type=notify
WorkingDirectory=/opt/voctomix2/release
ExecStart=/opt/voctomix2/release/voctocore/voctocore.py -vv --ini-file
/etc/voctomix/voctocore.ini
Restart=always
RestartSec=1s
StartLimitInterval=0

Environment=DISPLAY=:0
; Environment=PIPEWIRE_DEBUG=3,pw.conf:5

[Install]
WantedBy=default.target

# /etc/systemd/system/videoteam-voctocore-cmds.service
# Ansible Managed

[Unit]
Description=Voctomix startup commands

Wants=videoteam-voctocore.service
PartOf=videoteam-voctocore.service

After=videoteam-voctocore.service

[Service]
Type=oneshot
RemainAfterExit=yes

User=videoteam
Group=videoteam

ExecStartPre=/usr/bin/sleep 4
ExecStart=/home/videoteam/voctomix-outcasts/voctocore-cmds.py -v
--delay 2.5 -f /etc/voctomix/vocto.cmds
Nice=10

[Install]
WantedBy=default.target


boot box, voctocore runs, but voctocore-cmds does not:


videoteam@gator:~$ sudo systemctl status videoteam-voctocore.service
videoteam-voctocore-cmds.service
● videoteam-voctocore.service - ccc voctomix core
     Loaded: loaded (/etc/systemd/system/videoteam-voctocore.service;
enabled; preset: enabled)
     Active: active (running) since Thu 2026-04-30 03:32:23 CEST; 10min ago
 Invocation: f3fdc756aa1741458431e869a869039a
   Main PID: 1178 (python3)
      Tasks: 49 (limit: 9103)
     Memory: 83M (peak: 85.4M)
        CPU: 7min 23.214s
     CGroup: /system.slice/videoteam-voctocore.service
             └─1178 python3
/opt/voctomix2/release/voctocore/voctocore.py -vv --ini-file
/etc/voctomix/voctocore.ini

Apr 30 03:32:23 gator voctocore.py[1178]:     INFO AudioMix: Updating
mixer state
Apr 30 03:32:23 gator voctocore.py[1178]:     INFO VideoMix: Request
composite fs(cam1,slides)
Apr 30 03:32:23 gator voctocore.py[1178]: [ALSOFT] (EE) Failed to
connect PipeWire event context (errno: 112)
Apr 30 03:32:23 gator voctocore.py[1178]:     INFO Voctocore: Running.
Waiting for connections....
Apr 30 03:32:23 gator voctocore.py[1178]:     INFO Scene: Pushing 1
frame(s) to source 'cam1' at time 15ms
Apr 30 03:32:23 gator voctocore.py[1178]:     INFO Scene: Pushing 1
frame(s) to source 'slides' at time 15ms
Apr 30 03:32:23 gator voctocore.py[1178]:     INFO Pipeline:
Apr 30 03:32:23 gator voctocore.py[1178]: ====================== UP
AND RUNNING =====================
Apr 30 03:32:23 gator voctocore.py[1178]:     INFO SystemdNotify: READY=1
Apr 30 03:32:23 gator systemd[1]: Started videoteam-voctocore.service
- ccc voctomix core.

○ videoteam-voctocore-cmds.service - Voctomix startup commands
     Loaded: loaded
(/etc/systemd/system/videoteam-voctocore-cmds.service; enabled;
preset: enabled)
     Active: inactive (dead)


manually starting voctocore-cmds works:


videoteam@gator:~$ sudo systemctl start videoteam-voctocore-cmds.service

videoteam@gator:~$ sudo systemctl status videoteam-voctocore-cmds.service
● videoteam-voctocore-cmds.service - Voctomix startup commands
     Loaded: loaded
(/etc/systemd/system/videoteam-voctocore-cmds.service; enabled;
preset: enabled)
     Active: active (exited) since Thu 2026-04-30 03:47:53 CEST; 52s ago
 Invocation: a44c7092f5aa4b32822e87260b83163b
    Process: 5592 ExecStartPre=/usr/bin/sleep 4 (code=exited, status=0/SUCCESS)
    Process: 5626
ExecStart=/home/videoteam/voctomix-outcasts/voctocore-cmds.py -v
--delay 2.5 -f /etc/voctomix/vocto.>
   Main PID: 5626 (code=exited, status=0/SUCCESS)
   Mem peak: 5.9M
        CPU: 89ms

Apr 30 03:47:53 gator voctocore-cmds.py[5626]: composite lec_43(cam1,slides)
Apr 30 03:47:53 gator voctocore-cmds.py[5626]: sending: transition
pip(cam1,slides)
Apr 30 03:47:53 gator voctocore-cmds.py[5626]: composite pip(cam1,slides)
Apr 30 03:47:53 gator voctocore-cmds.py[5626]: sending: transition
pip(slides,cam1)
Apr 30 03:47:53 gator voctocore-cmds.py[5626]: composite pip(slides,cam1)
Apr 30 03:47:53 gator voctocore-cmds.py[5626]: sending: set_stream_blind blinder
Apr 30 03:47:53 gator voctocore-cmds.py[5626]: error unknown command
set_stream_blind
Apr 30 03:47:53 gator voctocore-cmds.py[5626]: sending: set_stream_live
Apr 30 03:47:53 gator voctocore-cmds.py[5626]: error unknown command
set_stream_live
Apr 30 03:47:53 gator systemd[1]: Finished
videoteam-voctocore-cmds.service - Voctomix startup commands.


and now restarting core also restarts -cmds what I expect/want to
happen at boot.

videoteam@gator:~$ sudo systemctl restart videoteam-voctocore.service
(both core and -cmds run )

So, what do?
-- 
Carl K

Reply via email to