agentsclimarketplace

N8n errors connection

Skill Impertio-Studio/n8n-Claude-Skill-Package/skills/source/n8n-errors/n8n-errors-connection

21 deterministic Claude AI skills for n8n v1.x workflow automation

Install
npx -y skills add Impertio-Studio/n8n-Claude-Skill-Package --skill n8n-errors-connection

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use when troubleshooting API connection failures, credential errors, or timeout issues in n8n. Prevents misdiagnosis by providing deterministic symptom-cause-fix tables. Covers API failures, credential errors, timeout configuration, SSL/TLS issues, webhook URL problems (test vs production), rate limiting, queue mode connection issues (Redis), database connection failures, and retry strategies. Keywords: n8n, connection, API, timeout, SSL, credential, Redis, API not connecting, timeout, SSL error, credential invalid, Redis down, webhook URL wrong..

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

12.2 KB, as published. Nobody here has run it

n8n Connection Error Diagnosis & Resolution

Deterministic diagnostic guide for all n8n v1.x connection failures. Format: Symptom -> Cause -> Fix. ALWAYS follow the diagnostic tables.

Quick Reference: Connection Error Categories

CategoryCommon SymptomGo To
API connectionHTTP 4xx/5xx, ECONNREFUSED, ETIMEDOUTAPI Failures
Credentials401 Unauthorized, 403 ForbiddenCredential Errors
TimeoutsETIMEDOUT, ESOCKETTIMEDOUT, execution hangsTimeout Configuration
SSL/TLSUNABLE_TO_VERIFY_LEAF_SIGNATURE, CERT_HAS_EXPIREDSSL/TLS Errors
WebhooksWebhook not triggering, 404 on webhook URLWebhook URL Issues
Rate limiting429 Too Many RequestsRate Limiting
Queue modeRedis ECONNREFUSED, worker not picking up jobsQueue Mode (Redis)
DatabaseECONNREFUSED on 5432, SQLite SQLITE_BUSYDatabase Errors

API Connection Failures

SymptomCauseFix
ECONNREFUSEDTarget service is down or wrong host/portALWAYS verify the service is running and the URL is correct. Check host:port in credential or node config.
ENOTFOUND (DNS)Hostname cannot be resolvedALWAYS check for typos in the URL. Verify DNS resolution from the n8n host with nslookup or dig.
ETIMEDOUTNetwork unreachable or firewall blockingALWAYS check firewall rules, security groups, and network connectivity from the n8n container/host.
HTTP 500Remote server internal errorNEVER assume this is an n8n issue. Check the target API's status page and logs. Retry after delay.
HTTP 502/503Upstream service unavailableCheck if the target service is overloaded or restarting. Use retry-on-fail configuration.
ECONNRESETConnection dropped mid-requestTypically a network instability issue. Enable retry-on-fail on the node.
Proxy errorsCorporate proxy blocking requestsSet HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables. See references/methods.md.

Credential Errors

SymptomCauseFix
401 UnauthorizedInvalid API key, expired token, wrong credentialsALWAYS verify credentials in n8n Settings > Credentials. Re-enter the API key or regenerate it.
403 ForbiddenCredentials valid but insufficient permissionsCheck API key scopes/permissions on the target service. NEVER assume n8n grants permissions.
"Credential not found"Credential deleted or not shared with workflow ownerRe-create the credential or share it with the correct project/user.
OAuth2 token expiredRefresh token flow failedALWAYS click "Reconnect" in the credential settings to re-authorize. Check if the OAuth app is still active.
Wrong credential type selectedNode expects different credential typeALWAYS match the credential type to the node. Example: "Header Auth" for API key in header, "OAuth2" for OAuth flows.
N8N_ENCRYPTION_KEY mismatchCredentials encrypted with different keyALWAYS ensure N8N_ENCRYPTION_KEY is identical across all instances. Credentials are NOT recoverable with wrong key.

Timeout Configuration

Three timeout levels exist in n8n. ALWAYS configure from specific to general.

Level 1: Node-Level (Retry on Fail)

Configure in each node's Settings tab:

SettingDefaultDescription
Retry On FailfalseEnable automatic retries
Max Tries3Number of retry attempts
Wait Between Tries (ms)1000Delay between retries

Level 2: Workflow-Level

Set in Workflow Settings for per-workflow timeout.

Level 3: Instance-Level

VariableDefaultDescription
EXECUTIONS_TIMEOUT-1 (disabled)Default timeout for all workflows (seconds)
EXECUTIONS_TIMEOUT_MAX3600Maximum timeout users can set (seconds)
N8N_AI_TIMEOUT_MAX3600000AI/LLM node HTTP timeout (ms)

ALWAYS set EXECUTIONS_TIMEOUT in production to prevent runaway workflows. NEVER leave EXECUTIONS_TIMEOUT at -1 in production environments.


SSL/TLS Errors

SymptomCauseFix
UNABLE_TO_VERIFY_LEAF_SIGNATURESelf-signed certificate on targetSet NODE_TLS_REJECT_UNAUTHORIZED=0 (dev only). For production: add CA cert to Node.js trust store.
CERT_HAS_EXPIREDTarget's SSL certificate expiredContact the target service owner. NEVER disable TLS verification in production.
DEPTH_ZERO_SELF_SIGNED_CERTSelf-signed cert without CA chainAdd the self-signed cert to NODE_EXTRA_CA_CERTS environment variable.
ERR_TLS_CERT_ALTNAME_INVALIDCertificate hostname mismatchVerify the URL matches the certificate's Common Name or SAN entries.
PostgreSQL SSL errorsDB_POSTGRESDB_SSL_ENABLED=false or wrong certsSet DB_POSTGRESDB_SSL_ENABLED=true, provide DB_POSTGRESDB_SSL_CA, DB_POSTGRESDB_SSL_CERT, DB_POSTGRESDB_SSL_KEY.

NEVER set NODE_TLS_REJECT_UNAUTHORIZED=0 in production. This disables ALL certificate validation.


Webhook URL Issues

CRITICAL: This is the #1 source of webhook confusion in n8n.

Test vs Production URL Decision Tree

Is the workflow ACTIVE (published)?
├── YES → Use PRODUCTION URL: <base>/webhook/<path>
│         Webhook triggers automatically on incoming requests
└── NO  → Use TEST URL: <base>/webhook-test/<path>
          MUST click "Listen for Test Event" in editor first
SymptomCauseFix
Webhook works in editor but not when deployedUsing test URL (/webhook-test/) in external serviceALWAYS switch to production URL (/webhook/) AND activate the workflow.
404 on webhook URLWorkflow not active, or wrong URL pathALWAYS verify: (1) workflow is active, (2) URL uses /webhook/ not /webhook-test/, (3) path matches node config.
Webhook returns empty responseResponse mode set to "Immediately"Change to "When Last Node Finishes" or use "Respond to Webhook" node.
Webhook not accessible externallyWEBHOOK_URL not set or wrongALWAYS set WEBHOOK_URL to the full public URL including protocol. Example: WEBHOOK_URL=https://n8n.example.com/.
Wrong webhook domain in UIWEBHOOK_URL misconfiguredALWAYS set WEBHOOK_URL to match the public-facing URL of your reverse proxy.
Webhook payload too largeExceeds 16MB default limitSet N8N_PAYLOAD_SIZE_MAX to a higher value.

WEBHOOK_URL Environment Variable

ALWAYS set WEBHOOK_URL when n8n is behind a reverse proxy:

WEBHOOK_URL=https://n8n.example.com/

NEVER omit WEBHOOK_URL in production — n8n will generate localhost URLs that external services cannot reach.


Rate Limiting

SymptomCauseFix
HTTP 429 Too Many RequestsAPI rate limit exceededEnable Retry On Fail with increasing wait times. Use the Wait node for explicit delays.
Batch operations hitting limitsToo many items processed simultaneouslyUse the Split In Batches node. ALWAYS set batch size below the API's rate limit.
OAuth rate limitsToo many token refresh requestsCache tokens and check expiry before refreshing.

Backoff Strategy

ALWAYS configure retry with exponential-style backoff for rate-limited APIs:

  1. Set Retry On Fail = true on the HTTP Request node
  2. Set Max Tries = 3 (or higher for aggressive rate limiters)
  3. Set Wait Between Tries = 2000 ms (minimum for most APIs)
  4. For additional control, use Split In Batches with a Wait node between batches

Queue Mode (Redis) Connection

SymptomCauseFix
ECONNREFUSED on Redis port (6379)Redis not running or wrong hostALWAYS verify Redis is running: redis-cli ping must return PONG. Check QUEUE_BULL_REDIS_HOST and QUEUE_BULL_REDIS_PORT.
Workers not picking up jobsWorkers not connected to same Redis/DBALWAYS ensure ALL instances share identical QUEUE_BULL_REDIS_* variables and N8N_ENCRYPTION_KEY.
Redis AUTH failedWrong Redis passwordVerify QUEUE_BULL_REDIS_PASSWORD matches Redis requirepass configuration.
Redis timeoutNetwork latency or Redis overloadedIncrease QUEUE_BULL_REDIS_TIMEOUT_THRESHOLD (default: 10000ms). Check Redis memory usage.
Executions stuck in "waiting"Worker crashed or lost connectionRestart workers. Check worker logs for connection errors. Verify EXECUTIONS_MODE=queue on workers.

Queue Mode Requirements Checklist

ALWAYS verify ALL of these before enabling queue mode:

  • EXECUTIONS_MODE=queue on ALL instances
  • PostgreSQL database (NEVER SQLite with queue mode)
  • Redis running and accessible from all instances
  • Same N8N_ENCRYPTION_KEY on ALL instances
  • Same n8n version on ALL instances
  • WEBHOOK_URL set on main instance
  • S3-compatible storage configured for binary data

Database Connection Errors

SymptomCauseFix
PostgreSQL ECONNREFUSEDDatabase not running or wrong host/portVerify PostgreSQL is running. Check DB_POSTGRESDB_HOST and DB_POSTGRESDB_PORT.
password authentication failedWrong database passwordVerify DB_POSTGRESDB_PASSWORD. Use _FILE suffix for Docker Secrets.
database "n8n" does not existDatabase not createdCreate the database: CREATE DATABASE n8n;
SQLITE_BUSYConcurrent writes to SQLiteNEVER use SQLite in production with multiple connections. Switch to PostgreSQL.
SQLITE_CORRUPTDatabase file corruptedRestore from backup. Run DB_SQLITE_VACUUM_ON_STARTUP=true after restore.
Connection pool exhaustionToo many concurrent connectionsIncrease DB_POSTGRESDB_POOL_SIZE (default: 2). Monitor with pg_stat_activity.
Connection timeoutSlow network or overloaded DBIncrease DB_POSTGRESDB_CONNECTION_TIMEOUT (default: 20000ms).
Idle connections droppedFirewall/NAT killing idle connectionsDecrease DB_POSTGRESDB_IDLE_CONNECTION_TIMEOUT (default: 30000ms) or configure DB_PING_INTERVAL_SECONDS.

Diagnostic Flowchart

Connection error occurred
│
├── Is it an HTTP status code?
│   ├── 401/403 → Credential Errors table
│   ├── 404 on webhook → Webhook URL Issues table
│   ├── 429 → Rate Limiting table
│   └── 500/502/503 → API Connection Failures table
│
├── Is it a Node.js error code?
│   ├── ECONNREFUSED → Check target service is running
│   ├── ENOTFOUND → DNS resolution issue
│   ├── ETIMEDOUT → Firewall or network issue
│   ├── ECONNRESET → Network instability, enable retries
│   └── TLS/SSL errors → SSL/TLS Errors table
│
├── Is it a database error?
│   ├── PostgreSQL → Database Connection Errors table
│   └── SQLite → Switch to PostgreSQL for production
│
└── Is it a queue/Redis error?
    └── Queue Mode (Redis) Connection table

Reference Files

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.