[mule-user] Remote Debugging in Mule 1.4

10 views
Skip to first unread message

Scott Johnson

unread,
Apr 27, 2007, 10:26:03 AM4/27/07
to us...@mule.codehaus.org
Hello,

I am in the process of evaluating Mule for a new project and, while I
have made great progress in getting my suite of services to work, I
have encountered a problem in trying to enable remote debugging to
debug one of my services.

In $MULE_HOME/conf/wrapper.conf I uncommented the debug section
(ensuring the wrapper.java.additional.n value is correct for my config):

wrapper.java.additional.4=-Xdebug -Xnoagent -Djava.compiler=NONE -
Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005

When I start Mule, it does post a notice about debugging being
enabled and that it may suspend and yet it does not suspend. Also,
when I set suspend=n and just try to attach after startup via either
jdb or my IDE (IDEA) I get a "connection refused" exception.

I'm running Mule on Mac OS X v 10.4.9. Is anyone successfully
debugging remotely in v1.4 on Mac OS X?

Scott Johnson, Software Developer
MediaSpan Media Software
sjoh...@mediaspansoftware.com


---------------------------------------------------------------------
To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Paul Robinson

unread,
Jul 6, 2007, 9:59:26 AM7/6/07
to us...@mule.codehaus.org

Scott,

This describes my problem exactly, did you manage to find a solution?

Thanks,

Paul.

--
View this message in context: http://www.nabble.com/Remote-Debugging-in-Mule-1.4-tf3657982.html#a11464790
Sent from the Mule - User mailing list archive at Nabble.com.

Andrew Perepelytsya

unread,
Jul 6, 2007, 10:17:59 AM7/6/07
to us...@mule.codehaus.org
Guys,

I'm doing remote debugging quite often without any issues. Post your wrapper.conf and IDE connect line for verification.

Andrew

Paul Robinson

unread,
Jul 6, 2007, 11:41:08 AM7/6/07
to us...@mule.codehaus.org

Hello,

I've atatched the wrapper.conf and the output from the console.

the following shows my remote debug settings in my ide:

http://www.nabble.com/file/p11467560/Screenshot-Run-Debug%2BConfigurations.png

additionaly i've tried the following:

$telnet localhost 5005

for which i get a "connection reffused". The same error that I receive in
IntelliJ. I've also tried attatching to a different Java application using
the same java properties for which I can both attach to using IntelliJ and
using telnet.

Hope this is enough information,

Paul.

http://www.nabble.com/file/p11467560/wrapper.conf wrapper.conf
http://www.nabble.com/file/p11467560/console.out console.out
--
View this message in context: http://www.nabble.com/Remote-Debugging-in-Mule-1.4-tf3657982.html#a11467560

Andrew Perepelytsya

unread,
Jul 6, 2007, 11:50:41 AM7/6/07
to us...@mule.codehaus.org
Paul,

I see nothing wrong in the config. I remember sometimes I had similar problems which had their cause in JDK and/or IDEA bugs, try varying those.

Paul Robinson

unread,
Jul 9, 2007, 4:44:38 AM7/9/07
to us...@mule.codehaus.org

Andrew: Thanks for the response,

I should tell you, I'm running linux (fedora7), I guess this is relevant as
it will dictate which wrapper I'm using.

I've tried jdk1.5.0_12 and jdk1.6.0_01; I get the same problem in both.
Which JDK do you (Andrew) use? I'll try that one next.

I've also tried mule-1.3 and mule-1.4.1; again I get the same problem.

As I understand it, if i set "suspend=y", then I should notice mule suspend
at some point during boot up, until I attach a debugger. In my case, mule
boots fully. Can you tell me when mule should suspend?

Thanks a lot,

Paul Robinson.

--
View this message in context: http://www.nabble.com/Remote-Debugging-in-Mule-1.4-tf3657982.html#a11498033

Edwin Tellman

unread,
Jul 9, 2007, 5:58:38 AM7/9/07
to us...@mule.codehaus.org

I'm using OS X and IDEA and had the same experience. I found that if
I split the debugger options into two lines, it seemed to work fine:

wrapper.java.additional.4=-Xdebug -Xnoagent -Djava.compiler=NONE
wrapper.java.additional.5=-
Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005

instead of:


wrapper.java.additional.4=-Xdebug -Xnoagent -Djava.compiler=NONE -
Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005

--Ed Tellman

> Debugging-in-Mule-1.4-tf3657982.html#a11498033


> Sent from the Mule - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>

Paul Robinson

unread,
Jul 9, 2007, 6:38:24 AM7/9/07
to us...@mule.codehaus.org

Thanks a lot,

I've just tested what you suggest and it works.

I'm guessing the safest thing to do would be to have every parameter on a
separate line. I'm not sure what's happening in the code, but it could be
passing each line as an individual argument to the args array of the Java
main method. I'm not sure how the wrapper works, so I'm just speculating.

There does seem to be a bug somewhere here. Even if it's just the suggested
debug line that is commented out in the shipped 1.4.1 version of mule.

Thanks again,

Paul Robinson.

--
View this message in context: http://www.nabble.com/Remote-Debugging-in-Mule-1.4-tf3657982.html#a11498989

Andrew Perepelytsya

unread,
Jul 9, 2007, 8:49:07 AM7/9/07
to us...@mule.codehaus.org
Paul,

Yes, these lines technically should be separated. However, most of the time it works on a single line. I haven't found a pattern yet (it's wrapper's rules). The trick here is to make them sequential and use the proper starting count. I had some ideas about simplifying JPDA config, so we can expect some improvements in this area in the future.

Andrew

Paul Robinson

unread,
Jul 9, 2007, 9:26:36 AM7/9/07
to us...@mule.codehaus.org

Andrew,

Could a short term fix be to modify the wrapper.conf that ships with mule,
such that each item property is on a separate line?

Could save many people a lot of frustration in the future.

Paul Robinson.

--
View this message in context: http://www.nabble.com/Remote-Debugging-in-Mule-1.4-tf3657982.html#a11501729

Lukasz Lipka

unread,
Sep 6, 2007, 6:01:06 AM9/6/07
to us...@mule.codehaus.org

hi,
and could you add some information about this problem in to main page, that
people that use linux nad mac, could quickly fix it.

Best regards
Lukasz Lipka

--
View this message in context: http://www.nabble.com/Remote-Debugging-in-Mule-1.4-tf3657982.html#a12519054

Andrew Perepelytsya

unread,
Sep 6, 2007, 9:33:37 AM9/6/07
to us...@mule.codehaus.org
This is not required, 1.4.2 ships this change, as well as other remote debugging improvements.

Andrew
Reply all
Reply to author
Forward
0 new messages