Skip to main content

Overview

This page collects the most common issues encountered when developing, deploying, and self-hosting OpenSail. Each section includes symptoms, diagnosis commands, root causes, and solutions. If you are new to the codebase, scan the section headers to find the category that matches your problem.

Container Issues

Devserver Image Missing

Symptoms: User project containers fail to start. Pods stuck in ImagePullBackOff or ErrImagePull. Diagnosis:
Root cause: The tesslate-devserver image was never built or loaded into the cluster. Solution:

ImagePullBackOff

Symptoms: Pod stuck in ImagePullBackOff state. Diagnosis:
Common causes and solutions:
  1. Image not loaded into cluster (Minikube): Run minikube -p tesslate image load <image>:latest
  2. ECR credentials expired (AWS): Re-authenticate: aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin <ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com
  3. Wrong image name in config: Verify K8S_DEVSERVER_IMAGE in the backend environment matches the actual image name

Pod Stuck in CrashLoopBackOff

Symptoms: Pod repeatedly crashes and restarts. Diagnosis:
Common causes:
  1. Missing environment variables: Verify secrets are properly mounted: kubectl exec -n tesslate deployment/tesslate-backend -- env | grep DATABASE
  2. Database connection failure: Check DATABASE_URL and ensure the database pod is running
  3. Missing Python dependencies: Rebuild the image with --no-cache

Namespace Stuck in Terminating

Symptoms: A project namespace stays in Terminating state and never completes deletion. Diagnosis:
Solution: Force-delete the namespace by removing its finalizers:
Force-deleting a namespace skips finalizer cleanup. Ensure no critical resources (like PVCs with important data) are left orphaned.

Database Issues

Connection Refused

Symptoms: Backend logs show Connection refused or timeout errors for PostgreSQL. Diagnosis:
Common causes:
  1. Database not running: Restart it: docker compose up -d postgres or kubectl rollout restart deployment/tesslate-postgres -n tesslate
  2. Wrong DATABASE_URL: Verify the format: postgresql+asyncpg://user:pass@host:5432/dbname. Check with: kubectl exec -n tesslate deployment/tesslate-backend -- env | grep DATABASE_URL
  3. Network policy blocking: Ensure the NetworkPolicy allows backend-to-database traffic

Migration Errors

Symptoms: alembic upgrade head fails. Diagnosis:
Common issues and solutions:
Two developers created migrations from the same revision. Merge them:
Run all pending migrations:
If a migration fails midway, check the current state and fix manually:
Ensure all model files are imported in alembic/env.py:

Database Seeding Failures

Symptoms: Seed scripts fail or produce no data. Diagnosis:
Common causes:
  1. Migrations not applied: Run alembic upgrade head first
  2. Script not copied into container: Verify the docker cp step completed successfully
  3. PYTHONPATH not set: Always include -e PYTHONPATH=/app when running scripts inside the container

Agent Issues

LLM Timeout or No Response

Symptoms: Chat messages do not get responses. The UI spins indefinitely. Diagnosis:
Common causes:
  1. Missing API key: Verify LITELLM_API_BASE and LITELLM_MASTER_KEY are set
  2. Rate limiting: Check logs for rate limit errors; implement exponential backoff
  3. Model not available: Verify the model name in LITELLM_DEFAULT_MODELS is correct and accessible

Tool Execution Failures

Symptoms: Agent tool calls fail. Logs show tool execution errors. Diagnosis:
Common causes:
  1. Container not running: The user project container must be started before the agent can execute file or shell operations
  2. File path issues: Tool file paths are relative to the project root; verify the expected file exists
  3. Permission denied: Check that the container user has write access to the target directory

Streaming Errors

Symptoms: Agent responses cut off mid-stream or the SSE connection drops. Common causes:
  1. Proxy timeout: NGINX Ingress default timeouts may be too short for long agent runs. Ingress annotations should set proxy-read-timeout and proxy-send-timeout to 3600
  2. Client-side EventSource disconnect: Ensure the frontend properly handles reconnection
  3. Backend exception during streaming: Check backend logs for tracebacks during the stream

Deployment Issues (External Providers)

SSL Certificate Not Valid

Symptoms: Browser shows certificate warning when accessing the application. Diagnosis:
Common causes:
  1. DNS not propagated: Wait up to 48 hours for DNS propagation
  2. Cloudflare API token invalid: The token needs Zone:Zone:Read and Zone:DNS:Edit permissions
  3. Wildcard cert subdomain limitation: *.domain.com only covers one level. foo.bar.domain.com requires a separate cert or Cloudflare proxy

Domain Routing (503 Service Unavailable)

Symptoms: Browser shows 503 error when accessing the application or a user project. Diagnosis:
Solutions:
  1. Pod not ready: Wait for the pod to pass readiness checks, or check why it is failing
  2. Service endpoint stale: Restart the ingress controller: kubectl rollout restart deployment/ingress-nginx-controller -n ingress-nginx
  3. Ingress misconfigured: Inspect with kubectl describe ingress -n tesslate

CORS Errors

Symptoms: Browser console shows Access to fetch has been blocked by CORS policy. Solutions:
  1. Verify APP_DOMAIN in backend config matches your frontend origin
  2. Check the DynamicCORSMiddleware in main.py includes the correct URL patterns
  3. Ensure both HTTP and HTTPS origins are allowed if your setup uses both

Docker Issues

Image Not Updating After Rebuild

Symptoms: Code changes do not appear after rebuilding and redeploying. Root cause: Docker (and Minikube) caches images and does not overwrite existing images with the same tag. Solution (Minikube):

Volume Permission Errors

Symptoms: Container fails to read or write files. Logs show “Permission denied.” Common causes:
  1. Wrong user inside container: Ensure the container user (1000:1000) owns the project files
  2. Host filesystem permissions: On Linux, Docker volumes may inherit restrictive host permissions
  3. Windows line endings: Files created on Windows may cause script execution failures inside Linux containers

Network Conflicts

Symptoms: Containers cannot communicate. Port conflicts on the host. Diagnosis:
Solutions:
  1. Stop conflicting services on the host that use the same ports (5432, 8000, 5173)
  2. Ensure the project network is connected to Traefik: check the Compose file for network configuration

Kubernetes Issues

Minikube Image Caching

Problem: minikube image load does not overwrite existing images with the same tag. Solution: Always delete the old image before loading the new one:

NGINX Ingress Configuration

Problem: Ingress returns 503 or the wrong backend. Diagnosis:
Common fixes:
  1. Restart the ingress controller after backend deployments: kubectl rollout restart deployment/ingress-nginx-controller -n ingress-nginx
  2. Verify service selectors match pod labels
  3. Check that the ingress class annotation matches your controller

PVC Not Bound

Symptoms: Pod stuck in Pending with event “unbound PersistentVolumeClaims.” Diagnosis:
Common causes:
  1. StorageClass not found: Verify K8S_STORAGE_CLASS matches an available StorageClass: kubectl get sc
  2. No available PersistentVolumes: The dynamic provisioner may not be configured
  3. Pod affinity violation: All pods sharing a RWO PVC must be on the same node. Check for affinity constraint failures

VolumeSnapshot Hibernation Failures

Symptoms: Hibernation fails with “snapshot not ready” or “snapshot creation failed.” Diagnosis:
Common causes:
  1. VolumeSnapshotClass not configured: Ensure tesslate-ebs-snapshots exists: kubectl get volumesnapshotclass
  2. EBS CSI driver not installed: The snapshot feature requires the AWS EBS CSI driver with snapshot support
  3. PVC does not exist or is not bound: Verify the PVC is in Bound state before attempting a snapshot

Quick Diagnostic Commands

Getting Help

If you cannot resolve an issue:
1

Collect diagnostic information

2

Search the codebase

Search for the error message in the source code. Many errors have comments explaining the root cause and fix.
3

Create a detailed issue report

Include: steps to reproduce, expected vs. actual behavior, relevant logs, configuration, and environment details (Minikube/AWS, versions).