Troubleshooting
Quick Diagnostics
Section titled “Quick Diagnostics”Start with the built-in health check:
astromeshctl doctorIt asks the daemon (GET /v1/system/doctor) for its checks: runtime initialized, each provider’s health, and each configured peer.
For a quick status overview:
astromeshctl statusCommon Issues (All Platforms)
Section titled “Common Issues (All Platforms)”Daemon does not start
Section titled “Daemon does not start”Step 1: Check the daemon logs for errors.
- Linux:
sudo journalctl -u astromeshd -n 50 - macOS:
tail -n 50 /Library/Logs/Astromesh/astromeshd.err.log - Windows: run
astromeshd --foregroundin a terminal to see the output (the service writes no log file)
Step 2: Validate your configuration:
astromeshctl config validate --path /etc/astromeshStep 3: Check for port conflicts. Another process may be using port 8000:
- Linux/macOS:
sudo ss -tlnp | grep 8000orlsof -i :8000 - Windows:
netstat -ano | findstr 8000
Change the port in runtime.yaml or stop the conflicting process.
API returns 503 / connection refused
Section titled “API returns 503 / connection refused”The daemon may still be starting. Wait 10–30 seconds, then:
astromeshctl statuscurl http://localhost:8000/v1/healthIf the daemon is running but the API is not responding, check if the api service is enabled in runtime.yaml:
spec: services: api: true # Must be trueConfiguration syntax error
Section titled “Configuration syntax error”ERROR: Failed to parse /etc/astromesh/runtime.yaml: expected ':', line 5Fix YAML syntax issues, then validate:
astromeshctl config validate --path /etc/astromeshsudo systemctl restart astromeshd # LinuxProvider connection failures
Section titled “Provider connection failures”ERROR: Provider 'ollama' health check failed: Connection refusedVerify the provider is reachable:
# Ollamacurl http://localhost:11434/api/tags
# OpenAIcurl -H "Authorization: Bearer $OPENAI_API_KEY" https://api.openai.com/v1/modelsThe model router circuit breaker opens after 3 consecutive failures (60-second cooldown). Check provider status:
astromeshctl providers listastromeshctl doctorAgent not found
Section titled “Agent not found”{"detail": "Agent 'myagent' not found"}Verify the agent YAML file exists and is valid:
ls /etc/astromesh/agents/ # Linux/macOSls "C:\ProgramData\Astromesh\config\agents\" # Windows
astromeshctl agents listastromeshctl config validate --path /etc/astromeshAgents load at startup; restart the daemon after adding one:
sudo systemctl restart astromeshd # LinuxPermission errors
Section titled “Permission errors”PermissionError: [Errno 13] Permission denied: '/var/lib/astromesh/data/...'Fix ownership (Linux; on macOS the user is _astromesh):
sudo chown -R astromesh:astromesh /var/lib/astromeshsudo chown -R astromesh:astromesh /var/log/astromeshStale PID file (Linux/macOS)
Section titled “Stale PID file (Linux/macOS)”ERROR: PID file exists but process is not runningThe daemon did not shut down cleanly. Remove the stale PID file:
sudo rm /var/lib/astromesh/astromeshd.pidsudo systemctl restart astromeshd # LinuxLinux-Specific
Section titled “Linux-Specific”systemd service fails to start
Section titled “systemd service fails to start”sudo systemctl status astromeshdsudo journalctl -u astromeshd -n 100 --no-pagerCommon causes:
| Error | Fix |
|---|---|
Address already in use | Change port in runtime.yaml or stop conflicting process |
Permission denied | Check file ownership: sudo chown -R astromesh:astromesh /var/lib/astromesh |
No such file or directory | Re-run sudo astromeshctl init |
Failed to parse config | Run astromeshctl config validate and fix YAML |
View systemd logs
Section titled “View systemd logs”# Follow livesudo journalctl -u astromeshd -f
# Last 100 linessudo journalctl -u astromeshd -n 100
# Only errorssudo journalctl -u astromeshd -p err
# Full output without pagersudo journalctl -u astromeshd --no-pagerSELinux denials (RHEL/Fedora)
Section titled “SELinux denials (RHEL/Fedora)”# Check for SELinux denialssudo ausearch -c astromeshd -m avc --ts recent
# Generate and apply local policysudo ausearch -c astromeshd -m avc | audit2allow -M astromesh_localsudo semodule -i astromesh_local.ppmacOS-Specific
Section titled “macOS-Specific”launchd service does not start
Section titled “launchd service does not start”# Check launchd statussudo launchctl list | grep astromesh
# View plist errorssudo launchctl print system/com.astromesh.daemon
# Check logstail -n 100 /Library/Logs/Astromesh/astromeshd.err.logGatekeeper blocks the binary
Section titled “Gatekeeper blocks the binary”sudo xattr -d com.apple.quarantine /usr/local/bin/astromeshdsudo xattr -d com.apple.quarantine /usr/local/bin/astromeshctlOr: System Settings > Privacy & Security > click “Allow Anyway”.
Service not loading on boot
Section titled “Service not loading on boot”Verify the plist is in the system LaunchDaemons directory (not user LaunchAgents):
ls /Library/LaunchDaemons/com.astromesh.daemon.plist
# Reloadsudo launchctl unload /Library/LaunchDaemons/com.astromesh.daemon.plistsudo launchctl load /Library/LaunchDaemons/com.astromesh.daemon.plistWindows-Specific
Section titled “Windows-Specific”Service fails to start
Section titled “Service fails to start”# Check service status (the service is named astromeshd)Get-Service astromeshd
# Not listed? install.ps1 does not register it — see the Windows install guidePowerShell execution policy blocks install
Section titled “PowerShell execution policy blocks install”Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass.\install.ps1Port 8000 in use
Section titled “Port 8000 in use”netstat -ano | findstr :8000# Find the PID, then:Stop-Process -Id <PID>Or change the port in C:\ProgramData\Astromesh\config\runtime.yaml.
astromeshctl not found after install
Section titled “astromeshctl not found after install”The installer adds C:\Program Files\Astromesh\venv\Scripts\ to the system PATH. Open a new terminal (the PATH update takes effect in new sessions):
# Or add manually to current session:$env:Path += ";C:\Program Files\Astromesh\venv\Scripts"Log Locations
Section titled “Log Locations”| Platform | Log Path |
|---|---|
| Linux | journalctl -u astromeshd |
| macOS | /Library/Logs/Astromesh/astromeshd.out.log, astromeshd.err.log |
| Windows | none — run astromeshd --foreground to see output |
Getting More Help
Section titled “Getting More Help”- Run
astromeshctl doctor --jsonand share the output - Check GitHub Issues
- Review the Configuration reference for schema errors
- Check the CLI Reference for command usage