ON1Builder Troubleshooting Guide

This guide will help you diagnose and resolve common issues you might encounter while running ON1Builder.

Troubleshooting Decision Flow

Use this flowchart to quickly diagnose and navigate to the appropriate section for your issue:


flowchart TD
    Start([Start Troubleshooting]) --> Running{Is ON1Builder
running?} Running -->|No| StartupIssue{Startup Issue} Running -->|Yes| RunningIssue{System Running
But Has Issues} StartupIssue -->|Config Error| ConfigIssues[Configuration Issues] StartupIssue -->|Connection Error| ConnectionIssues[Connection Issues] StartupIssue -->|Dependency Error| DependencyIssues[Installation & Dependency Issues] RunningIssue -->|Not Executing
Transactions| TxIssues[Transaction Issues] RunningIssue -->|Slow Performance| PerfIssues[Performance Issues] RunningIssue -->|No Alerts/Metrics| MonitorIssues[Monitoring Issues] RunningIssue -->|Database Problems| DBIssues[Database Issues] RunningIssue -->|Security Concerns| SecurityIssues[Security Issues] ConfigIssues --> Solutions[Find Solution
in Relevant Section] ConnectionIssues --> Solutions DependencyIssues --> Solutions TxIssues --> Solutions PerfIssues --> Solutions MonitorIssues --> Solutions DBIssues --> Solutions SecurityIssues --> Solutions style Start fill:#bbf,stroke:#333,stroke-width:2px style Solutions fill:#bfb,stroke:#333,stroke-width:2px style ConfigIssues fill:#fbb,stroke:#333,stroke-width:1px style ConnectionIssues fill:#fbb,stroke:#333,stroke-width:1px style TxIssues fill:#fbb,stroke:#333,stroke-width:1px style PerfIssues fill:#fbb,stroke:#333,stroke-width:1px

Common Issues

Below are the most common issues and their solutions, organized by category:

  1. Connection Issues
  2. Configuration Issues
  3. Transaction Issues
  4. Performance Issues
  5. Monitoring Issues
  6. Database Issues
  7. Security Issues

Connection Issues

Unable to Connect to Blockchain

Symptoms:

Possible Causes:

Solutions:

  1. Verify your endpoints:
  2. 
    # Test HTTP endpoint
    curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' YOUR_HTTP_ENDPOINT
            
  3. Check API rate limits:
  4. Use backup endpoints:
  5. 
    # Configure backup endpoints in your config file
    HTTP_ENDPOINT: "https://mainnet.infura.io/v3/YOUR_KEY"
    BACKUP_HTTP_ENDPOINTS:
      - "https://eth-mainnet.alchemyapi.io/v2/YOUR_KEY"
      - "https://rpc.ankr.com/eth"
            
  6. Enable connection resilience:
  7. 
    # Add retry configuration
    CONNECTION_RETRIES: 5
    RETRY_DELAY_SECONDS: 2
    AUTO_RECONNECT: true
            

WebSocket Disconnections

Symptoms:

Solutions:

  1. Configure WebSocket heartbeats:
  2. 
    WS_HEARTBEAT_INTERVAL: 30  # Send heartbeat every 30 seconds
            
  3. Enable auto-reconnection:
  4. 
    WS_AUTO_RECONNECT: true
    WS_MAX_RECONNECT_ATTEMPTS: 10
            

Configuration Issues

Configuration Validation Errors

Symptoms:

Solutions:

  1. Validate your configuration:
  2. 
    python -m on1builder validate-config --config your_config.yaml
            
  3. Check for common mistakes:
  4. Reference working examples:

Missing Environment Variables

Symptoms:

Solutions:

  1. Verify your .env file:
  2. Manually export variables:
  3. 
    export WALLET_KEY=your_private_key
            
  4. Debug environment loading:
  5. 
    python -m on1builder debug-env --config your_config.yaml
            

Transaction Issues

Transactions Failing

Symptoms:

Possible Causes:

Solutions:

  1. Check your wallet balance:
  2. 
    python -m on1builder wallet-balance --address YOUR_WALLET_ADDRESS
            
  3. Review gas settings:
  4. 
    # Adjust gas settings in config
    MAX_GAS_PRICE_GWEI: 150  # Increase maximum gas price
    GAS_PRICE_MULTIPLIER: 1.2  # Use 120% of recommended gas price
            
  5. Increase slippage tolerance for volatile markets:
  6. 
    SLIPPAGE_DEFAULT: 0.05  # 5% slippage tolerance
            
  7. Enable simulation before execution:
  8. 
    SIMULATE_TRANSACTIONS: true
            

Nonce Errors

Symptoms:

Solutions:

  1. Reset your nonce tracking:
  2. 
    python -m on1builder reset-nonce --address YOUR_WALLET_ADDRESS
            
  3. Enable automatic nonce management:
  4. 
    AUTO_NONCE_MANAGEMENT: true
            
  5. Clear pending transactions:
  6. 
    python -m on1builder clear-pending-tx --address YOUR_WALLET_ADDRESS
            

Performance Issues

High CPU or Memory Usage

Symptoms:

Solutions:

  1. Optimize subscription settings:
  2. 
    # Subscribe only to necessary events
    SUBSCRIBE_NEW_BLOCKS: true
    SUBSCRIBE_PENDING_TX: false  # Disable if not needed
            
  3. Adjust polling intervals:
  4. 
    BLOCK_POLLING_INTERVAL_MS: 5000  # Increase polling interval
            
  5. Monitor resource usage:
  6. 
    # Run with resource monitoring
    python -m on1builder run --config your_config.yaml --monitor-resources
            
  7. Limit concurrent operations:
  8. 
    MAX_CONCURRENT_REQUESTS: 10
            

Slow Transaction Processing

Symptoms:

Solutions:

  1. Optimize gas settings for faster inclusion:
  2. 
    GAS_PRICE_STRATEGY: "fast"
    PRIORITY_FEE_GWEI: 2
            
  3. Use a more responsive node provider
  4. Enable performance logging for analysis:
  5. 
    PERFORMANCE_LOGGING: true
            

Monitoring Issues

Prometheus Metrics Not Available

Symptoms:

Solutions:

  1. Check Prometheus configuration:
  2. 
    # Verify metrics endpoint is accessible
    curl http://localhost:9090/metrics
            
  3. Ensure Prometheus is correctly configured:
  4. Enable verbose metrics logging:
  5. 
    METRICS_DEBUG: true
            

Missing or Incomplete Logs

Symptoms:

Solutions:

  1. Increase log verbosity:
  2. 
    LOG_LEVEL: "DEBUG"
            
  3. Check log file permissions:
  4. 
    chmod 755 data/logs/
            
  5. Use structured logging for better filtering:
  6. 
    LOG_FORMAT: "json"
            

Database Issues

Database Connection Errors

Symptoms:

Solutions:

  1. Check database configuration:
  2. 
    DB_TYPE: "sqlite"  # or "postgresql"
    DB_PATH: "data/db/on1builder.db"  # for SQLite
    # For PostgreSQL
    # DB_HOST: "localhost"
    # DB_PORT: 5432
    # DB_NAME: "on1builder"
    # DB_USER: "on1builder"
    # DB_PASSWORD: "${DB_PASSWORD}"
            
  3. Verify database existence and permissions:
  4. 
    # For SQLite
    ls -la data/db/
    # For PostgreSQL
    psql -h localhost -U on1builder -d on1builder -c "SELECT 1"
            
  5. Initialize database manually:
  6. 
    python -m on1builder init-db --config your_config.yaml
            

Security Issues

Private Key Exposed

Symptoms:

Solutions:

  1. Use environment variables for private keys:
  2. 
    WALLET_KEY: "${WALLET_KEY}"  # Store actual key in .env file
            
  3. Set proper permissions on .env file:
  4. 
    chmod 600 .env
            
  5. Consider using a hardware wallet for production:
  6. 
    USE_HARDWARE_WALLET: true
    HARDWARE_WALLET_TYPE: "ledger"
            

Unauthorized Access Attempts

Symptoms:

Solutions:

  1. Enable security logging:
  2. 
    SECURITY_LOGGING: true
            
  3. Restrict API access:
  4. 
    API_ENABLE_AUTH: true
    API_ALLOWED_IPS: ["127.0.0.1", "10.0.0.0/24"]
            
  5. Use proper network security:

Diagnostic Tools

ON1Builder includes several diagnostic tools to help troubleshoot issues:

Connection Tester

Test your blockchain connection:


python -m on1builder test-connection --endpoint YOUR_HTTP_ENDPOINT
    

Configuration Validator

Validate your configuration file:


python -m on1builder validate-config --config your_config.yaml
    

System Diagnostics

Run a complete system diagnostic:


python -m on1builder diagnostics --config your_config.yaml
    

Log Analyzer

Analyze logs for patterns and issues:


python -m on1builder analyze-logs --log-file data/logs/on1builder.log
    

Getting Additional Help

If you're unable to resolve an issue using this guide:

  1. Check the GitHub Issues:
  2. Collect Diagnostic Information:
  3. 
    python -m on1builder collect-diagnostics --output diagnostic_report.zip
            
  4. Contact Support:

Next Steps

After resolving your issues, consider:

  1. Review the Configuration Guide to optimize your settings
  2. Set up proper Monitoring to detect issues early
  3. Implement best practices for stable operation