• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • The ImunifyAV extension is now deprecated and no longer available for installation.
    Existing ImunifyAV installations will continue operating for three months, and after that will automatically be replaced with the new Imunify extension. We recommend that you manually replace any existing ImunifyAV installations with Imunify at your earliest convenience.

Issue Ports in use can't run anything

joejoejoe

New Pleskian
Server operating system version
Ubuntu 22.04.5 LTS
Plesk version and microupdate number
Plesk Obsidian 18.0.67
I am new to development and whenever I start a node.js project it says port is in use, how do I change this? I am using digitalcloud
 
Do you use the node.js toolkit extension in Plesk, or do you install node.js by hand?

In some node.js projects, you manually set the port in your code. Simple example:
const express = require('express');
const app = express();
const PORT = 3000; // <-- Here is the port
app.listen(PORT, () => { // <-- This is where we pass it to listen method
console.log(`Server is running on port ${PORT}`);
});
If you choose a port that is already in use, your program will not start because the 'listen' method will fail. You'll need to switch to another port in this case.
To see if a port is already in use, you can run this command:
netstat -tuln | grep 3000
 
Do you use the node.js toolkit extension in Plesk, or do you install node.js by hand?

In some node.js projects, you manually set the port in your code. Simple example:

If you choose a port that is already in use, your program will not start because the 'listen' method will fail. You'll need to switch to another port in this case.
To see if a port is already in use, you can run this command:
I did, this is the only subdomain I have using node, and I installed the extension! Also its a typescript but I don't see how that should be an issue. I tried most ports and I cant launch it!
 
Do you use the node.js toolkit extension in Plesk, or do you install node.js by hand?

In some node.js projects, you manually set the port in your code. Simple example:

If you choose a port that is already in use, your program will not start because the 'listen' method will fail. You'll need to switch to another port in this case.
To see if a port is already in use, you can run this command:
I got this:
tcp6 0 0 :::3000 LISTEN
WHAT does this mean?

This is the error I get by the way:
> next start ⨯ Failed to start serverError: listen EADDRINUSE: address already in use :::3000 at Server.setupListenHandle [as _listen2] (node:net:1937:16) at listenInCluster (node:net:1994:12) at Server.listen (node:net:2099:7) at /var/www/vhosts/ddystopian.xyz/info.ddystopian.xyz/node_modules/next/dist/server/lib/start-server.js:280:16 at new Promise (<anonymous>) at startServer (/var/www/vhosts/ddystopian.xyz/info.ddystopian.xyz/node_modules/next/dist/server/lib/start-server.js:191:11) at Module.nextStart (/var/www/vhosts/ddystopian.xyz/info.ddystopian.xyz/node_modules/next/dist/cli/next-start.js:25:40) at /var/www/vhosts/ddystopian.xyz/info.ddystopian.xyz/node_modules/next/dist/bin/next:105:856 { code: 'EADDRINUSE', errno: -98, syscall: 'listen', address: '::', port: 3000}
 
I got this:
tcp6 0 0 :::3000 LISTEN
WHAT does this mean?
This message means the port you want to use for your Node.js application is already being used by another application. To find the process ID (PID) of the application currently using the port, you can run `sudo lsof -i :3000`. Then, to identify exactly which command is using this port, you can run `ps aux | grep <PID>`.

I did, this is the only subdomain I have using node, and I installed the extension!
Could you please describe how you start the application? Are you encountering an error when using the "Enable Node.js" button in the Plesk web interface?
 
Back
Top