Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open port in linux with java application [closed]

Tags:

java

linux

port

I've a java application that creates a socketserver in a port. I test my application in a windows machine, and runs correctly, but when I test it in a linux machine, the port is not listening.

Is there any way to open a port specifically in a linux machine?

I run 'netstat' command, and the port I use in my application doesn't appear. It doesn't throw any exception. I'm trying to connect from another machine to the application, and the connection is refused.

Sincerely, I don't know why it doesn't run...

help please.

thanks, david


1 Answers

What is the port number you're trying to open ?

If it's below 1024, then only the root user can open it or grant access to it.

like image 193
Johan Buret Avatar answered May 25 '26 13:05

Johan Buret