错误:启动grunt-fetch-pages(node.js)时连接ECONNREFUSED 127.0.1.1:80

时间:2017-10-27 08:59:29

标签: node.js server gruntjs

我在启动fetchpages Grunt插件时出现此问题:

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

我以前从未在其他项目中看到过这种错误。

我使用grunt-fetch-pages@2.0.0和Node v6.11.5。

这意味着什么以及如何解决?

1 个答案:

答案 0 :(得分:0)

我刚在/ etc / hosts中注释了(#)这个字符串:

#127.0.1.1 example.com example

现在没关系。