Web app says port 443 is already used, but it doesnt seem to actually be

mongol

New Member
Joined
Jun 17, 2023
Messages
2
Reaction score
0
Credits
19
I am trying to run a Spring application on Ubuntu, but it always says port 443 is already used. After running commands to check for processes on that port nothing came up, even after killing the task under port 443 the same error message came up. I did try to allow the port in the firewall as well. This error doesnt occur on Windows

-
fix: used sudo
 
Last edited:


I am trying to run a Spring application on Ubuntu, but it always says port 443 is already used. After running commands to check for processes on that port nothing came up, even after killing the task under port 443 the same error message came up. I did try to allow the port in the firewall as well. This error doesnt occur on Windows
It's possible that the port is being used by a service that isn't listed by the commands you used to check. You can try using the command sudo netstat -tulpn | grep 443 to list all processes listening on port 443.

If you still can't find the process, it's possible that the port is being used by a kernel module or a hidden process. You can try running the command sudo lsof -i :443 to find any processes using that port, including processes with hidden names.

If you're still having trouble, you might want to try changing the port that your Spring application listens on. You can do this by editing the server.port property in your application.properties file. For example, you could set server.port=8443 to listen on port 8443 instead of port 443.

Let me know if you have any further questions!
 
It's possible that the port is being used by a service that isn't listed by the commands you used to check. You can try using the command sudo netstat -tulpn | grep 443 to list all processes listening on port 443.

If you still can't find the process, it's possible that the port is being used by a kernel module or a hidden process. You can try running the command sudo lsof -i :443 to find any processes using that port, including processes with hidden names.

If you're still having trouble, you might want to try changing the port that your Spring application listens on. You can do this by editing the server.port property in your application.properties file. For example, you could set server.port=8443 to listen on port 8443 instead of port 443.

Let me know if you have any further questions!
both commands you showed listed nothing, but i cant switch the ports because i need to use https. could switching the os help, like if this problem could be ubuntu specific
 
both commands you showed listed nothing, but i cant switch the ports because i need to use https. could switching the os help, like if this problem could be ubuntu specific
It is unlikely that the problem is specific to Ubuntu. However, you can try a few other things first.

First, you can try stopping and disabling any services that you are not using, especially any that might be using secure ports. For example, the Apache service might be using port 443 on Ubuntu. You can stop and disable it with the following commands:

Code:
sudo systemctl stop apache2
sudo systemctl disable apache2

Next, you can check if you have SELinux enabled on Ubuntu. It is a security module that can prevent processes from binding to specific ports. You can run the following command to check if it is enabled:

Code:
sudo apt-get install selinux-utils
sudo selinuxenabled && echo "Enabled" || echo "Disabled"

If it is enabled, you can temporarily disable it to see if it resolves the issue:

Code:
sudo setenforce 0

If none of the above steps works, you can consider switching to a different distribution or contacting the Spring community for support.
 

Staff online

Members online


Top