• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved Cannot make nodejs application listen on different port

proton23

Basic Pleskian
Server operating system version
Ubuntu 20.04.6 LTS
Plesk version and microupdate number
Plesk Obsidian 18.0.52
Hello,
I was finally able to make openhab cloud work.
The application is listening on port 3000 and I would like to change this since Dr.Web is using this port.
The code of app.js contains this line.
JavaScript:
app.set('port', process.env.PORT || 3000);
I tried to set env variable PORT to 3001, without any change.
Even if I change it to
JavaScript:
app.set('port', 3001);
the app will always start on port 3000

Is there a way to tell a nodejs app witch port to listen to, on start up?

Best regards
 
Thanks for the reply!
I'm not quite sure how this is supposed to work.
Isn't
JavaScript:
app.set('port', process.env.PORT || 3000);
nearly what was suggested in the article?
And where will the port be set?

Best regards
 
So the support fixed my problem but in a different way. Not the port of the node.js application was changed but the port of the Plesk Antivirus Service.
Since it can break every time through an update they told me how to fix it.
Bash:
 grep -R 2999 /etc/drweb/
/etc/drweb/drweb_handler.conf:Address = inet:2999@localhost
/etc/drweb/drweb32.ini:Socket = 2999, localhost
With this changes drweb is now listening on port 2999.

Best regards
 
Back
Top