Closed roccomuso closed 7 years ago
I cannot confirm this. When I start the SimpleServer.js script lsof -i :8888
gives me the following
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 8720 stefan 12u IPv4 184113 0t0 TCP *:8888 (LISTEN)
When I quit the script, no process is listening on this port and I can restart the server without errors.
The example script listens to port 8888, did you change the port because it says 8889?
I changed the port because the 8888
was still in listen :') Now the 8888
is no more listening but there's the 8889
busy.
Can you do a ps -e
and confirm that the process is really killed? Are you polling the server with a modbus client?
The process is running. If I kill the process, it's respawned with another PID. I'm polling it with a custom client yes.
I do not see anything in the SimpleServer.js file that restarts the script. I'll do the following to start the script:
Did you alter anything else in the script?
Nevermind.. My fault. It was a client issue, respawning the SimpleServer.js
.
Thanks for the fast support :)
If I run the example script on a given port, and then I close it, I still have:
And I cannot run again the script because of the
EADDRINUSE
error.