Http Request node error : ENETUNREACH

Describe the problem/error/question

For my app, I need to download images from intagram posts. I get the url of the image with a scrapping api, then I use a http request node to download the image.
I paused my project in June this year, the http request node was working like a charm. Since I got back to working on it at the begginning of september,
I updated to 1.58.2, now it’s catastrophic, it almost never work. Sometimes it does, most of the times it doesn’t no matter how many time I retry. Currently I am sending around 10 images in a worklow, I try batching them, split batch them etc… nothing works.

The image adresses look like this :


It is a real pain for me since getting this image is a main step of my workflow.

Any Idea will be much appreciate. I did try on a simple workflow a http request node with different adresses, sometimes it works, sometimes it doesn’t.

Thanks a lot for you time.

What is the error message (if any)?

connect ENETUNREACH 2602:107:f000:4:face:b00c:3333:a3f:443 - Local (:::0)

Please share your workflow

Share the output returned by the last node

connect ENETUNREACH 2602:107:f000:4:face:b00c:3333:a3f:443 - Local (:::0)

Information on your n8n setup

  • **n8n version: 1.58.2
  • **Database (default: SQLite): Google Sheet
  • **n8n EXECUTIONS_PROCESS setting (default: own, main): Auto and manual
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system:

I didn’t it would show the image ^^. The link looks like this : “https://scontent-bos5-1.cdninstagram.com/v/t39.30808-6/460901215_916558060504929_922705360638297020_n.jpg?stp=dst-jpg_e15&_nc_ht=scontent-bos5-1.cdninstagram.com&_nc_cat=109&_nc_ohc=Z2VehGb_3zMQ7kNvgEzTjr0&_nc_gid=dc8f5c9162e2458c974464079e977978&edm=APs17CUAAAAA&ccb=7-5&oh=00_AYDtrd-3YXTD60APXJY6fVyCIO6vGaHk126p7X51JdOzNw&oe=66F87483&_nc_sid=10d13b

Welcome to the community @Asanosuke2 !

Tip for sharing information

Pasting your n8n workflow


Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.

```
<your workflow>
```

That implies to any JSON output you would like to share with us.


It sounds like a network issue to me which could be contributed by dodgy URLs. Have you tried accessing the images manually for those URLs that results in connection failure? My guess is, your scrapping API could be not parsing all the URLs correctly. You might also benefit from utilizing the method isUrl() and the others to ensure URL is in the correct format before trying to send HTTP GET request.

Thank you for your quick answer. I will look the method isUrl(). But I can already confirm that I can access the images with a browser when I copy past the url from the item in n8n so it’s not a matter with a wrong url. (As the picture in my first post can show it, the url is correct to reach the image).

Did you access that URL from the browser or HTTP Request node? The real browser could handle URL differently forgiving some offending format of the URL.

From a regular browser, not the http node. I will try to validate the url with a isUrl method.

I just tried validating the adresses with isUrl() before sending them to the http node and they all got a true result. Still I’m getting the same error : connect ENETUNREACH 2602:107:f000:4:face:b00c:3333:a3f:443 - Local (:::0)

ENETUNREACH implies that n8n in unable to open a connection to that host.

Trying to curl that url locally I see this:

Which means that Instagram has that domain configured to resolve to an ipv6 address which is not functional (for at least me and for cloud instances).

The only fix I can think of in this case would be for n8n to add a “Force IPv4” option to the Http node, or if you were self-hosting you could set NODEJS_PREFER_IPV4 env variable to true.

1 Like

I don’t understand. It was working fine in June. CUrrently it also works sometimes but it is totally random, how can it works sometimes and some others not ?

n8n is built on top of nodejs, which uses this standard algorithm to deal with services that work over both IPv4 and IPv6.
So sometimes when the IPv4 connection opens and responds faster, the http call succeeds.
Other times when the IPv6 connection throws the error quicker, the http call fails.

From what I can tell node.js’s implementation of this algorithm still has open issues.

The reason why this might be happening more often for you on n8n cloud is that we recently switched our DNS servers, because the one we were using before had completely different set of IPv6 related issues.

The main issue in this particular case is that Instagram says that their domain resolves to an IPv6 address, but when we try to talk to that address, Instagram refuses the request.

Ok, thank you for your detailled answer.

One last question, I’ve noticed that when I try one or two adresses, it works most of the time, Could it be that Instagram start refusing request after a certain number of request comming from the same IP adress ?

While that is entirely possible, I have currently no proof to support or dismiss that claim.
Also since I can talk to IPv4 address of the same domain, my suspicion is that this likely an ISP infrastructure issue somewhere between n8n cloud and Instagram’s CDN servers.

1 Like

Thank you again for all your answers.
I will try to limitate the failed attempt with one by one worklow with long delay in between and retries.
But I hope this will be fixed soon since my main workflow starts with getting images from instagram.

Can you please DM me you cloud instance name or url?
I can try to get the env variable configured that would prioritize IPv4 over IPv6.

1 Like

That would be much appreciate, thank you.

Can you please go to the cloud dashboard, and either upgrade your instance to the latest version, or try restarting the instance. This will reconfigure your instance to prioritize IPv4, which should hopefully resolve this issue :pray:

2 Likes

It seems to be working !! Thank you very much for your help !!

1 Like

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