|
| 1 | +--- |
| 2 | +title: Troubleshooting guide |
| 3 | +description: Solutions for common CodeGate issues |
| 4 | +sidebar_position: 40 |
| 5 | +--- |
| 6 | + |
| 7 | +This guide provides solutions for common issues you might encounter when using |
| 8 | +CodeGate with various AI coding assistants and agents. |
| 9 | + |
| 10 | +## General troubleshooting steps |
| 11 | + |
| 12 | +Before diving into specific issues, try these general troubleshooting steps: |
| 13 | + |
| 14 | +1. **Check logs**: Run `docker logs codegate` to view recent logs or |
| 15 | + `docker logs --follow codegate` to watch logs in real-time. |
| 16 | + |
| 17 | +2. **Increase log verbosity**: Restart CodeGate with increased logging level: |
| 18 | + |
| 19 | + ```bash |
| 20 | + docker rm -f codegate |
| 21 | + docker run --name codegate -d -p 8989:8989 -p 9090:9090 -p 8990:8990 \ |
| 22 | + -e CODEGATE_APP_LOG_LEVEL=DEBUG \ |
| 23 | + --mount type=volume,src=codegate_volume,dst=/app/codegate_volume \ |
| 24 | + --restart unless-stopped ghcr.io/stacklok/codegate:latest |
| 25 | + ``` |
| 26 | + |
| 27 | +3. **Verify connectivity**: Ensure the CodeGate API is accessible: |
| 28 | + |
| 29 | + ```bash |
| 30 | + curl http://localhost:8989/health |
| 31 | + ``` |
| 32 | + |
| 33 | +4. **Check version**: Ensure you're running the latest version of CodeGate: |
| 34 | + |
| 35 | + ```bash |
| 36 | + docker pull ghcr.io/stacklok/codegate:latest |
| 37 | + ``` |
| 38 | + |
| 39 | +## Muxing issues |
| 40 | + |
| 41 | +### "Provider models could not be found" error |
| 42 | + |
| 43 | +This error might occur when adding a new provider or updating an existing one. |
| 44 | +It indicates that CodeGate is unable to discover the available models for the |
| 45 | +provider. |
| 46 | + |
| 47 | +**Possible causes:** |
| 48 | + |
| 49 | +- The provider API endpoint is incorrect |
| 50 | +- The provider is not running or accessible |
| 51 | +- Your API key is invalid or missing |
| 52 | + |
| 53 | +**Solutions:** |
| 54 | + |
| 55 | +1. Verify the provider API endpoint is correct in the CodeGate settings |
| 56 | +2. Ensure the provider is running and accessible from the CodeGate container |
| 57 | +3. For local providers (Ollama, LM Studio), ensure you're using |
| 58 | + `http://host.docker.internal` instead of `localhost` |
| 59 | +4. Check your authentication credentials (API key) for the provider |
| 60 | +5. Check the logs for specific error messages related to the provider connection |
| 61 | + |
| 62 | +### File pattern matching problems |
| 63 | + |
| 64 | +If your file patterns aren't matching as expected: |
| 65 | + |
| 66 | +1. Use wildcards appropriately: `*.js` matches only `.js` files, while `*.js*` |
| 67 | + matches both `.js` and `.jsx` |
| 68 | +2. For nested directories, patterns only match the filename, not the path |
| 69 | +3. Test your patterns with simple rules first before creating complex |
| 70 | + configurations |
| 71 | +4. If a specific file is causing issues, try a more specific rule for that file |
| 72 | + type |
| 73 | + |
| 74 | +## Dashboard issues |
| 75 | + |
| 76 | +### Dashboard not showing events or alerts |
| 77 | + |
| 78 | +If events or alerts are not appearing in the dashboard: |
| 79 | + |
| 80 | +1. Verify you're looking at the correct workspace |
| 81 | +2. Check if the events were recorded by examining the logs |
| 82 | +3. Try switching workspaces and then switching back |
| 83 | +4. Restart the CodeGate container if the issue persists |
| 84 | + |
| 85 | +### "An error occurred" message |
| 86 | + |
| 87 | +If the dashboard fails to load or shows an error: |
| 88 | + |
| 89 | +1. Refresh the page to see if it resolves the issue |
| 90 | +2. Ensure the CodeGate API is accessible: |
| 91 | + |
| 92 | + ```bash |
| 93 | + curl http://localhost:8989/health |
| 94 | + ``` |
| 95 | + |
| 96 | +3. Verify the database is not corrupted by checking the logs |
| 97 | +4. If you are running CodeGate remotely, ensure `DASHBOARD_BASE_API_URL` is |
| 98 | + correctly set to point to your CodeGate API (see |
| 99 | + [run CodeGate on a remote host](./configure.md#run-on-remote-host)) |
| 100 | + |
| 101 | +If you're still experiencing issues, open an issue on GitHub with details about |
| 102 | +the problem, including logs and steps to reproduce. It's also helpful to include |
| 103 | +details from the Developer Tools in your browser (usually accessible with F12) |
| 104 | +to see if there are any network errors or JavaScript errors in the console. |
| 105 | + |
| 106 | +## CLI and configuration issues |
| 107 | + |
| 108 | +### CLI not responding until model is online |
| 109 | + |
| 110 | +The CodeGate CLI may appear to hang when using local models that need to be |
| 111 | +loaded. |
| 112 | + |
| 113 | +**Solutions:** |
| 114 | + |
| 115 | +1. Check if you're using a local model provider like Ollama that may be loading |
| 116 | + a model |
| 117 | +2. Verify the model server is running and accessible |
| 118 | +3. Consider using a different model that loads faster for CLI operations |
| 119 | +4. Increase the log level to DEBUG to see what's happening during the delay |
| 120 | + |
| 121 | +### Workspace management issues |
| 122 | + |
| 123 | +If you're having trouble with workspaces: |
| 124 | + |
| 125 | +1. Ensure you're activating the correct workspace before starting work |
| 126 | +2. Use `codegate workspace list` to verify available workspaces |
| 127 | + |
| 128 | +## Network and connectivity issues |
| 129 | + |
| 130 | +### Remote host configuration |
| 131 | + |
| 132 | +If you're running CodeGate on a remote host: |
| 133 | + |
| 134 | +1. Ensure you've set `DASHBOARD_BASE_API_URL` correctly to point to your |
| 135 | + CodeGate API |
| 136 | +2. Verify that your firewall allows connections to the required ports |
| 137 | +3. For Copilot integration, ensure the HTTPS proxy port is accessible and the |
| 138 | + certificate is trusted |
| 139 | + |
| 140 | +### Docker networking issues |
| 141 | + |
| 142 | +If you're experiencing networking issues with Docker: |
| 143 | + |
| 144 | +1. Verify that the container ports are correctly mapped to your host |
| 145 | +2. For local providers like Ollama, ensure `host.docker.internal` resolves |
| 146 | + correctly |
| 147 | +3. On Linux, you may need to add `--add-host=host.docker.internal:host-gateway` |
| 148 | + to your `docker run` command |
| 149 | + |
| 150 | +## Still need help? |
| 151 | + |
| 152 | +If you're still experiencing issues: |
| 153 | + |
| 154 | +1. Search the [GitHub Issues](https://github.com/stacklok/codegate/issues) for |
| 155 | + similar problems |
| 156 | +2. Join our [Discord server](https://discord.gg/stacklok) to ask for help from |
| 157 | + the community |
| 158 | +3. Open a new issue on GitHub with detailed information about your problem, |
| 159 | + including logs and steps to reproduce |
0 commit comments