Skip to content

Troubleshooting

Start with the built-in health check:

Terminal window
astromeshctl doctor

It 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:

Terminal window
astromeshctl status

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 --foreground in a terminal to see the output (the service writes no log file)

Step 2: Validate your configuration:

Terminal window
astromeshctl config validate --path /etc/astromesh

Step 3: Check for port conflicts. Another process may be using port 8000:

  • Linux/macOS: sudo ss -tlnp | grep 8000 or lsof -i :8000
  • Windows: netstat -ano | findstr 8000

Change the port in runtime.yaml or stop the conflicting process.

The daemon may still be starting. Wait 10–30 seconds, then:

Terminal window
astromeshctl status
curl http://localhost:8000/v1/health

If 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 true
ERROR: Failed to parse /etc/astromesh/runtime.yaml: expected ':', line 5

Fix YAML syntax issues, then validate:

Terminal window
astromeshctl config validate --path /etc/astromesh
sudo systemctl restart astromeshd # Linux
ERROR: Provider 'ollama' health check failed: Connection refused

Verify the provider is reachable:

Terminal window
# Ollama
curl http://localhost:11434/api/tags
# OpenAI
curl -H "Authorization: Bearer $OPENAI_API_KEY" https://api.openai.com/v1/models

The model router circuit breaker opens after 3 consecutive failures (60-second cooldown). Check provider status:

Terminal window
astromeshctl providers list
astromeshctl doctor
{"detail": "Agent 'myagent' not found"}

Verify the agent YAML file exists and is valid:

Terminal window
ls /etc/astromesh/agents/ # Linux/macOS
ls "C:\ProgramData\Astromesh\config\agents\" # Windows
astromeshctl agents list
astromeshctl config validate --path /etc/astromesh

Agents load at startup; restart the daemon after adding one:

Terminal window
sudo systemctl restart astromeshd # Linux
PermissionError: [Errno 13] Permission denied: '/var/lib/astromesh/data/...'

Fix ownership (Linux; on macOS the user is _astromesh):

Terminal window
sudo chown -R astromesh:astromesh /var/lib/astromesh
sudo chown -R astromesh:astromesh /var/log/astromesh
ERROR: PID file exists but process is not running

The daemon did not shut down cleanly. Remove the stale PID file:

Terminal window
sudo rm /var/lib/astromesh/astromeshd.pid
sudo systemctl restart astromeshd # Linux

Terminal window
sudo systemctl status astromeshd
sudo journalctl -u astromeshd -n 100 --no-pager

Common causes:

ErrorFix
Address already in useChange port in runtime.yaml or stop conflicting process
Permission deniedCheck file ownership: sudo chown -R astromesh:astromesh /var/lib/astromesh
No such file or directoryRe-run sudo astromeshctl init
Failed to parse configRun astromeshctl config validate and fix YAML
Terminal window
# Follow live
sudo journalctl -u astromeshd -f
# Last 100 lines
sudo journalctl -u astromeshd -n 100
# Only errors
sudo journalctl -u astromeshd -p err
# Full output without pager
sudo journalctl -u astromeshd --no-pager
Terminal window
# Check for SELinux denials
sudo ausearch -c astromeshd -m avc --ts recent
# Generate and apply local policy
sudo ausearch -c astromeshd -m avc | audit2allow -M astromesh_local
sudo semodule -i astromesh_local.pp

Terminal window
# Check launchd status
sudo launchctl list | grep astromesh
# View plist errors
sudo launchctl print system/com.astromesh.daemon
# Check logs
tail -n 100 /Library/Logs/Astromesh/astromeshd.err.log
Terminal window
sudo xattr -d com.apple.quarantine /usr/local/bin/astromeshd
sudo xattr -d com.apple.quarantine /usr/local/bin/astromeshctl

Or: System Settings > Privacy & Security > click “Allow Anyway”.

Verify the plist is in the system LaunchDaemons directory (not user LaunchAgents):

Terminal window
ls /Library/LaunchDaemons/com.astromesh.daemon.plist
# Reload
sudo launchctl unload /Library/LaunchDaemons/com.astromesh.daemon.plist
sudo launchctl load /Library/LaunchDaemons/com.astromesh.daemon.plist

Terminal window
# Check service status (the service is named astromeshd)
Get-Service astromeshd
# Not listed? install.ps1 does not register it — see the Windows install guide

PowerShell execution policy blocks install

Section titled “PowerShell execution policy blocks install”
Terminal window
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\install.ps1
Terminal window
netstat -ano | findstr :8000
# Find the PID, then:
Stop-Process -Id <PID>

Or change the port in C:\ProgramData\Astromesh\config\runtime.yaml.

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):

Terminal window
# Or add manually to current session:
$env:Path += ";C:\Program Files\Astromesh\venv\Scripts"

PlatformLog Path
Linuxjournalctl -u astromeshd
macOS/Library/Logs/Astromesh/astromeshd.out.log, astromeshd.err.log
Windowsnone — run astromeshd --foreground to see output