n8n - 💡(How to fix) Fix S3 ObjectStoreService hangs indefinitely when HTTPS is attempted against a non-TLS endpoint [4 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
n8n-io/n8n#28577Fetched 2026-04-17 08:54:53
View on GitHub
Comments
4
Participants
3
Timeline
15
Reactions
0
Author
Timeline (top)
commented ×4mentioned ×4subscribed ×4labeled ×2

Error Message

  1. The connection check should time out (e.g. 10 seconds) and surface a clear error naming the resolved endpoint and suggesting which env vars to check

Root Cause

When N8N_EXTERNAL_STORAGE_S3_HOST points to an S3-compatible service that only speaks plain HTTP (e.g. SeaweedFS) and N8N_EXTERNAL_STORAGE_S3_PROTOCOL is not explicitly set, the default https protocol causes the AWS SDK's TLS handshake to hang indefinitely during checkConnection(). Because objectStoreService.init() is awaited during startup, this blocks all subsequent route registration — the editor UI, API endpoints, and readiness probe all become unreachable, even though the process appears healthy (/healthz returns 200 since it is registered before S3 init).

RAW_BUFFERClick to expand / collapse

Bug Description

When N8N_EXTERNAL_STORAGE_S3_HOST points to an S3-compatible service that only speaks plain HTTP (e.g. SeaweedFS) and N8N_EXTERNAL_STORAGE_S3_PROTOCOL is not explicitly set, the default https protocol causes the AWS SDK's TLS handshake to hang indefinitely during checkConnection(). Because objectStoreService.init() is awaited during startup, this blocks all subsequent route registration — the editor UI, API endpoints, and readiness probe all become unreachable, even though the process appears healthy (/healthz returns 200 since it is registered before S3 init).

Root cause: The HeadBucketCommand send in ObjectStoreService.checkConnection() has no timeout. When TCP connects successfully but the TLS handshake never completes (the non-TLS server never sends a ServerHello), the call hangs forever. There is also no startup log showing the resolved endpoint, making it difficult to diagnose.

To Reproduce

  1. Deploy n8n with N8N_DEFAULT_BINARY_DATA_MODE=s3 (or just set N8N_EXTERNAL_STORAGE_S3_BUCKET_NAME to trigger S3 init)
  2. Set N8N_EXTERNAL_STORAGE_S3_HOST to a host running a plain HTTP S3-compatible service (e.g. seaweedfs:8333)
  3. Omit N8N_EXTERNAL_STORAGE_S3_PROTOCOL (defaults to https)
  4. Start n8n — it prints "Initializing n8n process" then hangs indefinitely

Minimal local reproduction: Start a silent TCP listener that accepts connections but never responds, then start n8n with N8N_EXTERNAL_STORAGE_S3_HOST=127.0.0.1:9999 and N8N_EXTERNAL_STORAGE_S3_BUCKET_NAME=test. The process hangs after "Registered runner" — it never prints "Version:" or "Editor is now accessible".

Expected behavior

  1. The connection check should time out (e.g. 10 seconds) and surface a clear error naming the resolved endpoint and suggesting which env vars to check
  2. An info-level log at startup should show the resolved S3 endpoint so operators can immediately verify the configuration
  3. The timeout should be configurable via an env var for environments with higher latency

Debug Info

Self-hosted Kubernetes deployment with queue mode. The issue was discovered when switching binary data storage to SeaweedFS S3 (plain HTTP on port 8333). The n8n main pod reached Running 1/1 but every route except /healthz returned 404, and /healthz/readiness returned 503. Diagnosis required reading the n8n source code inside the running container to understand how the S3 endpoint URL is constructed.

Environment

Operating System

Linux (Kubernetes container) / macOS 15.4 for local reproduction

n8n Version

2.17.0 (also confirmed on 2.16.0)

Node.js Version

22.22.0

Database

PostgreSQL

Execution mode

queue

Hosting

self hosted


We have a tested fix ready on our fork (Inovize-Solutions/n8n@fix/s3-connection-timeout) and would like to open a PR. The changes touch packages/core (object-store service) — filing this issue first per CONTRIBUTING.md guidance to contact the team before changes to packages/core.

extent analysis

TL;DR

Set N8N_EXTERNAL_STORAGE_S3_PROTOCOL to http when using an S3-compatible service that only speaks plain HTTP.

Guidance

  • Verify that N8N_EXTERNAL_STORAGE_S3_HOST points to a valid S3-compatible service and that N8N_EXTERNAL_STORAGE_S3_PROTOCOL is set correctly.
  • Consider setting a timeout for the checkConnection() call to prevent indefinite hanging.
  • Review the startup logs to ensure the resolved S3 endpoint is correctly logged.
  • Test the connection with a tool like curl to verify that the S3 service is accessible.

Example

No code snippet is provided as the issue is related to configuration and environment variables.

Notes

The issue is specific to n8n versions 2.16.0 and 2.17.0, and the fix is available on the Inovize-Solutions/n8n fork. The changes touch the packages/core module, which requires careful review before merging.

Recommendation

Apply the workaround by setting N8N_EXTERNAL_STORAGE_S3_PROTOCOL to http when using a plain HTTP S3-compatible service, as this is a simple and effective solution to the problem.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

  1. The connection check should time out (e.g. 10 seconds) and surface a clear error naming the resolved endpoint and suggesting which env vars to check
  2. An info-level log at startup should show the resolved S3 endpoint so operators can immediately verify the configuration
  3. The timeout should be configurable via an env var for environments with higher latency

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING