You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Nick Dimos <ni...@googlemail.com> on 2012/04/26 16:58:29 UTC

Error in stop script if KARAF_DEBUG is enabled

Hi,

I have encountered an error while trying to use the stop script in order to
shut down my Karaf instance (2.2.6) with the debug option enabled.
More precisely the error was the following:

karaf: Enabling Java debug options: -Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized
[../../../src/share/back/debugInit.c:690]
FATAL ERROR in native method: JDWP No transports initialized,
jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
Aborted

The problem is that stop script calls karaf script which tries to execute a
new Java process with DEBUG option enabled to the same port.
Attached you can find the diff of the karaf script patched to ignore the
setDebugOptions function in case of stop argument.

If you find it useful I can open a jira.

Thanks,
Nikos

Re: Error in stop script if KARAF_DEBUG is enabled

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
+1

Regards
JB

On 04/26/2012 05:04 PM, Ioannis Canellos wrote:
> I haven't reviewed the patch, but I do like the idea, as I keep on
> having this issue myself all the time :)
>
> I don't see any reason why the stop script should run in debug mode,
> unless someone is debugging the stop itself.
>
> I'd say open a jira and attach the patch and we can continue the
> discussion from there.
>
> --
> *Ioannis Canellos*
> /
> *FuseSource* <http://fusesource.com>
>
> /*/
> /Blog: http://iocanel.blogspot.com <http://iocanel.blogspot.com/>/
> /*/
> Twitter: iocanel
> /
>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Error in stop script if KARAF_DEBUG is enabled

Posted by Ioannis Canellos <io...@gmail.com>.
I haven't reviewed the patch, but I do like the idea, as I keep on having
this issue myself all the time :)

I don't see any reason why the stop script should run in debug mode, unless
someone is debugging the stop itself.

I'd say open a jira and attach the patch and we can continue the discussion
from there.

-- 
*Ioannis Canellos*
*
FuseSource <http://fusesource.com>

**
Blog: http://iocanel.blogspot.com
**
Twitter: iocanel
*