Address/Port already in use + tomcat + Linux

While building our program or project we encounters these sorts of errors obviously.

Steps to overcome the error

For example the error is Address 8080 is already in use.

1. Type the command netstat -lnptu

This command displays the process under the logged in user and their corresponding ports

tcp        0      0 :::8080                      :::*                        LISTEN     2341/java

The above output gives the information about which process is accessing the particular 8080 port.

2. Type “kill” command followed by the name of the process which access the port.

kill 2341

3. Then start building the project again.

There is another way to free the port ; If the port 8080 is unavailable then use the following command

fuser -k 8080/tcp


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s