Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Service Management Troubleshooting

systemd Service Fails to Start

Problem

systemctl --user start tomat.service fails.

Solution

  1. Check service file location:

    ls -la $XDG_CONFIG_HOME/systemd/user/tomat.service
    
  2. Verify service file content:

    cat $XDG_CONFIG_HOME/systemd/user/tomat.service
    # Should contain: ExecStart=%h/.cargo/bin/tomat daemon run
    
  3. Check service status:

    systemctl --user status tomat.service
    journalctl --user -u tomat.service -f
    
  4. 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

  1. Check if daemon is actually running:

    ps aux | grep tomat
    
  2. Verify socket creation:

    ls -la $XDG_RUNTIME_DIR/tomat.sock
    
  3. 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