Troubleshooting

Common issues, diagnostic commands, log analysis, and getting help for NFYio deployments.

This guide helps you diagnose and fix common issues with NFYio. Use the diagnostic commands and log analysis tips below, and know where to get help.

Common Issues

Installation

Containers Not Starting

Symptom: docker compose up fails or containers exit immediately.

CauseSolution
Port conflictCheck ports 3000, 5432, 6379, 7007, 7010, 8080, 8443, 9333 are free: lsof -i :3000
Out of memoryEnsure at least 4GB RAM. Check docker stats.
Permission errorsRun with appropriate user or use --user in compose
Missing .envCopy .env.example to .env and fill required values
# Check port usage
lsof -i :3000
netstat -tulpn | grep 3000

# Check container status
docker compose ps
docker compose logs nfyio-gateway --tail 50

Database Connection Errors

Symptom: Gateway fails with “connection refused” or “password authentication failed”.

CauseSolution
PostgreSQL not readyAdd depends_on with healthcheck; increase startup delay
Wrong credentialsVerify POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB match across services
Wrong hostUse service name (e.g., postgres) not localhost in Docker
# Test database connection
docker compose exec postgres psql -U nfyio -d nfyio -c "SELECT 1"

# Check gateway logs
docker compose logs nfyio-gateway 2>&1 | grep -i "database\|postgres\|connection"

Connectivity

Cannot Reach API or Storage

Symptom: curl or client requests time out or fail.

CauseSolution
FirewallAllow ports 3000 (API), 7007 (storage), 443 (if behind proxy)
Wrong URLUse http://localhost:3000 for local; https://api.yourdomain.com for prod
CORSAdd your origin to ALLOWED_ORIGINS for browser requests
Proxy not forwardingSet TRUST_PROXY=true if behind reverse proxy
# Health check
curl -v http://localhost:3000/health
curl -v http://localhost:7007/health

# From another host
curl -v https://api.yourdomain.com/health

Storage Proxy Fails

Symptom: S3 operations fail with “connection refused” or “backend error”.

CauseSolution
SeaweedFS not runningdocker compose ps seaweedfs-master seaweedfs-volume
Wrong master URLVerify SEAWEEDFS_MASTER (e.g., http://seaweedfs-master:9333)
Volume disk fullCheck disk space on volume nodes
# Check SeaweedFS
curl http://localhost:9333/cluster/status

# Storage proxy logs
docker compose logs nfyio-storage --tail 100

Authentication

401 Unauthorized

Symptom: API returns 401 or “Invalid token”.

CauseSolution
Missing/invalid API keyCheck Authorization: Bearer <key> header; verify key in dashboard
Expired JWTRefresh token or re-login
Wrong Keycloak URLVerify KEYCLOAK_URL and realm
# Test with API key
curl -H "Authorization: Bearer $NFYIO_API_KEY" https://api.yourdomain.com/v1/buckets

403 Forbidden

Symptom: Authenticated but “Insufficient permissions”.

CauseSolution
Missing scopeAPI key needs scope (e.g., read:objects, write:buckets)
Resource ownershipUser may not own the bucket/object
RLS policyCheck Row Level Security if using custom policies

See Access Keys and API Authentication.

Storage

Upload Fails (Large Files)

Symptom: Upload fails for files > 100MB.

CauseSolution
MAX_UPLOAD_SIZEIncrease in storage proxy config
Nginx client_max_body_sizeSet to 5G or higher
MultipartUse multipart upload for large files
# Check storage proxy config
docker compose exec nfyio-storage env | grep MAX_UPLOAD

Bucket or Object Not Found

Symptom: 404 for bucket or object.

CauseSolution
Wrong bucket nameBucket names are case-sensitive
Wrong key/pathVerify object key (no leading slash)
Different region/tenantEnsure correct API key and endpoint

Agents

Embedding Pipeline Not Working

Symptom: Documents not embedding or RAG returns no results.

CauseSolution
EMBEDDINGS_ENABLED=falseSet to true
Missing OPENAI_API_KEYProvide valid key
Network to OpenAIVerify outbound HTTPS to api.openai.com
Wrong modelCheck OPENAI_EMBEDDING_MODEL is valid
# Check embedding service
docker compose logs nfyio-agent 2>&1 | grep -i embed

Agent Chat Fails or Times Out

Symptom: Chat request hangs or returns 504.

CauseSolution
LLM API rate limitReduce request rate; check OpenAI/Anthropic status
Large contextReduce MAX_CONTEXT_TOKENS or chunk size
NetworkVerify connectivity to LLM provider

Diagnostic Commands

Health Checks

# All services
docker compose ps

# Gateway
curl http://localhost:3000/health

# Storage
curl http://localhost:7007/health

# Agent
curl http://localhost:7010/health

Logs

# All services (last 100 lines)
docker compose logs --tail 100

# Specific service, follow
docker compose logs -f nfyio-gateway

# Since timestamp
docker compose logs --since 2026-03-01T12:00:00 nfyio-gateway

# Errors only
docker compose logs nfyio-gateway 2>&1 | grep -i error

Database

# Connect to PostgreSQL
docker compose exec postgres psql -U nfyio -d nfyio

# Check migrations
\dt

# Check buckets
SELECT id, name, created_at FROM buckets LIMIT 10;

Network

# Test connectivity between containers
docker compose exec nfyio-gateway ping -c 2 postgres
docker compose exec nfyio-gateway curl -s http://redis:6379

# DNS resolution
docker compose exec nfyio-gateway nslookup postgres

Log Analysis

Common Log Patterns

PatternMeaning
ECONNREFUSEDService not reachable (wrong host/port or not running)
ETIMEDOUTNetwork timeout; check firewall or service load
401 / UnauthorizedAuth failure; check API key or JWT
429Rate limit; slow down or upgrade plan
500 / InternalErrorServer error; check logs for stack trace

Structured Logs

If using JSON logs:

docker compose logs nfyio-gateway | jq 'select(.level == "error")'

Getting Help

GitHub Issues

For bugs, feature requests, or configuration questions:

  • Repository: github.com/hilaltechnologic/nfyio
  • Search existing issues before opening a new one
  • Include: NFYio version, deployment method (Docker/K8s), relevant logs, and steps to reproduce

Discord

For community support and discussions:

  • Join the NFYio Discord server (link in repository README)
  • Use the appropriate channel (#help, #general, etc.)

Support Email

For enterprise support or security issues:

Before Asking for Help

  1. Check this troubleshooting guide
  2. Search GitHub Issues
  3. Gather: version, logs, config (redact secrets), and reproduction steps
  4. Try with minimal config to isolate the issue

Next Steps