简体   繁体   中英

ECONNREFUSED hapi.js

We have been using hapijs for a while and suddenly started getting this problem

hapi, {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect","domainEmitter":{"domain":{"domain":null,"_events":{},"_maxListeners":10,"members":[]},"_events":{},"_maxListeners":10},"domain":{"domain":null,"_events":{},"_maxListeners":10,"members":[]},"domainThrown":false}
Debug: hapi, internal, implementation, error 
    Error: connect ECONNREFUSED
    at errnoException (net.js:904:11)
    at Object.afterConnect [as oncomplete] (net.js:895:19)

I'm not sure as to why I'm getting this error. I tried with different versions of node but no success. Is anybody else having this issue?

Any help/suggestions appreciated.

Thanks.

The port the server is listening on is not available. This could be either that it is in use by another process, or you are trying to listen to a port the current user isn't authorized to listen on.

For instance, Port 80 is a privileged port and will not be possible to listen on, if you are running as a normal user. You can do

authbind --deep node app.js

That won't require root.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM