• 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!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • 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.

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