Service Management Troubleshooting
systemd Service Fails to Start
Problem
systemctl --user start tomat.service fails.
Solution
-
Check service file location:
ls -la $XDG_CONFIG_HOME/systemd/user/tomat.service -
Verify service file content:
cat $XDG_CONFIG_HOME/systemd/user/tomat.service # Should contain: ExecStart=%h/.cargo/bin/tomat daemon run -
Check service status:
systemctl --user status tomat.service journalctl --user -u tomat.service -f -
Reload systemd configuration:
systemctl --user daemon-reload systemctl --user restart tomat.service
Service Starts But Daemon Not Accessible
Problem
Service is running but tomat status fails.
Solution
-
Check if daemon is actually running:
ps aux | grep tomat -
Verify socket creation:
ls -la $XDG_RUNTIME_DIR/tomat.sock -
Check service logs:
journalctl --user -u tomat.service --no-pager
LaunchAgent Fails to Start
On macOS, inspect the loaded service and its error log:
launchctl print gui/$UID/io.github.jolars.tomat
tail -n 100 ~/Library/Logs/tomat.log
If the plist points to a binary that was moved or removed, reinstall it from the binary’s new location:
tomat daemon install --force
The macOS socket is beneath the per-user temporary directory:
ls -la "${TMPDIR}tomat-$(id -u)/tomat.sock"
Enable Debug Output
Problem
Need to see detailed daemon output for debugging.
Solution
Run daemon in foreground to see all output:
tomat daemon stop
tomat daemon run # Shows all debug output