This type of error arises when the port number which listen() tries to bind the server to is already in use.
So before start nodejs app again, you must have to stop previous running nodejs app or kill running nodejs process.
You can check current running all nodejs process by the following command
Stop current running app by the following command
Now start nodejs app again and your app will run successfully.
So before start nodejs app again, you must have to stop previous running nodejs app or kill running nodejs process.
You can check current running all nodejs process by the following command
ps aux| grep node
Out put
root 14584 0.0 0.6 938816 22580 ? Ssl 01:23 0:02 node app.js(your app path and runnig file)
Out put
root 14584 0.0 0.6 938816 22580 ? Ssl 01:23 0:02 node app.js(your app path and runnig file)
Stop current running app by the following command
kill <processId>
EX :
kill 14584
EX :
kill 14584
Now start nodejs app again and your app will run successfully.
No comments:
Post a Comment