Bind to address? #29

Open
opened 2020-02-05 02:46:29 +00:00 by Ghost · 3 comments

I have a node.js app running well on Windows.

However, that Windows server has 3 IP addresses, and it seems like node.js is listing to port 443 on all the addresses. A netstat -a -n -o call shows:

  TCP    0.0.0.0:443            0.0.0.0:0              LISTENING       6804

and 6804 is one of the PIDs for node.js.

How can I tell greensock which IP address to listen on??

I have a node.js app running well on Windows. However, that Windows server has 3 IP addresses, and it seems like node.js is listing to port 443 on all the addresses. A `netstat -a -n -o` call shows: ```` TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 6804 ```` and 6804 is one of the PIDs for node.js. How can I tell greensock which IP address to listen on??
Author
Now asked here too: https://stackoverflow.com/questions/60069333/bind-greenlock-to-specific-ip-address
Owner

That's in the examples folder https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/https/server.js

That's the folder you need to be looking at for more advanced uses.

That's in the examples folder https://git.rootprojects.org/root/greenlock-express.js/src/branch/master/examples/https/server.js That's the folder you need to be looking at for more advanced uses.
Author

Here's what happens when I add .ready(...) and the code from the example with my IP put in:

Listening on  { address: '10.0.0.4', family: 'IPv4', port: 443 }
Listening on  { address: '0.0.0.0', family: 'IPv4', port: 80 }
Listening on 0.0.0.0:80 for ACME challenges, and redirecting to HTTPS
Error [ERR_SERVER_ALREADY_LISTEN] [ERR_SERVER_ALREADY_LISTEN]: Listen method has been called more than once without closing.
    at Server.listen (net.js:1392:11)
    at Server.<anonymous> (C:\Dev\badi-root\node_modules\@root\greenlock-express\servers.js:118:30)
    at Object.onceWrapper (events.js:312:28)
    at Server.emit (events.js:228:7)
    at Server.EventEmitter.emit (domain.js:475:20)
    at emitListeningNT (net.js:1340:10)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
-------
Here's what happens when I add .ready(...) and the code from the example with my IP put in: ```` Listening on { address: '10.0.0.4', family: 'IPv4', port: 443 } Listening on { address: '0.0.0.0', family: 'IPv4', port: 80 } Listening on 0.0.0.0:80 for ACME challenges, and redirecting to HTTPS Error [ERR_SERVER_ALREADY_LISTEN] [ERR_SERVER_ALREADY_LISTEN]: Listen method has been called more than once without closing. at Server.listen (net.js:1392:11) at Server.<anonymous> (C:\Dev\badi-root\node_modules\@root\greenlock-express\servers.js:118:30) at Object.onceWrapper (events.js:312:28) at Server.emit (events.js:228:7) at Server.EventEmitter.emit (domain.js:475:20) at emitListeningNT (net.js:1340:10) at processTicksAndRejections (internal/process/task_queues.js:80:21) ------- ````
Ghost reopened this issue 2020-02-06 16:02:32 +00:00
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: root/greenlock-express.js#29
No description provided.