This guide covers common issues you might encounter when setting up local blockchain environments for Substreams development.
Docker Compose Issues
Container Fails to Start
Problem: Container exits immediately or fails to start
Solutions:
Copy # Check container logs
docker compose logs < service-nam e >
# Check all container statuses
docker compose ps
# Restart services
docker compose down
docker compose up -d
# Clean restart (removes volumes)
docker compose down --volumes
docker compose up -d Problem: "Port already in use" errors
Solutions:
Volume Permission Issues
Problem: Permission denied errors in containers
Solutions:
Memory/Resource Issues
Problem: Containers running out of memory
Solutions:
Increase Docker Desktop memory allocation (4GB minimum recommended)
Close other resource-intensive applications
Check available disk space (20GB minimum recommended)
Container Name Conflicts
Problem: Container name conflict when starting Docker services
Error Example:
Solutions:
Check for existing containers:
Remove conflicting container:
Clean up entire compose project:
Prevention: Always use docker compose down to properly stop services instead of manually stopping containers with docker stop.
RPC Connectivity Problems
Connection Refused
Problem: Cannot connect to localhost:8545 (Ethereum) or localhost:8899 (Solana)
Solutions:
Verify container is running and healthy:
Invalid JSON-RPC Response
Problem: RPC returns errors or invalid responses
Solutions:
Wait for container to fully initialize (check health status)
Verify the blockchain node is running with correct parameters
Check container logs for initialization errors
Substreams gRPC Issues
Connection Failed
Problem: Cannot connect to Substreams endpoint
Solutions:
Verify Substreams service is running:
Check firewall settings:
Ensure port 9000 is not blocked
Disable VPN if causing connectivity issues
Authentication Errors
Problem: gRPC authentication failures
Solutions:
Always use --plaintext flag for local development
Ensure no API keys are being used for local endpoints
Verify endpoint URL format (no https:// for local)
macOS Networking
Problem: Docker networking issues on macOS
Solutions:
Use host.docker.internal instead of localhost in some contexts
Ensure Docker Desktop networking is properly configured
Try restarting Docker Desktop
Linux Networking
Problem: Container networking issues on Linux
Solutions:
Ensure Docker daemon is running: sudo systemctl start docker
Check iptables rules aren't blocking connections
Verify user is in docker group: sudo usermod -aG docker $USER
Windows (WSL2) Issues
Problem: Performance or networking issues on Windows
Solutions:
Ensure WSL2 is properly configured
Allocate sufficient memory to WSL2
Use WSL2 file system for better performance
Restart WSL2: wsl --shutdown then restart
Build and Development Issues
Rust/WASM Target Missing
Problem: wasm32-unknown-unknown target not found
Solution:
Substreams CLI Issues
Problem: Substreams commands fail
Solutions:
Update to latest version:
Node.js/NPM Issues
Problem: Package installation or build failures
Solutions:
Problem: Forge commands fail
Solutions:
Data and State Issues
Blockchain State Problems
Problem: Inconsistent or corrupted blockchain state
Solutions:
Block Production Issues
Problem: No new blocks being produced
Solutions:
Ethereum: Ensure dev mode is configured with --dev.period=1
Solana: Check test validator is running with proper configuration
Generate transactions to trigger block production
Slow Block Processing
Problem: Blocks are processed very slowly
Solutions:
Increase Docker memory allocation
Check available disk space
Reduce block time in dev mode configuration
Close resource-intensive applications
Problem: Docker containers using excessive CPU
Solutions:
Reduce logging verbosity in container configuration
Limit container resource usage in docker-compose.yml
Check for infinite loops in smart contracts
Common Error Messages
"bind: address already in use"
Cause: Port conflict with existing service
Solution: Kill the conflicting process or change ports in docker-compose.yml
"no space left on device"
Cause: Insufficient disk space
Solution: Free up disk space or clean Docker resources:
"connection reset by peer"
Cause: Network connectivity issues
Solution: Check firewall settings and restart Docker services
"context deadline exceeded"
Cause: Operation timeout
Solution: Increase timeout values or check service health
If you continue to experience issues:
Check container logs: docker compose logs -f
Verify system requirements: Ensure sufficient RAM, disk space, and Docker version
Search existing issues: Check GitHub repositories for similar problems
Create minimal reproduction: Isolate the issue to specific steps
Gather system information: Include OS, Docker version, and error messages when reporting issues
Useful Commands