Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EADDRINUSE and EADDRNOTAVAIL #16

Open
Nanashi-B opened this issue Aug 31, 2022 · 9 comments
Open

EADDRINUSE and EADDRNOTAVAIL #16

Nanashi-B opened this issue Aug 31, 2022 · 9 comments

Comments

@Nanashi-B
Copy link

Nanashi-B commented Aug 31, 2022

hello i create certificate and add record dns to my domain name but i don't know why i have this error when running lib/handout.js

root@raspberrypi:/opt/handout# node lib/handout.js
[debug] (webserver) Webserver opened at host myipaddress
[debug] (authns) Authoritative Nameserver opened for domain cloud.dyfault.
(node:2844) UnhandledPromiseRejectionWarning: Error: listen EADDRINUSE: address already in use 0.0.0.0:80
at Server.setupListenHandle [as _listen2] (net.js:1280:14)
at listenInCluster (net.js:1328:12)
at doListen (net.js:1461:7)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
(node:2844) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2844) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:2844) UnhandledPromiseRejectionWarning: Error: listen EADDRNOTAVAIL: address not available 82.65.165.5:53
at Server.setupListenHandle [as _listen2] (net.js:1263:19)
at listenInCluster (net.js:1328:12)
at doListen (net.js:1461:7)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
(node:2844) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

@pinheadmz
Copy link
Owner

address already in use 0.0.0.0:80

do you have some other web server running already on port 80?

@Nanashi-B
Copy link
Author

Nanashi-B commented Aug 31, 2022

nope only this one i have my domain on namebase with A record on namebase nameserver and NS, DS record on blockchain record

@pinheadmz
Copy link
Owner

well your operating system is telling you that port 80 is occupied.

also: [debug] (webserver) Webserver opened at host myipaddress -- that should be an IP address not a string:

--> node lib/handout.js 
[debug] (webserver) Webserver opened at host 123.201.32.45
[debug] (authns) Authoritative Nameserver opened for domain cool-domain.

@Nanashi-B
Copy link
Author

i put my public ip address
but i don't know why my port 80 is occupied i only have apache2 web server

@Nanashi-B
Copy link
Author

node lib/handout.js

[debug] (webserver) Webserver opened at host 82.65.165.5
[debug] (authns) Authoritative Nameserver opened for domain cloud.dyfault.
(node:3188) UnhandledPromiseRejectionWarning: Error: listen EADDRINUSE: address already in use 0.0.0.0:80
    at Server.setupListenHandle [as _listen2] (net.js:1280:14)
    at listenInCluster (net.js:1328:12)
    at doListen (net.js:1461:7)
    at process._tickCallback (internal/process/next_tick.js:63:19)
    at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
(node:3188) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3188) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:3188) UnhandledPromiseRejectionWarning: Error: listen EADDRNOTAVAIL: address not available 82.65.165.5:53
    at Server.setupListenHandle [as _listen2] (net.js:1263:19)
    at listenInCluster (net.js:1328:12)
    at doListen (net.js:1461:7)
    at process._tickCallback (internal/process/next_tick.js:63:19)
    at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
(node:3188) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

@pinheadmz
Copy link
Owner

apache is probably running on port 80, you'll need to shut that down to use handout, which runs its own web server.

@Nanashi-B
Copy link
Author

hello
i am retrying and i stop apache it's now okay for the ip address but i still have the error

root@raspberrypi:/opt/handout# node lib/handout.js

[debug] (webserver) Webserver opened at host 82.65.165.5
[debug] (authns) Authoritative Nameserver opened for domain cloud.dyfault.
(node:1564) UnhandledPromiseRejectionWarning: Error: listen EADDRNOTAVAIL: address not available 82.65.165.5:53
    at Server.setupListenHandle [as _listen2] (net.js:1263:19)
    at listenInCluster (net.js:1328:12)
    at doListen (net.js:1461:7)
    at process._tickCallback (internal/process/next_tick.js:63:19)
    at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
(node:1564) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1564) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@pinheadmz
Copy link
Owner

Ok good. You're next issue is port 53 is protected so you may need to use sudo or setcap to allow handout (nodejs) to bind to that port

@wordfocus
Copy link

Same here , EADDRNOTAVAIL: address not available :53
on public ip in Oracle and same on my home lan .
only worked for 0.0.0.0.
Thanks

@pinheadmz pinheadmz changed the title handout.js error EADDRINUSE and EADDRNOTAVAIL Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants