Java.lang.Exception: port 8083 is already in use

I get an exception on the console that:

java.lang.Exception: Port 8083 already in use. 

How to resolve this exception? If I get which service uses port 8083, then I can stop this service, and thus I can overcome this problem.

Thanks for your help!

+6
source share
9 answers

java.lang.Exception: port 8083 is already in use.

The error means that another application already has this port, so you cannot use it. Typically, this means that the server is up (or down), but still has an open port. Often this error occurs when you try to shut down one server and bring out a new version, but the first server is not full down when starting a new one. You need to find the server in question, and you may have to kill it using kill -9 or something like that.

A good tool to find out which application has an open port is lsof . This should work for at least most Unix (Linux) and MacOSX.

 lsof -i :8083 

lsof is for listing open files on the system, but the -i option is for internet addresses:

 -i [i] This option selects the listing of files any of whose Internet address matches the address specified in i. [46][protocol][@hostname|hostaddr][:service|port] 
+10
source

I get this with the JBoss server every once in a while. It is not interesting that you will need to restart Java, but the above methods did not work.

For Mac OS X :

SLOW

  • Open activity monitor.
  • Filter by "java"
  • Close all processes (usually only one).
  • Reboot the server.

Fast

ps aux | grep 'java' ps aux | grep 'java' to display the current Java processes and their identifiers.

kill -9 process_id_goes_here

+6
source

Excluded because you are trying to bind to a port that is already in use by another process.

Using netstat -a from the command line, you will see a list of open ports and a process that uses them. How can you kill him.

Update:

On Windows, you can use netstat -ao to display all used ports along with the identifier of the process to which the connection belongs.

On Linux, you can use netstat -p to specify the process name.

+5
source

An exception means: port "8083" is already open. You enable this by stopping this service or using another port yourself.

I would suggest that your own service is already running when you try to start it, so stop the old instance before starting the new one.

(I know that Tomcat runs on 8080, and sometimes people change it to 8083, but it is impossible for anyone to know what service works on your computer using this port.)

+1
source

Either terminate the process that uses port 8083, or configure the application to work on another port. Smart applications try to use the alternate port automatically.

0
source

If you start the server to deploy your application, it may happen that any other process or application uses this port. Outlook, Skype or other applications do this sometimes at my work. Use this program, such as CPorts , to kill this connection and restart the server.

0
source

There is another possibility: you can try to bind the wrong IP address - JBoss will report this, because it cannot bind to the port.

Check your -b option to your run.sh and make sure it is either 0.0.0.0, or the IP or hostname of the server.
- If it is 0.0.0.0, then the problem is that the port is in use.
- If this is IP, make sure it is the correct ip using / sbin / ifconfig (or ipconfig on Windows)
- If this is the host name, then run telnet hostname_here
and make sure that the IP address that resolves is the correct IP address.

I had this exact problem and found that someone had put the wrong IP address in the / etc / hosts file. As soon as I fixed the file, JBoss started fine.

0
source

In Eclipse, if you get this error, it means that one or two Eclipse instances are using the same port.

The solution is to contact the process manager of your operating system and kill Eclipse and java.

0
source

Verify that the ports are two JBOSS instances in conf / bindingservices.beans / META-INF / bindings-jboss-beans.xml

There are about 10 ports to change.

0
source

Source: https://habr.com/ru/post/903291/


All Articles