Comprehensive Troubleshooting Guide

Version: 2.0.0
Status: ✅ Production Ready


Overview

This guide provides comprehensive troubleshooting for the Gollek Inference Engine, integrated with the standardized error code system for quick diagnosis and resolution.


Error Code System

Gollek uses a standardized error code system for consistent error handling and troubleshooting.

Error Code Format

CATEGORY_NNN
  • CATEGORY: Error category (MODEL, DEVICE, RUNTIME, etc.)
  • NNN: Three-digit error number

Error Categories

Category Code Prefix HTTP Status Description
MODEL MODEL_XXX 404, 400 Model-related errors
DEVICE DEVICE_XXX 503, 500 Hardware/device errors
RUNTIME RUNTIME_XXX 500, 504 Runtime execution errors
PLUGIN PLUGIN_XXX 500, 504 Plugin lifecycle errors
PROVIDER PROVIDER_XXX 400-504 Provider integration errors
CONFIG CONFIG_XXX 400, 500 Configuration errors
NETWORK NETWORK_XXX 502-504 Network errors
QUOTA QUOTA_XXX 429 Resource quota errors
AUTH AUTH_XXX 401, 403 Authentication errors
INIT INIT_XXX 500 Initialization errors

Error Payload Structure

All errors follow a standardized payload structure:

{
  "type": "RUNTIME_INFERENCE_FAILED",
  "message": "Inference execution failed",
  "details": {
    "errorCode": "RUNTIME_001",
    "category": "RUNTIME",
    "retryable": true
  },
  "retryable": true,
  "originNode": "node-1",
  "originRunId": "run-123",
  "attempt": 1,
  "maxAttempts": 3,
  "timestamp": "2026-03-25T10:00:00Z",
  "suggestedAction": "retry",
  "provenanceRef": "ref-456"
}

Error Payload Fields

Field Type Description
type String Error type/code
message String Human-readable message
details Map Additional error details
retryable Boolean Whether error is retryable
originNode String Node where error occurred
originRunId String Run ID for tracing
attempt Integer Current attempt number
maxAttempts Integer Maximum retry attempts
timestamp Instant Error timestamp
suggestedAction String Suggested resolution action
provenanceRef String Reference for tracing

Common Errors and Solutions

Plugin Errors

PLUGIN_001: Plugin Initialization Failed

HTTP Status: 500
Retryable: No

Symptoms:

Error: Plugin initialization failed
Plugin: cuda-kernel
Details: CUDA not available

Solutions:

  1. Check if plugin JAR is present:
    ls ~/.gollek/plugins/*.jar
    
  2. Verify plugin manifest:
    jar xf plugin.jar META-INF/MANIFEST.MF
    cat META-INF/MANIFEST.MF
    
  3. Check plugin dependencies:
    gollek plugin check <plugin-id>
    
  4. Verify hardware availability:
    # For CUDA
    nvidia-smi
       
    # For Metal
    system_profiler SPDisplaysDataType
    

PLUGIN_002: Plugin Execution Failed

HTTP Status: 500
Retryable: Yes

Symptoms:

Error: Plugin execution failed
Plugin: gguf-runner
Operation: infer

Solutions:

  1. Check plugin health:
    gollek plugin health <plugin-id>
    
  2. Verify model compatibility:
    gollek model check <model-id>
    
  3. Check resource availability:
    gollek system resources
    
  4. Retry with fallback:
    gollek run --enable-cpu --model <model> --prompt <prompt>
    

PLUGIN_003: Plugin Configuration Invalid

HTTP Status: 500
Retryable: No

Symptoms:

Error: Plugin configuration invalid
Plugin: cuda-kernel
Invalid field: device_id

Solutions:

  1. Check configuration file:
    cat ~/.gollek/config.yaml
    
  2. Validate plugin configuration:
    gollek plugin config <plugin-id> --validate
    
  3. Reset to defaults:
    gollek plugin config <plugin-id> --reset
    

Device Errors

DEVICE_001: Device Not Available

HTTP Status: 503
Retryable: Yes

Symptoms:

Error: Requested device not available
Device: cuda

Solutions:

  1. Check device availability:
    gollek device list
    
  2. Verify drivers installed:
    # CUDA
    nvcc --version
       
    # ROCm
    rocminfo
       
    # Metal
    system_profiler SPDisplaysDataType
    
  3. Use CPU fallback:
    gollek run --use-cpu --model <model> --prompt <prompt>
    
  4. Enable CPU fallback for production:
    gollek run --enable-cpu --model <model> --prompt <prompt>
    

DEVICE_002: Device Out of Memory

HTTP Status: 503
Retryable: Yes

Symptoms:

Error: Device out of memory
Device: cuda
Available: 2GB
Required: 8GB

Solutions:

  1. Reduce model size:
    gollek run --model <smaller-model> --prompt <prompt>
    
  2. Enable memory optimization:
    gollek run --optimize-memory --model <model> --prompt <prompt>
    
  3. Use CPU for large models:
    gollek run --use-cpu --model <large-model> --prompt <prompt>
    
  4. Close other GPU applications:
    nvidia-smi  # Check GPU usage
    

DEVICE_005: GPU Not Found

HTTP Status: 503
Retryable: No

Symptoms:

Error: GPU not found
Platform: cuda

Solutions:

  1. Check GPU detection:
    gollek device detect
    
  2. Verify GPU hardware:
    # Linux
    lspci | grep -i vga
       
    # macOS
    system_profiler SPDisplaysDataType
       
    # Windows
    dxdiag
    
  3. Install/Update drivers:
    # NVIDIA
    sudo apt install nvidia-driver-535
       
    # AMD
    sudo apt install rocm-dkms
    
  4. Use CPU until GPU available:
    gollek run --use-cpu --model <model> --prompt <prompt>
    

Runtime Errors

RUNTIME_001: Inference Execution Failed

HTTP Status: 500
Retryable: Yes

Symptoms:

Error: Inference execution failed
Model: llama-3-8b
Runner: gguf-runner

Solutions:

  1. Check model integrity:
    gollek model verify <model-id>
    
  2. Verify runner compatibility:
    gollek runner check <runner-id> --model <model-id>
    
  3. Reduce batch size:
    gollek run --batch-size 1 --model <model> --prompt <prompt>
    
  4. Enable fallback:
    gollek run --enable-cpu --model <model> --prompt <prompt>
    

RUNTIME_002: Inference Request Timeout

HTTP Status: 504
Retryable: Yes

Symptoms:

Error: Inference request timeout
Timeout: 60s
Model: llama-3-70b

Solutions:

  1. Increase timeout:
    gollek run --timeout 120 --model <model> --prompt <prompt>
    
  2. Use smaller model:
    gollek run --model <smaller-model> --prompt <prompt>
    
  3. Reduce max tokens:
    gollek run --max-tokens 256 --model <model> --prompt <prompt>
    
  4. Use GPU acceleration:
    gollek run --platform cuda --model <model> --prompt <prompt>
    

RUNTIME_003: Out of Memory During Inference

HTTP Status: 500
Retryable: Yes

Symptoms:

Error: Out of memory during inference
Available: 4GB
Required: 16GB

Solutions:

  1. Enable memory optimization:
    gollek run --optimize-memory --model <model> --prompt <prompt>
    
  2. Use quantized model:
    gollek run --model <model>-q4 --prompt <prompt>
    
  3. Reduce context size:
    gollek run --context-size 2048 --model <model> --prompt <prompt>
    
  4. Use CPU with swap:
    gollek run --use-cpu --model <model> --prompt <prompt>
    

Provider Errors

PROVIDER_001: Provider Not Initialized

HTTP Status: 503
Retryable: Yes

Symptoms:

Error: Provider not initialized
Provider: openai

Solutions:

  1. Check provider configuration:
    gollek provider config openai --validate
    
  2. Verify API key:
    echo $OPENAI_API_KEY
    
  3. Initialize provider:
    gollek provider init openai
    
  4. Check network connectivity:
    curl https://api.openai.com/v1/models
    

PROVIDER_003: Provider Timeout

HTTP Status: 504
Retryable: Yes

Symptoms:

Error: Provider timeout
Provider: openai
Timeout: 30s

Solutions:

  1. Increase timeout:
    export OPENAI_TIMEOUT=60
    
  2. Check network latency:
    curl -w "@curl-format.txt" https://api.openai.com/v1/models
    
  3. Use fallback provider:
    gollek run --provider gemini --model <model> --prompt <prompt>
    
  4. Enable retry:
    gollek run --retry 3 --model <model> --prompt <prompt>
    

PROVIDER_005: Provider Rate Limit Exceeded

HTTP Status: 429
Retryable: Yes

Symptoms:

Error: Provider rate limit exceeded
Provider: openai
Limit: 100/min

Solutions:

  1. Wait and retry:
    sleep 60
    gollek run --model <model> --prompt <prompt>
    
  2. Use different provider:
    gollek run --provider gemini --model <model> --prompt <prompt>
    
  3. Enable rate limiting:
    gollek config set rate_limit 50
    
  4. Upgrade API plan:
    Visit provider website to upgrade plan
    

Configuration Errors

CONFIG_001: Required Configuration Missing

HTTP Status: 500
Retryable: No

Symptoms:

Error: Required configuration missing
Field: api_key
Provider: openai

Solutions:

  1. Check configuration file:
    cat ~/.gollek/config.yaml
    
  2. Set missing configuration:
    gollek config set openai.api_key sk-...
    
  3. Use environment variable:
    export OPENAI_API_KEY=sk-...
    
  4. Validate configuration:
    gollek config validate
    

CONFIG_002: Invalid Configuration Value

HTTP Status: 500
Retryable: No

Symptoms:

Error: Invalid configuration value
Field: timeout
Value: -1
Expected: positive integer

Solutions:

  1. Check configuration syntax:
    gollek config get <field>
    
  2. Fix invalid value:
    gollek config set <field> <valid-value>
    
  3. Reset to default:
    gollek config reset <field>
    
  4. Validate all configuration:
    gollek config validate
    

Network Errors

NETWORK_001: Network Timeout

HTTP Status: 504
Retryable: Yes

Symptoms:

Error: Network timeout
Operation: model download
Timeout: 300s

Solutions:

  1. Check network connectivity:
    ping huggingface.co
    
  2. Increase timeout:
    gollek config set network.timeout 600
    
  3. Use different mirror:
    gollek config set huggingface.mirror https://hf-mirror.com
    
  4. Check proxy settings:
    echo $HTTP_PROXY
    echo $HTTPS_PROXY
    

NETWORK_002: Network Unreachable

HTTP Status: 503
Retryable: Yes

Symptoms:

Error: Network unreachable
Host: huggingface.co

Solutions:

  1. Check internet connection:
    ping 8.8.8.8
    
  2. Check DNS resolution:
    nslookup huggingface.co
    
  3. Check firewall rules:
    sudo ufw status
    
  4. Use offline mode:
    gollek run --offline --model <local-model> --prompt <prompt>
    

Diagnostic Commands

System Diagnostics

# Check system status
gollek system status

# Check available devices
gollek device list

# Check plugin status
gollek plugin status

# Check model status
gollek model list

# Check configuration
gollek config validate

Plugin Diagnostics

# Check plugin health
gollek plugin health <plugin-id>

# Check plugin configuration
gollek plugin config <plugin-id> --validate

# List plugin capabilities
gollek plugin capabilities <plugin-id>

# Test plugin execution
gollek plugin test <plugin-id>

Model Diagnostics

# Verify model integrity
gollek model verify <model-id>

# Check model compatibility
gollek model check <model-id>

# Get model information
gollek model info <model-id>

# Test model inference
gollek model test <model-id>

Network Diagnostics

# Test network connectivity
gollek network test

# Check provider connectivity
gollek provider test <provider-id>

# Check download speed
gollek network speed-test

# Check DNS resolution
gollek network dns-test

Error Recovery Strategies

Automatic Retry

For retryable errors, Gollek automatically retries with exponential backoff:

retry:
  enabled: true
  max_attempts: 3
  initial_delay: 1s
  max_delay: 30s
  multiplier: 2.0

Fallback Execution

Configure fallback for non-retryable errors:

fallback:
  enabled: true
  strategy: cpu  # Use CPU if GPU fails
  # or
  strategy: provider  # Use cloud provider if local fails

Circuit Breaker

Enable circuit breaker for repeated failures:

circuit_breaker:
  enabled: true
  failure_threshold: 5
  success_threshold: 3
  timeout: 60s

Getting Help

Logs

# View recent logs
gollek logs --recent

# View error logs
gollek logs --level ERROR

# Follow live logs
gollek logs --follow

# Export logs
gollek logs --export > logs.txt

Support Channels

  • Documentation: https://gollek.ai/docs
  • GitHub Issues: https://github.com/gollek-ai/gollek/issues
  • Discord: https://discord.gg/gollek
  • Email: support@gollek.ai

Error Reporting

When reporting errors, include:

  1. Error code and message
  2. Steps to reproduce
  3. System information:
    gollek system info
    
  4. Logs:
    gollek logs --recent 100
    
  5. Configuration (sanitized):
    gollek config export --sanitize
    

Resources


Back to Documentation   Error Codes   GPU Runtime Docs