Daemon Issues
Daemon Won’t Start
Problem
tomat daemon start fails or daemon exits immediately.
Solution
-
Check if already running:
tomat daemon status # If running, stop first: tomat daemon stop -
Check socket permissions:
ls -la $XDG_RUNTIME_DIR/tomat* # Should show socket and PID files with your user ownership -
Run daemon in foreground to see errors:
tomat daemon run # This shows all output directly -
Check runtime directory:
echo $XDG_RUNTIME_DIR # Should output something like /run/user/1000 # If empty, daemon will fail to start
Daemon Stops Unexpectedly
Problem
Daemon process dies or becomes unresponsive.
Solution
-
Check system logs:
journalctl --user -u tomat.service -f # If using systemd -
Check for multiple instances:
ps aux | grep tomat # Kill any duplicate processes -
Clean up stale files:
rm -f $XDG_RUNTIME_DIR/tomat.sock $XDG_RUNTIME_DIR/tomat.pid tomat daemon start
Permission Errors
Problem
“Permission denied” when accessing socket or PID files.
Solution
-
Check file ownership:
ls -la $XDG_RUNTIME_DIR/tomat* # Files should be owned by your user -
Ensure runtime directory exists:
mkdir -p $XDG_RUNTIME_DIR chmod 700 $XDG_RUNTIME_DIR -
Restart daemon:
tomat daemon stop tomat daemon start