aspose file tools*
The moose likes Tomcat and the fly likes ERROR: transport error 202: connect failed: error in tomcat when remote debuging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "ERROR: transport error 202: connect failed: error in tomcat when remote debuging " Watch "ERROR: transport error 202: connect failed: error in tomcat when remote debuging " New topic
Author

ERROR: transport error 202: connect failed: error in tomcat when remote debuging

Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
hello all
im trying to preform remote debugging with tomcat 5.5
and jdk1.5.0_11 on winXP
but im keep getting :

ERROR: transport error 202: connect failed: Connection refused ["transport.c",L41]
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) ["debugInit.c",L500]
JDWP exit error JVMTI_ERROR_INTERNAL(113): No transports initializedFATAL ERROR in native method: JDWP No transports initialized,jvmtiError=JVMTI_ERROR_INTERNAL(113)


this is the tomcat confuguration for the remote debugging
-Xdebug -Xrunjdwp:transport=dt_socket,address=8011 ,server=y,suspend=n
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10033
    
163

A google search for this leads to lots of posts which complain about this error with JDK5. Some suggest


adding 127.0.0.1 localhost in /etc/hosts



and some others suggest

The key is to have the JDK 1.5 beta *JRE* bin directory listed in your path. (make sure it comes before any other JREs).


I even found some posts which mention that this might be because of the firewall installed on the system (try disabling it, if you have one). See if any of these work for you.


[My Blog] [JavaRanch Journal]
Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
ok i did all of that you said , and nothing helped ..
any more ideas ??
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10033
    
163

I have been watching another thread where the user has a similar problem on JBoss. The user came back with a reply saying that he got it working by swapping the position of address=8787 (in your case the port is 8011) and server=y

Like this:



The server=y comes before the "address". It might just be a coincidence that it started working after this change. I am still trying to understand how the positioning works. You might want to give this a try.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10033
    
163

I am going through this article and it says that


Sun's VM implementations require command line options to load the JDWP agent for debugging. From 5.0 onwards the -agentlib:jdwp option is used to load and specify options to the JDWP agent. For releases prior to 5.0, the -Xdebug and -Xrunjdwp options are used (the 5.0 implementation also supports the -Xdebug and -Xrunjdwp options but the newer -agentlib:jdwp option is preferable as the JDWP agent in 5.0 uses the JVMTI interface to the VM rather than the older JVMDI interface).


So if none of the suggested options, in my earlier posts, work for you then you might want to try using

Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
bingo!!
its working thanks allot
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10033
    
163

Originally posted by Meir Yan:
bingo!!
its working thanks allot


Great!!

Which option worked for you? Using -agentlib:jdwp or was it by swapping the position of "server" and "address"?
[ November 07, 2007: Message edited by: Jaikiran Pai ]
Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
the last option
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10033
    
163

Originally posted by Jaikiran Pai:
I am still trying to understand how the positioning works.


After spending sometime on trying to understand this and reproduce this issue on my local setup, i now know what the real problem was. It had nothing to do with the order in which the "server" and "address" parameters were specified.

Originally posted by Meir Yan:

this is the tomcat confuguration for the remote debugging
-Xdebug -Xrunjdwp:transport=dt_socket,address=8011 ,server=y,suspend=n


Observer closely, there's a space between 8011 and the comma. I use JBoss on which i have been successfully configuring debugger using the following parameters:



In order to reproduce this issue, i too added a space after 8787 and the comma:



and started getting the same exception as you. Removing that space fixed the problem. There should not be any space before or after (any of) those comma separated JDPA parameters. The order of "server" and "address" had nothing to with the issue. It was just a coincidence that the space was removed from the parameters when you swapped those parameters. So if you go back and undo the changes and remove the space from that configuration, i bet you too will be able to get this working.
Rohan Honwade
Greenhorn

Joined: Feb 24, 2010
Posts: 5
This thread helped. Thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ERROR: transport error 202: connect failed: error in tomcat when remote debuging