Skip to main content
This guide covers common issues you may encounter when operating OpenSandbox and provides solutions for debugging and resolving them.

Server Issues

Symptoms:
  • Server exits immediately after starting
  • Error messages about configuration
  • Port binding failures
Common Causes & Solutions:1. Configuration file not found
2. Port already in use
3. Invalid configuration syntax
4. Docker daemon not accessible
Symptoms:
  • 401 Unauthorized responses
  • “Invalid API key” errors
Solutions:1. API key not configured
2. Missing header in requests
3. Disable auth for development
Diagnosis:
Solutions:
  • Verify server is fully started (check logs for “Application startup complete”)
  • Check for runtime initialization errors
  • Ensure Docker/Kubernetes runtime is accessible
  • Review log_level in configuration for more details

Sandbox Creation Issues

Symptoms:
  • Sandbox never transitions to Running
  • Status remains Pending for extended period
Debugging Steps:1. Check sandbox status
Look for status.reason and status.message fields.2. Common causes:Image pull failures:
Solutions:
  • Verify image exists: docker pull python:3.11-slim
  • Check image registry credentials
  • Use full image URI including registry
Resource constraints:
  • Insufficient CPU/memory on host
  • Resource limits too high
  • Pool capacity exceeded
Solutions:
3. Enable debug logging
Restart server and review detailed logs.
Error:
Solutions:1. Empty entrypoint array
2. Missing entrypoint entirely
Error:
Solution:1. Configure egress sidecar
2. Pull egress image
3. Verify bridge mode
  • Network policies NOT supported in host mode
  • Must use network_mode = "bridge"
Common Errors:Invalid CPU format:
Invalid memory format:
Valid formats:
  • CPU: "100m", "0.5", "1"
  • Memory: "128Mi", "1Gi", "512Mi"

Runtime Issues

Symptoms:
  • Cannot create sandboxes
  • “Docker daemon not responding” errors
Solutions:1. Verify Docker is running
2. Check Docker socket permissions
3. Configure Docker API timeout
4. Remote Docker host
Symptoms:
  • Pods not created
  • Timeout waiting for sandbox
Solutions:1. Verify kubeconfig
2. Check namespace exists
3. Verify RBAC permissions
4. Check controller logs
Symptoms:
  • Cannot execute code or commands
  • Ping endpoint timeout
Diagnosis:
Solutions:1. Verify execd image version
2. Check container logs
3. Verify network connectivity
  • Host mode: Port 44772 directly accessible
  • Bridge mode: Check port mappings and routing
4. Access token authentication

Networking Issues

Host Mode Issues:1. Port already in use
2. Firewall blocking access
Bridge Mode Issues:1. Routing not configured
2. Get endpoint URL
Use returned endpoint URL instead of direct IP access.
Symptoms:
  • Network policy not enforced
  • Sidecar container errors
Diagnosis:
Solutions:1. Missing egress image
2. Capability conflicts
  • Main container drops NET_ADMIN (required)
  • Sidecar needs NET_ADMIN (automatically granted)
  • Don’t manually override these settings
3. IPv6 disabled warning
  • Normal behavior when egress sidecar is active
  • IPv6 automatically disabled for policy enforcement
Direct Mode (Default):
Gateway Mode (Kubernetes):
Route Modes:Wildcard:
URI:
Header:

Kubernetes-Specific Issues

Check status:
Common causes:1. Pool capacity exceeded
2. Resource quota exceeded
3. Image pull failures
Diagnosis:
Solutions:1. Controller not running
2. Node resource constraints
3. Adjust pool settings
Symptoms:
  • Tasks stuck in running state
  • Tasks fail immediately
Diagnosis:
Solutions:1. Missing task-executor sidecar
2. Process namespace not shared
3. Task command errors
  • Verify command exists in container
  • Check command syntax
  • Review task executor logs for errors
Solutions:1. Check directory permissions
2. Verify file logging enabled
3. Create log directory
4. In Kubernetes

Debugging Techniques

Enable Debug Logging

Server:
Kubernetes Controller:

Docker Debugging

Interactive Debugging

VS Code/Cursor:
Python Breakpoints:

Collect Diagnostic Information

Common Error Codes

Getting Help

Report Issues

Submit bug reports and feature requests on GitHub

Before Reporting Issues

  1. Check existing issues - Search for similar problems
  2. Collect diagnostics - Use the diagnostic script above
  3. Minimal reproduction - Provide steps to reproduce
  4. Version information - Include server and runtime versions
  5. Configuration - Share relevant config (redact secrets)
  6. Logs - Include relevant log excerpts

Useful Debug Commands