Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot start Apache Tomcat 6 from IntelliJ IDEA 12.1.4 Ultimate (Windows 7)

Tags:

I need to debug a web application for Tomcat6 in IntelliJ IDEA.

When I try to run my web application, I get two errors:

  1. Address localhost:1099 is already in use
  2. Unable to open debugger port: java.net.SocketException

Launching the Apache Tomcat 6 service manually works fine.

What should I do in order to be able to debug web applications in Apache Tomcat 6 from Intellij IDEA?

like image 238
Dmitrii Pisarenko Avatar asked Sep 11 '13 12:09

Dmitrii Pisarenko


People also ask

Does Tomcat work with IntelliJ?

If you're not creating a new project from scratch and instead have an existing project that runs on Tomcat, you can configure IntelliJ IDEA Ultimate to connect to your existing Tomcat installation.

Does IntelliJ have embedded Tomcat?

We're going to create a small web application that runs on Tomcat to demonstrate the integration in IntelliJ IDEA Ultimate: From the Welcome Screen select New Project. If you have an existing project open, click File > New.


1 Answers

Following the below steps work:-

  1. Open command prompt and type the command netstat -ano
  2. You will see a list of active TCP connections with PID as the last column
  3. See the second column listing the local addresses and find the one using port 1099 from it and you'll get its PID
  4. Now open your Task Manager, click the Process tab and get the PID column to display [either by right clicking on the heading row and selecting PID OR click View, and then click Select Columns and select PID.]
  5. Now find the PID we got from Step3 and end the process.

Now you are good to go :)

like image 113
varna Avatar answered Oct 02 '22 23:10

varna