SystemD Services
The startup of Wonder is handled by SystemD services. There are two possible ways to do this. Because of JACK Wonder's services must be run as a specific user.
Templated User Services (Recommended)
The recommended way of setting up the system is using the OSC-Kreuz as cWonder replacement, and start multiple tWonder services using a tWonder target filled with the amount of twonders you need:
/etc/systemd/user/twonder.target:
[Unit]
Description=Twonders
# add all required twonders here
Requires= twonder@0.service twonder@1.service twonder@2.service twonder@3.service
[Install]
WantedBy=default.target
systemctl --user stop twonder.target
User services
CWonder and TWonder have a service unit installed that can be started, stopped, enabled and disabled.
systemctl --user start cwonder.service
systemctl --user stop twonder.service
systemctl --user enable twonder.service
Status and Logs
The current status of a systemd service can be obtained by:
systemctl --user status cwonder.service
If more log history is wanted, journalctl can be used:
journalctl --user -xeu cwonder.service
Startup order
Originally Wonder depended on the startup order of its components. A lot of work was invested getting Wonder more resilient to restarts of parts of the system. TWonder can be restarted without the need of restarting CWonder. When CWonder gets restarted it tries to reconnect all TWonder nodes from the last run.
The startup order of CWonder and JFWonder should look as follows:
- JACK server
- CWonder
- a possible error is that you have cwonder already running and you can not start another osc server using the same port
- JFWonder
- will try and connect to the jack server
- a possible error is that the jackd is not running or as a differnt user and you do not have the priviligies to connect to
- will try to connect to cwonder
- a possible error is that cwonder is not running, jfwonder will then wait for a second and retry to connect. After a certain number of retries (100) without beeing able to connect jfwonder will exit.
- will try and connect to the jack server
If CWonder gets restarted, JFwonder needs to be restarted as well in order to get the timing information.