• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

unable to connect to port 5005

 
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I am trying to use remote debugging in my IDE (Intelli-J IDEA).
However I am not able to connect for some reason and am receiving the following exception. Any ideas?:

Failed to establish connection to the target VM at 'localhost:8080' using socket transport.
Process not started.
Unable to launch target VM : java.net.ConnectException "Connection refused: connect"
 
Ranch Hand
Posts: 1071
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like it's trying to use port 8080 instead of 5005
 
Andy Hahn
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I misstated the previous post. The exception I am receiving is:

Failed to establish connection to the target VM at 'localhost:5005' using socket transport.
Process not started.
Unable to launch target VM : java.net.ConnectException "Connection refused: connect"
 
Andy Hahn
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I figured it out. I had to start Tomcat in debugger mode. To do this I had to add a few parameters to catalina.bat:


set _EXECJAVA=%_RUNJAVA%
set MAINCLASS=org.apache.catalina.startup.Bootstrap
set ACTION=start
set SECURITY_POLICY_FILE=
set DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
set JPDA=


Also, if you run Tomcat using the jar, it will not pick up these changes. You would have to start Tomcat using startup.bat.
 
reply
    Bookmark Topic Watch Topic
  • New Topic