Symptoms
Unable to access website with Node.js application:
Application has thrown an uncaught exception and is terminated:
Error: Listen EADDRINUSE
Cause
The other process listens on the port specified for Node.js application.
Resolution
Note: if you don’t have administrative access to Plesk server via RDP, contact your hosting provider regarding the issue
-
Log in to Plesk server using RDP and find an unused port:
C:> netstat -a -b
-
Log in to Plesk and navigate to Subscriptions > example.com > Node.js .
-
Click edit oppositely to “Application Startup File”, for example:
-
Specify the port chosen on the step 1, for example:
...
port = process.env.PORT || 3031,
...
app.set('port', 3031);
...Video tutorial: