Troubleshooting
Common issues and solutions for SystemPrompt
On this page
Solutions to common SystemPrompt issues.
Database Issues
Connection Refused
Error: Connection refused (os error 111) or could not connect to server
Solutions:
-
Check PostgreSQL is running:
docker ps | grep postgres # or systemctl status postgresql -
Verify connection settings in your profile:
systemprompt admin config show | grep database -
Check PostgreSQL is accepting connections:
psql -h localhost -U systemprompt -d systemprompt
Migration Failures
Error: migration failed or relation does not exist
Solutions:
-
Check migration status:
systemprompt infra db status -
Re-run migrations:
systemprompt infra db migrate -
For a fresh start (development only):
docker-compose down -v docker-compose up -d systemprompt infra db migrate
SQLx Offline Mode Issues
Error: error returned from database: relation does not exist during build
Solutions:
-
Ensure SQLx cache is generated:
cargo sqlx prepare --workspace -
Build with offline mode:
SQLX_OFFLINE=true cargo build -
Verify
.sqlx/directory exists and is committed.
Authentication Issues
Login Fails
Error: authentication failed or invalid credentials
Solutions:
-
Clear existing session:
systemprompt admin session clear -
Re-login:
systemprompt cloud auth login -
Check browser allows popups for auth flow.
Token Expired
Error: token expired or unauthorized
Solutions:
-
Refresh authentication:
systemprompt cloud auth refresh -
If refresh fails, re-login:
systemprompt cloud auth login
OAuth Scope Errors
Error: insufficient scope or forbidden
Solutions:
-
Check agent/tool requires scope you have:
systemprompt admin agents show <agent_name> -
Verify your user has required roles:
systemprompt admin users show <your_user_id>
MCP Issues
Server Not Found
Error: MCP server not found or 404
Solutions:
-
Check server is registered:
curl http://localhost:3000/api/v1/mcp/registry -
Sync MCP config:
systemprompt cloud sync local mcp --direction to-db -y -
Restart services:
systemprompt infra services restart --all
Tool Execution Fails
Error: tool execution failed or timeout
Solutions:
-
Check MCP server logs:
systemprompt infra logs --service mcp -
Test server directly:
systemprompt plugins mcp test <server_name> -
Verify binary exists and is executable:
ls -la target/release/mcp-*
Claude Desktop Connection
Error: Can't connect from Claude Desktop
Solutions:
-
Verify SystemPrompt is running:
curl http://localhost:3000/health -
Check Claude Desktop config:
{ "mcpServers": { "your-server": { "url": "http://localhost:3000/api/v1/mcp/your-server/mcp", "transport": "streamable-http" } } } -
Restart Claude Desktop after config changes.
Build Issues
Cargo Build Fails
Error: Compilation errors
Solutions:
-
Ensure Rust 1.75+:
rustc --version rustup update -
Clean and rebuild:
cargo clean cargo build -
Update dependencies:
cargo update
Extension Not Loading
Error: Extension not discovered at runtime
Solutions:
-
Verify
register_extension!macro is present. -
Ensure crate is linked in
Cargo.toml. -
Check for
use extension_crate as _;in main.
Content Issues
Content Not Syncing
Error: Content changes not appearing
Solutions:
-
Sync content to database:
systemprompt cloud sync local content --direction to-db -y -
Check content directory:
ls -la services/content/ -
Verify frontmatter is valid YAML.
404 on Published Content
Error: Content returns 404 after publishing
Solutions:
-
Publish content job:
systemprompt infra jobs run publish_content -
Check content is marked public:
public: true -
Verify URL pattern matches slug.
Performance Issues
Slow Queries
Solutions:
-
Check database indexes:
SELECT indexname, tablename FROM pg_indexes WHERE schemaname = 'public'; -
Increase connection pool:
database: pool: max_connections: 20 -
Enable query logging to find slow queries.
High Memory Usage
Solutions:
-
Check service memory:
docker stats -
Reduce connection pool if not needed.
-
Set memory limits in Docker Compose.
Getting Help
If these solutions don't resolve your issue:
- Check GitHub Issues
- Search existing discussions
- Open a new issue with:
- SystemPrompt version (
systemprompt --version) - Error message and stack trace
- Steps to reproduce
- Relevant configuration (without secrets)
- SystemPrompt version (