Troubleshooting
Quick Diagnostics
Section titled “Quick Diagnostics”Start with the built-in health check:
astromeshctl doctorThis checks: daemon status, API responsiveness, all provider connections, memory backends, and configuration validity.
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 /var/log/astromesh/astromeshd.log - Windows:
Get-Content "C:\ProgramData\Astromesh\logs\astromeshd.log" -Tail 50
Step 2: Validate your configuration:
astromeshctl config validateStep 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 validatesudo 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 providers healthAgent 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 validateReload agents without restarting:
sudo astromeshctl reloadPermission errors
Section titled “Permission errors”PermissionError: [Errno 13] Permission denied: '/var/lib/astromesh/memory/conversations.db'Fix ownership (Linux/macOS):
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/data/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.astromeshd
# Check logstail -n 100 /var/log/astromesh/astromeshd.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.astromeshd.plist
# Reloadsudo launchctl unload /Library/LaunchDaemons/com.astromesh.astromeshd.plistsudo launchctl load /Library/LaunchDaemons/com.astromesh.astromeshd.plistWindows-Specific
Section titled “Windows-Specific”Service fails to start
Section titled “Service fails to start”# Check service statusGet-Service AstromeshDaemon
# View Event LogGet-EventLog -LogName Application -Source AstromeshDaemon -Newest 20
# View log fileGet-Content "C:\ProgramData\Astromesh\logs\astromeshd.log" -Tail 50PowerShell 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\bin\ 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\bin"Log Locations
Section titled “Log Locations”| Platform | Log Path |
|---|---|
| Linux | /var/log/astromesh/astromeshd.log + journalctl -u astromeshd |
| macOS | /var/log/astromesh/astromeshd.log |
| Windows | C:\ProgramData\Astromesh\logs\astromeshd.log + Windows Event Log |
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