HTTP Request WooCommerce ECONNRESET socket hang up

Have anyone met and fixed this error? :cry:

Describe the problem/error/question

Problem in node ‘HTTP Request‘

The connection to the server was closed unexpectedly, perhaps it is offline. You can retry the request immediately or wait and retry later.

What is the error message (if any)?

{
“errorMessage”: “The connection to the server was closed unexpectedly, perhaps it is offline. You can retry the request immediately or wait and retry later. [item 1]”,
“errorDetails”: {
“rawErrorMessage”: [
“socket hang up”,
“socket hang up”
],
“httpCode”: “ECONNRESET”
},
“n8nDetails”: {
“nodeName”: “HTTP Request”,
“nodeType”: “n8n-nodes-base.httpRequest”,
“nodeVersion”: 4.2,
“itemIndex”: 1,
“time”: “16:52:17 4/4/2025”,
“n8nVersion”: “1.82.3 (Self Hosted)”,
“binaryDataMode”: “default”,
“stackTrace”: [
“NodeApiError: The connection to the server was closed unexpectedly, perhaps it is offline. You can retry the request immediately or wait and retry later.”,
" at ExecuteContext.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/node-execution-context/utils/request-helper-functions.js:991:19)“,
" at processTicksAndRejections (node:internal/process/task_queues:95:5)”,
" at ExecuteContext.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/node-execution-context/utils/request-helper-functions.js:1147:20)"
]
}
}

Please share your workflow

Share the output returned by the last node

[
{
"name": 
"Tạp phẩm",
"slug": 
"tap-pham"
},
{
"name": 
"bang-viet-cac-loai.jpg",
"slug": 
"bang-viet-cac-loai",
"image": 
{
"src": 
"https://drive.google.com/file/d/1hiCWZzJIl3VAtuSVh1cQSFlGdWNYVl4e/view?usp=drivesdk"
}
}
]

Information on your n8n setup

  • n8n version: 1.82.3
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via Docker
  • Operating system: Windows 111

Hi,

Have you checked with an external tool (postman/hopscotch/curl …) whether this request actually works like this?

Reg,
J.

[Edit] I imported the wrong curl :joy: , but it still response the above error

Hi, Yes of course. my question was rather whether you have tried this exact request with the same data in another tool (without n8n). does it execute there? What does it tell you.

I’ve tried Postman and it works correctly… but n8n don’t

From what I can gather the error might result from issues with the headers (like user agent etc). I know it’s brute force but just to save time. If you have a way to capture the two request somehow. Wireshark/txpdump/… You could compare them to see if there is any difference.

Reg,j.

sorry, i’m a newbie so I don’ really understand what you mean. Can you explain more detail?

Hi,

The idea is that we want to understand whether or not there is an actual difference in the low-level http request going out of the system…

We could do this on network level with a packet sniffer and see the actual http traffic passing.

From this we could tell if there is a difference or not providing a potential reason why the request is dropped.

Depending on your system you need to install and capture traffic with some filter while doing the test.

Reg,

1 Like

Hi,

I’m using Docker to run n8n. May it be firewall or VPN or something that cause the error?

Reg,

hi, no i don’t think so necessarily, but there might be headers missing or wrongly set in the actual http. but for us to understand what is the difference, it would be good to have a comparison.

reg,
J.

I added usser-agent to headers but it still doesn’t work. What parameters may be missing?

Hi, that’s just the problem, it guess work. Did you check the WooCommerce API reference?

Reg,
J.

Hi,

I’m so confused rn @@ I thought my WooCom key&secret are correct. However when I checked again and it didn’t work. I’ve created another key and it worked, but after a few retries, it does not connect anymore and returns the same error @@


Reg,
Hai.

Maybe the site has protection for these kind of things
WooCommerce is based on WP no? Maybe you get blacklisted somehow/for some reason

Do you manage the site yourself?

yeah, I tried curl in my local PC and it works… Maybe because of proxy or something? I’m self-hosted on VPS

Yes so you check the logs if theres something going on. The reason why it works a few times and then stops

I tried to get products with http request node and somehow it returns the HTML that relevant to captcha (It contain sensitive information so I don’t want to show it here). My ecom site is hosted in Hostinger, my n8n is hosted in different VPS

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.