• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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