Roman K.
Roman K.

Reputation: 29

Error: connect ECONNREFUSED 127.0.1.1:80 when launching grunt-fetch-pages (node.js)

I've got this issue launching fetchpages Grunt plugin:

Running "fetchpages:dist" (fetchpages) task
Fetching pages...
skipping duplicate page {"local":"public_html/speed/www-fetched/index.html","remote":"http://example.com/"}
Creating folders...
  https://example.com/ -> public_html/speed/www-fetched/index.html
{ Error: connect ECONNREFUSED 127.0.1.1:80
    at Object.exports._errnoException (util.js:1020:11)
    at exports._exceptionWithHostPort (util.js:1043:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.1.1',
  port: 80 }
  https://example.com/scrap-metal-prices -> public_html/speed/www-fetched/scrap-price.html

I've never seen this kind of errors in other projects before.

I use [email protected] and Node v6.11.5.

What does it mean and how to solve?

Upvotes: 1

Views: 619

Answers (1)

Roman K.
Roman K.

Reputation: 29

I just commented (#) this string in /etc/hosts:

#127.0.1.1 example.com example

Now it's ok.

Upvotes: 1

Related Questions