• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Tomcat 8 running on Linux with remote debug connection ESTABLISHED from Eclipse but breakpoint doesn

 
Ranch Hand
Posts: 602
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I try to remote debug Tomcat web app which are running in linux
i started the tomcat with:



in the catalina.sh:



and then i start tomcat with :


when i do netstat -a | grep 8111 i get :




In windows , im using eclipse Version: Mars.1 (4.5.1)
i configured the remote debug



pressed debug , and i see the connection established both in server
and in windows eclipse like this :



and in Linux server when i do netstat -a | grep 8111
i see :



from my experience when the sources are not the same eclipse throw some error massage. and in this case no error has Thrown.
the code are the same in both sides
i set allot of break points in eclipse , the source are the same
but no breakpoints are stooping ... is it a bug ?

 
Bartender
Posts: 20940
127
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see a "Project does not exist" error message for the debug configuration, which indicates that potentially something isn't right. Normally, when remote-debugging Tomcat, I've either got a webapp, a plugin, or a copy of the Tomcat source as a project.

You may have more running than you think you do. Do a "netstat -lnp" to get the processid for port 8111 and make sure that it's the Tomcat you started up with JPDA and not, say an internal Tomcat that Eclipse launched.

And finally, if your source code is too far out of sync with the actual classes being debugged, you'll have set breakpoints, but they'll be for somewhere else, so they won't trigger predictably.
 
Meir Yan
Ranch Hand
Posts: 602
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey thanks for the replay ,
well the ""Project does not exist" ignore it i just wanted to print screen with.
when i do : netstat -lnp it gives me single 8111 port opend
 
Tim Holloway
Bartender
Posts: 20940
127
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The netstat command will never show more than one process opening a port. That's a basic architectural charactistic of TCP/IP at the OS level.

The important part is to determine that the process ID matches the actual Tomcat you are attempting to work with. If there was already a Tomcat running with port 8111 opened, starting a second Tomcat would work, but the second Tomcat would have reduced functionality because the parts of Tomcat (the JVM debugger) that attempted to open/llisten on the port failed (since the port was already in use), but the parts of Tomcat that don't depend on that port continue to operate as normal.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!