Troubleshooting guide
This guide provides solutions for common issues you might encounter when using CodeGate with various AI coding assistants and agents.
General troubleshooting steps
Before diving into specific issues, try these general troubleshooting steps:
-
Check logs: Run
docker logs codegate
to view recent logs ordocker logs --follow codegate
to watch logs in real-time. -
Increase log verbosity: Restart CodeGate with increased logging level:
docker rm -f codegate
docker run --name codegate -d -p 8989:8989 -p 9090:9090 -p 8990:8990 \
-e CODEGATE_APP_LOG_LEVEL=DEBUG \
--mount type=volume,src=codegate_volume,dst=/app/codegate_volume \
--restart unless-stopped ghcr.io/stacklok/codegate:latest -
Verify connectivity: Ensure the CodeGate API is accessible:
curl http://localhost:8989/health
-
Check version: Ensure you're running the latest version of CodeGate:
docker pull ghcr.io/stacklok/codegate:latest
Muxing issues
"Provider models could not be found" error
This error might occur when adding a new provider or updating an existing one. It indicates that CodeGate is unable to discover the available models for the provider.
Possible causes:
- The provider API endpoint is incorrect
- The provider is not running or accessible
- Your API key is invalid or missing
Solutions:
- Verify the provider API endpoint is correct in the CodeGate settings
- Ensure the provider is running and accessible from the CodeGate container
- For local providers (Ollama, LM Studio), ensure you're using
http://host.docker.internal
instead oflocalhost
- Check your authentication credentials (API key) for the provider
- Check the logs for specific error messages related to the provider connection
File pattern matching problems
If your file patterns aren't matching as expected:
- Use wildcards appropriately:
*.js
matches only.js
files, while*.js*
matches both.js
and.jsx
- For nested directories, patterns only match the filename, not the path
- Test your patterns with simple rules first before creating complex configurations
- If a specific file is causing issues, try a more specific rule for that file type
Dashboard issues
Dashboard not showing events or alerts
If events or alerts are not appearing in the dashboard:
- Verify you're looking at the correct workspace
- Check if the events were recorded by examining the logs
- Try switching workspaces and then switching back
- Restart the CodeGate container if the issue persists
"An error occurred" message
If the dashboard fails to load or shows an error:
-
Refresh the page to see if it resolves the issue
-
Ensure the CodeGate API is accessible:
curl http://localhost:8989/health
-
Verify the database is not corrupted by checking the logs
-
If you are running CodeGate remotely, ensure
DASHBOARD_BASE_API_URL
is correctly set to point to your CodeGate API (see run CodeGate on a remote host)
If you're still experiencing issues, open an issue on GitHub with details about the problem, including logs and steps to reproduce. It's also helpful to include details from the Developer Tools in your browser (usually accessible with F12) to see if there are any network errors or JavaScript errors in the console.
CLI and configuration issues
CLI not responding until model is online
The CodeGate CLI may appear to hang when using local models that need to be loaded.
Solutions:
- Check if you're using a local model provider like Ollama that may be loading a model
- Verify the model server is running and accessible
- Consider using a different model that loads faster for CLI operations
- Increase the log level to DEBUG to see what's happening during the delay
Workspace management issues
If you're having trouble with workspaces:
- Ensure you're activating the correct workspace before starting work
- Use
codegate workspace list
to verify available workspaces
Network and connectivity issues
Remote host configuration
If you're running CodeGate on a remote host:
- Ensure you've set
DASHBOARD_BASE_API_URL
correctly to point to your CodeGate API - Verify that your firewall allows connections to the required ports
- For Copilot integration, ensure the HTTPS proxy port is accessible and the certificate is trusted
Docker networking issues
If you're experiencing networking issues with Docker:
- Verify that the container ports are correctly mapped to your host
- For local providers like Ollama, ensure
host.docker.internal
resolves correctly - On Linux, you may need to add
--add-host=host.docker.internal:host-gateway
to yourdocker run
command
Still need help?
If you're still experiencing issues:
- Search the GitHub Issues for similar problems
- Join our Discord server to ask for help from the community
- Open a new issue on GitHub with detailed information about your problem, including logs and steps to reproduce