Question

I am trying to run a Java webapp build instance but it stops in the middle of the build with this error:

java.net.BindException: Address already in use:8080

It's obviously trying to bind to the 8080 port but another process has already done so and wont share.

So, I checked to see what process is using the 8080 (netstat -anp | grep 8080). Apparently the jsvc.exec process is listening to my 8080 port. Upon checking (ps -fp) I find out that this is Tomcat (boostrap.jar).

So, to see if the build would at least complete, I killed the process. And yeah!! The Webapp build installed completely. But when I navigated my browser to localhost:8080 it says the service is not running - coz I killed Tomcat! I even tried localhost:8080/manager/list. Still said service not running.

So I restart Tomcat, checked localhost:8080 and Tomcat was back up. Checked localhost:8080/manager/list but did not see the Webapp instance I had just built.

What I am not getting here! My webapp wont build if I run tomcat (cant share 8080). And If i kill tomcat to complete the build, the webapp obviously cant run coz Tomcat is dead.

Please help me. Running Tomcat 5.5 in a LAMP environment on a remote server. NOTE: I am running a pre-built webapp build application (war) which I cant make changes to.

Was it helpful?

Solution

During a build? A build process usually doesn't require a port to be open. The issue is that two programs are attempting to use the same port. Without fixing the underlying issue, the immediate fix is to change the port Tomcat is running on. To change the port Tomcat runs on, edit install_dir/conf/server.xml and change the port attribute of the Connector element from 8080 to 8081.

OTHER TIPS

If this is your first time running Confluence or you have recently added applications or made changes to the system, investigate what's running on port 8080.

If Confluence was not shut down properly, you can restart the machine or kill the process: On Windows:

  1. Hit Ctrl-alt-delete and look at open programs. Look for {{java.exe}}.

  2. From a command window, run {{netstat -an}}. Check which ports are in use. You can identify which application is running this way, then close it from the Task Manager.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top