saeed
saeed

Reputation: 132

Error : Connect ENETUNREACH

I am fetching videos from the facebook graph api(24*7) using nodejs. My code is working fine but after every 3 or 4 days it stops working and gives the following error: (Ignore the I'm in loop statements)

Error file

Error: connect ENETUNREACH 2a03:2990:f015:12:face:b00c:0:2:443 - Local (:::0)
at Object._errnoException (util.js:1003:13)
at _exceptionWithHostPort (util.js.1024:20)
...

Upvotes: 10

Views: 59107

Answers (5)

Chia
Chia

Reputation: 31

Disabling IPv6 worked for me. Try disabling IPv6 temporarily e.g.

$ sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
$ sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
$ sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1

Upvotes: 3

Josh Turner
Josh Turner

Reputation: 45

I had a similar error, I disabled IPv6 on my computer and then the error stopped occurring.

Upvotes: 0

Asqan
Asqan

Reputation: 4489

In my case, I just changed the localhost property to 127.0.0.1 as follows:

var connection = mysql.createConnection({
  // host     : 'localhost', // localhost causes somehow this error
  host: '127.0.0.1',

Upvotes: -1

tuan.dinh
tuan.dinh

Reputation: 338

I got the same issue. My problem was I still have the corp proxy settings in npm config. My resolution:

  1. Check if any proxy settings in place
npm config list
  1. Remove them
npm config delete https-proxy

You may have more. But after that, the error's gone.

Upvotes: -6

Cap Barracudas
Cap Barracudas

Reputation: 2515

Check you internet connection . That solved my problem as ENETUNREACH is a network issue such as host unreachable or your gateway not working .

Upvotes: 6

Related Questions