Troubleshooting
Common issues and their solutions.
Agent Issues
Agent won't start
Symptoms: systemctl status ssi-agent shows failed state
Solutions:
-
Check the logs:
bash1journalctl -u ssi-agent -n 50 -
Verify configuration file:
bash1python3 -m json.tool /etc/ssi-agent/config.json -
Check if agent is registered:
bash1ssi whoami
Agent not connecting to backend
Symptoms: Agent running but no data in mobile app
Solutions:
-
Verify backend URL:
bash1cat /etc/ssi-agent/config.json | grep backend_url -
Test connectivity:
bash1curl -I https://api.service-status-indicator.com/api/health/ -
Check for firewall issues:
bash1sudo iptables -L -n -
Restart the agent:
bash1sudo systemctl restart ssi-agent
Registration fails
Symptoms: ssi register times out or fails
Solutions:
- Check network connectivity to backend
- Verify backend URL is correct
- Check backend logs for errors
- Try again after a few minutes
Service Script Issues
Service not running on schedule
Symptoms: Timer exists but script never executes
Solutions:
-
Check timer status:
bash1systemctl list-timers | grep ssi_ -
Verify timer is enabled:
bash1systemctl is-enabled ssi_my_service.timer -
Check service status:
bash1systemctl status ssi_my_service.service -
Reload systemd:
bash1sudo systemctl daemon-reload
Script runs but status not reported
Symptoms: Log file has output but no update in app
Solutions:
-
Check output format matches expected:
YYYY-MM-DD HH:MM:SS, STATUS, Message -
Verify log file exists:
bash1ls -la /var/log/ssi-agent/ -
Check agent is watching the file:
bash1journalctl -u ssi-agent | grep my_service
"Service script must be a .bash file"
Solution: Rename your script with .bash extension:
1mv my-script.sh my-script.bash"Service name must be between 3 and 60 characters"
Solution: Update the # name: field in your script.
"Invalid schedule format"
Solution: Verify your schedule using:
1systemd-analyze calendar "your-schedule-here"Permission Issues
"Permission denied" when adding service
Solutions:
-
Check you're in the admin group:
bash1groups -
Use sudo if needed:
bash1sudo ssi add my-script.bash
Can't write to log directory
Solutions:
-
Check permissions:
bash1ls -la /var/log/ssi-agent/ -
Fix ownership:
bash1sudo chown -R ssi-agent:ssi-agent /var/log/ssi-agent/
Log Inspection
View agent daemon logs
1journalctl -u ssi-agent -fView service script logs
1tail -f /var/log/ssi-agent/<service_id>.logView systemd timer logs
1journalctl -u ssi_<service_id>.timer
2journalctl -u ssi_<service_id>.serviceReset and Recovery
Completely reset agent
1# Unregister
2ssi unregister
3
4# Re-register
5ssi register
6
7# Restart
8sudo systemctl restart ssi-agentForce remove broken service
1ssi remove broken_service --forceReinstall agent
1cd ssi-agent
2sudo ./install.sh --remove
3sudo ./install.sh