Infamous permgen leak

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Infamous permgen leak

dantran
Hello Karaf Team

Each time I reinstall/update a feature at runtime, my karaf loses some
permgen. Amount depending on number to classes I have.  Is there any
one able to address this issue?

Setting JVM to  -XX:+CMSPermGenSweepingEnabled
-XX:+CMSClassUnloadingEnabled  doesnot help.

-Dan
Reply | Threaded
Open this post in threaded view
|

Re: Infamous permgen leak

jbonofre
Hi Dan,

thanks for the report, we have to profile what is consuming the perm.

On which version do you notice that ?

Regards
JB

On 12/15/2011 08:36 AM, Dan Tran wrote:

> Hello Karaf Team
>
> Each time I reinstall/update a feature at runtime, my karaf loses some
> permgen. Amount depending on number to classes I have.  Is there any
> one able to address this issue?
>
> Setting JVM to  -XX:+CMSPermGenSweepingEnabled
> -XX:+CMSClassUnloadingEnabled  doesnot help.
>
> -Dan

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Infamous permgen leak

dantran
I have noticed the leak since 2.2.2. Let me do some measurement ( via
JConsole ) on other features other than mine, and let you know

Thanks

-Dan

On Wed, Dec 14, 2011 at 11:38 PM, Jean-Baptiste Onofré <[hidden email]> wrote:

> Hi Dan,
>
> thanks for the report, we have to profile what is consuming the perm.
>
> On which version do you notice that ?
>
> Regards
> JB
>
>
> On 12/15/2011 08:36 AM, Dan Tran wrote:
>>
>> Hello Karaf Team
>>
>> Each time I reinstall/update a feature at runtime, my karaf loses some
>> permgen. Amount depending on number to classes I have.  Is there any
>> one able to address this issue?
>>
>> Setting JVM to  -XX:+CMSPermGenSweepingEnabled
>> -XX:+CMSClassUnloadingEnabled  doesnot help.
>>
>> -Dan
>
>
> --
> Jean-Baptiste Onofré
> [hidden email]
> http://blog.nanthrax.net
> Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Infamous permgen leak

jbonofre
In reply to this post by dantran
Hi Dan,

just to understand your issues:
- if you talk about the feature service itself, I'm agree that it
shouldn't consume perm
- but the loaded classes (loaded by the feature service) consumes perm,
and it's a normal behavior (it's exactly the same with on Tomcat with
hot-deployment for instance)

Regards
JB

On 12/15/2011 08:36 AM, Dan Tran wrote:

> Hello Karaf Team
>
> Each time I reinstall/update a feature at runtime, my karaf loses some
> permgen. Amount depending on number to classes I have.  Is there any
> one able to address this issue?
>
> Setting JVM to  -XX:+CMSPermGenSweepingEnabled
> -XX:+CMSClassUnloadingEnabled  doesnot help.
>
> -Dan

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

How to set up the remote debug with karaf in eclipse indigo

XiLai Dai
In reply to this post by jbonofre
Hello,

Does anybody has the experience which setting up the debug environment with eclipse indigo?

I did the following steps:
1. install EIK plugin from update site: http://svn.codespot.com/a/eclipselabs.org/eik/trunk/features/info.evanchik.eclipse.karaf.update/ 
2. follow the steps of http://code.google.com/a/eclipselabs.org/p/eik/wiki/UsingEIK 

Then , start karaf 2.2.4 with debug option:   Listening for transport dt_socket at address: 5005
Debug a bundle project from eclipse IDE, but always got:

Failed to connect to remote VM. Connection refused.
Connection refused: connect

Thanks.
Xilai
Reply | Threaded
Open this post in threaded view
|

Re: Infamous permgen leak

dantran
In reply to this post by jbonofre
It is about feature to be loaded in and out of karaf dynamically.  So
I guess is a known issue to 'java', karaf is not an exception :(

Wonder if ACE can solve this issue


-D

On Thu, Dec 15, 2011 at 12:15 AM, Jean-Baptiste Onofré <[hidden email]> wrote:

> Hi Dan,
>
> just to understand your issues:
> - if you talk about the feature service itself, I'm agree that it shouldn't
> consume perm
> - but the loaded classes (loaded by the feature service) consumes perm, and
> it's a normal behavior (it's exactly the same with on Tomcat with
> hot-deployment for instance)
>
>
> Regards
> JB
>
> On 12/15/2011 08:36 AM, Dan Tran wrote:
>>
>> Hello Karaf Team
>>
>> Each time I reinstall/update a feature at runtime, my karaf loses some
>> permgen. Amount depending on number to classes I have.  Is there any
>> one able to address this issue?
>>
>> Setting JVM to  -XX:+CMSPermGenSweepingEnabled
>> -XX:+CMSClassUnloadingEnabled  doesnot help.
>>
>> -Dan
>
>
> --
> Jean-Baptiste Onofré
> [hidden email]
> http://blog.nanthrax.net
> Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: How to set up the remote debug with karaf in eclipse indigo

Freeman-2
In reply to this post by XiLai Dai
Hi,

How you enable karaf debug?
Did you
export KARAF_DEBUG=true
in the shell before you launch Karaf?

Freeman
On 2011-12-15, at 下午4:20, XiLai Dai wrote:

Hello,

Does anybody has the experience which setting up the debug environment with eclipse indigo?

I did the following steps:
1. install EIK plugin from update site: http://svn.codespot.com/a/eclipselabs.org/eik/trunk/features/info.evanchik.eclipse.karaf.update/
2. follow the steps of http://code.google.com/a/eclipselabs.org/p/eik/wiki/UsingEIK

Then , start karaf 2.2.4 with debug option:   Listening for transport dt_socket at address: 5005
Debug a bundle project from eclipse IDE, but always got:

Failed to connect to remote VM. Connection refused.
Connection refused: connect

Thanks.
Xilai

---------------------------------------------
Freeman Fang

FuseSource
Twitter: freemanfang









Reply | Threaded
Open this post in threaded view
|

RE: How to set up the remote debug with karaf in eclipse indigo

XiLai Dai

Hi, Freeman,

 

Run with bin\karaf.bat debug,  and got:

TCP    0.0.0.0:5005           0.0.0.0:0              LISTENING       3288

When execute netstat –ano

 

Thanks.

Xilai

From: Freeman Fang [mailto:[hidden email]]
Sent: Thursday, December 15, 2011 4:34 PM
To: [hidden email]
Subject: Re: How to set up the remote debug with karaf in eclipse indigo

 

Hi,

 

How you enable karaf debug?

Did you

export KARAF_DEBUG=true

in the shell before you launch Karaf?

 

Freeman

On 2011-12-15, at 下午4:20, XiLai Dai wrote:



Hello,

Does anybody has the experience which setting up the debug environment with eclipse indigo?

I did the following steps:
1. install EIK plugin from update site: http://svn.codespot.com/a/eclipselabs.org/eik/trunk/features/info.evanchik.eclipse.karaf.update/
2. follow the steps of http://code.google.com/a/eclipselabs.org/p/eik/wiki/UsingEIK

Then , start karaf 2.2.4 with debug option:   Listening for transport dt_socket at address: 5005
Debug a bundle project from eclipse IDE, but always got:

Failed to connect to remote VM. Connection refused.
Connection refused: connect

Thanks.
Xilai

 

---------------------------------------------

Freeman Fang

 

FuseSource

Twitter: freemanfang

 

 

 

 

 

 

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: How to set up the remote debug with karaf in eclipse indigo

Freeman-2
Hi,

Try to use
export KARAF_DEBUG=true
in the shell where you launch karaf to see if there's any difference, seems the "bin/karaf debug" is incorrect, you should be able to see output like
karaf: Enabling Java debug options: -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
Listening for transport dt_socket at address: 5005
if all set.

Freeman

On 2011-12-15, at 下午4:44, XiLai Dai wrote:

Hi, Freeman,
 
Run with bin\karaf.bat debug,  and got:
TCP    0.0.0.0:5005           0.0.0.0:0              LISTENING       3288
When execute netstat –ano
 
Thanks.
Xilai
From: Freeman Fang [[hidden email]] 
Sent: Thursday, December 15, 2011 4:34 PM
To: [hidden email]
Subject: Re: How to set up the remote debug with karaf in eclipse indigo
 
Hi,
 
How you enable karaf debug?
Did you
export KARAF_DEBUG=true
in the shell before you launch Karaf?
 
Freeman
On 2011-12-15, at 下午4:20, XiLai Dai wrote:


Hello, 

Does anybody has the experience which setting up the debug environment with eclipse indigo? 

I did the following steps:
1. install EIK plugin from update site: http://svn.codespot.com/a/eclipselabs.org/eik/trunk/features/info.evanchik.eclipse.karaf.update/ 
2. follow the steps of http://code.google.com/a/eclipselabs.org/p/eik/wiki/UsingEIK 

Then , start karaf 2.2.4 with debug option:   Listening for transport dt_socket at address: 5005 
Debug a bundle project from eclipse IDE, but always got:

Failed to connect to remote VM. Connection refused.
Connection refused: connect

Thanks.
Xilai
 
---------------------------------------------
Freeman Fang
 
FuseSource
Twitter: freemanfang
 
 
 
 
 
 
 
 
 

---------------------------------------------
Freeman Fang

FuseSource
Twitter: freemanfang









Reply | Threaded
Open this post in threaded view
|

Re: How to set up the remote debug with karaf in eclipse indigo

luke
For windows users it won't be a export, it will be
set KARAF_DEBUG=1

You can also add KARAF_DEBUG as user environment variable, but then every time when'll start karaf you'll get a debug turned on, which might slow a bit JVM.

Regards,
Lukasz

Hi,

Try to use
export KARAF_DEBUG=true
in the shell where you launch karaf to see if there's any difference, seems the "bin/karaf debug" is incorrect, you should be able to see output like
karaf: Enabling Java debug options: -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
Listening for transport dt_socket at address: 5005
if all set.

Freeman

On 2011-12-15, at 下午4:44, XiLai Dai wrote:

Hi, Freeman,
 
Run with bin\karaf.bat debug,  and got:
TCP    0.0.0.0:5005           0.0.0.0:0              LISTENING       3288
When execute netstat –ano
 
Thanks.
Xilai
From: Freeman Fang [[hidden email]] 
Sent: Thursday, December 15, 2011 4:34 PM
To: [hidden email]
Subject: Re: How to set up the remote debug with karaf in eclipse indigo
 
Hi,
 
How you enable karaf debug?
Did you
export KARAF_DEBUG=true
in the shell before you launch Karaf?
 
Freeman
On 2011-12-15, at 下午4:20, XiLai Dai wrote:


Hello, 

Does anybody has the experience which setting up the debug environment with eclipse indigo? 

I did the following steps:
1. install EIK plugin from update site: http://svn.codespot.com/a/eclipselabs.org/eik/trunk/features/info.evanchik.eclipse.karaf.update/ 
2. follow the steps of http://code.google.com/a/eclipselabs.org/p/eik/wiki/UsingEIK 

Then , start karaf 2.2.4 with debug option:   Listening for transport dt_socket at address: 5005 
Debug a bundle project from eclipse IDE, but always got:

Failed to connect to remote VM. Connection refused.
Connection refused: connect

Thanks.
Xilai
 
---------------------------------------------
Freeman Fang
 
FuseSource
Twitter: freemanfang
 
 
 
 
 
 
 
 
 

---------------------------------------------
Freeman Fang

FuseSource
Twitter: freemanfang










Reply | Threaded
Open this post in threaded view
|

RE: How to set up the remote debug with karaf in eclipse indigo

XiLai Dai

Tried with set KARAF_DEBUG=true before start karaf, and got:

 

karaf.bat: Enabling Java debug options: -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,sus

pend=n,address=5005

Listening for transport dt_socket at address: 5005

 

But still got the same error L when try to debug a bundle project.

 

Thanks.

Xilai

From: Łukasz Dywicki [mailto:[hidden email]]
Sent: Thursday, December 15, 2011 5:05 PM
To: [hidden email]
Subject: Re: How to set up the remote debug with karaf in eclipse indigo

 

For windows users it won't be a export, it will be

set KARAF_DEBUG=1

 

You can also add KARAF_DEBUG as user environment variable, but then every time when'll start karaf you'll get a debug turned on, which might slow a bit JVM.

 

Regards,

Lukasz



Hi,

 

Try to use

export KARAF_DEBUG=true

in the shell where you launch karaf to see if there's any difference, seems the "bin/karaf debug" is incorrect, you should be able to see output like

karaf: Enabling Java debug options: -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

Listening for transport dt_socket at address: 5005

if all set.

 

Freeman

 

On 2011-12-15, at 下午4:44, XiLai Dai wrote:



Hi, Freeman,

 

Run with bin\karaf.bat debug,  and got:

TCP    0.0.0.0:5005           0.0.0.0:0              LISTENING       3288

When execute netstat –ano

 

Thanks.

Xilai

From: Freeman Fang [[hidden email]] 
Sent: Thursday, December 15, 2011 4:34 PM
To: [hidden email]
Subject: Re: How to set up the remote debug with karaf in eclipse indigo

 

Hi,

 

How you enable karaf debug?

Did you

export KARAF_DEBUG=true

in the shell before you launch Karaf?

 

Freeman

On 2011-12-15, at 下午4:20, XiLai Dai wrote:




Hello, 

Does anybody has the experience which setting up the debug environment with eclipse indigo? 

I did the following steps:
1. install EIK plugin from update site: http://svn.codespot.com/a/eclipselabs.org/eik/trunk/features/info.evanchik.eclipse.karaf.update/ 
2. follow the steps of http://code.google.com/a/eclipselabs.org/p/eik/wiki/UsingEIK 

Then , start karaf 2.2.4 with debug option:   Listening for transport dt_socket at address: 5005 
Debug a bundle project from eclipse IDE, but always got:

Failed to connect to remote VM. Connection refused.
Connection refused: connect

Thanks.
Xilai

 

---------------------------------------------

Freeman Fang

 

FuseSource

Twitter: freemanfang

 

 

 

 

 

 

 

 

 

 

---------------------------------------------

Freeman Fang

 

FuseSource

Twitter: freemanfang

 

 

 

 

 

 

 

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: How to set up the remote debug with karaf in eclipse indigo

Freeman-2
IIRC, in eclipse "Debug Configurations" panel, if you create a "Remote Java Application" debug, the default port is 8000 but not the expected 5005, you may need double check this property in your eclipse "Debug Configurations"

Freeman
On 2011-12-15, at 下午5:12, XiLai Dai wrote:

Tried with set KARAF_DEBUG=true before start karaf, and got:
 
karaf.bat: Enabling Java debug options: -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,sus
pend=n,address=5005
Listening for transport dt_socket at address: 5005
 
But still got the same error L when try to debug a bundle project.
 
Thanks.
Xilai
From: Łukasz Dywicki [[hidden email]] 
Sent: Thursday, December 15, 2011 5:05 PM
To: [hidden email]
Subject: Re: How to set up the remote debug with karaf in eclipse indigo
 
For windows users it won't be a export, it will be
set KARAF_DEBUG=1
 
You can also add KARAF_DEBUG as user environment variable, but then every time when'll start karaf you'll get a debug turned on, which might slow a bit JVM.
 
Regards,
Lukasz


Hi,
 
Try to use
export KARAF_DEBUG=true
in the shell where you launch karaf to see if there's any difference, seems the "bin/karaf debug" is incorrect, you should be able to see output like
karaf: Enabling Java debug options: -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
Listening for transport dt_socket at address: 5005
if all set.
 
Freeman
 
On 2011-12-15, at 下午4:44, XiLai Dai wrote:


Hi, Freeman,
 
Run with bin\karaf.bat debug,  and got:
TCP    0.0.0.0:5005           0.0.0.0:0              LISTENING       3288
When execute netstat –ano
 
Thanks.
Xilai
From: Freeman Fang [[hidden email]] 
Sent: Thursday, December 15, 2011 4:34 PM
To: [hidden email]
Subject: Re: How to set up the remote debug with karaf in eclipse indigo
 
Hi,
 
How you enable karaf debug?
Did you
export KARAF_DEBUG=true
in the shell before you launch Karaf?
 
Freeman
On 2011-12-15, at 下午4:20, XiLai Dai wrote:



Hello, 

Does anybody has the experience which setting up the debug environment with eclipse indigo? 

I did the following steps:
1. install EIK plugin from update site: http://svn.codespot.com/a/eclipselabs.org/eik/trunk/features/info.evanchik.eclipse.karaf.update/ 
2. follow the steps of http://code.google.com/a/eclipselabs.org/p/eik/wiki/UsingEIK 

Then , start karaf 2.2.4 with debug option:   Listening for transport dt_socket at address: 5005 
Debug a bundle project from eclipse IDE, but always got:

Failed to connect to remote VM. Connection refused.
Connection refused: connect

Thanks.
Xilai
 
---------------------------------------------
Freeman Fang
 
FuseSource
Twitter: freemanfang
 
 
 
 
 
 
 
 
 
 
---------------------------------------------
Freeman Fang
 
FuseSource
Twitter: freemanfang
 
 
 
 
 
 
 
 
 
 

---------------------------------------------
Freeman Fang

FuseSource
Twitter: freemanfang









Reply | Threaded
Open this post in threaded view
|

Re: How to set up the remote debug with karaf in eclipse indigo

luke
In reply to this post by XiLai Dai
<base href="x-msg://43/">Xilai,
Make sure you debug configuration in Eclipse points to port 5005. By default it is 8000. Also once you are connected to this port the second try will fail. To ensure that you are not already connected to Karaf switch a perspective to debug and check the process/threads list.

Regards,
Lukasz



Tried with set KARAF_DEBUG=true before start karaf, and got:
 
karaf.bat: Enabling Java debug options: -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,sus
pend=n,address=5005
Listening for transport dt_socket at address: 5005
 
But still got the same error L when try to debug a bundle project.
 
Thanks.
Xilai
From: Łukasz Dywicki [mailto:[hidden email]] 
Sent: Thursday, December 15, 2011 5:05 PM
To: [hidden email]
Subject: Re: How to set up the remote debug with karaf in eclipse indigo
 
For windows users it won't be a export, it will be
set KARAF_DEBUG=1
 
You can also add KARAF_DEBUG as user environment variable, but then every time when'll start karaf you'll get a debug turned on, which might slow a bit JVM.
 
Regards,
Lukasz


Hi,
 
Try to use
export KARAF_DEBUG=true
in the shell where you launch karaf to see if there's any difference, seems the "bin/karaf debug" is incorrect, you should be able to see output like
karaf: Enabling Java debug options: -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
Listening for transport dt_socket at address: 5005
if all set.
 
Freeman
 
On 2011-12-15, at 下午4:44, XiLai Dai wrote:


Hi, Freeman,
 
Run with bin\karaf.bat debug,  and got:
TCP    0.0.0.0:5005           0.0.0.0:0              LISTENING       3288
When execute netstat –ano
 
Thanks.
Xilai
From: Freeman Fang [[hidden email]] 
Sent: Thursday, December 15, 2011 4:34 PM
To: [hidden email]
Subject: Re: How to set up the remote debug with karaf in eclipse indigo
 
Hi,
 
How you enable karaf debug?
Did you
export KARAF_DEBUG=true
in the shell before you launch Karaf?
 
Freeman
On 2011-12-15, at 下午4:20, XiLai Dai wrote:



Hello, 

Does anybody has the experience which setting up the debug environment with eclipse indigo? 

I did the following steps:
1. install EIK plugin from update site: http://svn.codespot.com/a/eclipselabs.org/eik/trunk/features/info.evanchik.eclipse.karaf.update/ 
2. follow the steps of http://code.google.com/a/eclipselabs.org/p/eik/wiki/UsingEIK 

Then , start karaf 2.2.4 with debug option:   Listening for transport dt_socket at address: 5005 
Debug a bundle project from eclipse IDE, but always got:

Failed to connect to remote VM. Connection refused.
Connection refused: connect

Thanks.
Xilai
 
---------------------------------------------
Freeman Fang
 
FuseSource
Twitter: freemanfang
 
 
 
 
 
 
 
 
 
 
---------------------------------------------
Freeman Fang
 
FuseSource
Twitter: freemanfang
 
 
 
 
 
 
 
 
 
 

Reply | Threaded
Open this post in threaded view
|

RE: How to set up the remote debug with karaf in eclipse indigo

XiLai Dai
<base href="x-msg://43/">

I’m sure I’ve changed the port to 5005 before click the Debug button,  and tried this step many times L

 

From: Łukasz Dywicki [mailto:[hidden email]]
Sent: Thursday, December 15, 2011 5:23 PM
To: [hidden email]
Subject: Re: How to set up the remote debug with karaf in eclipse indigo

 

Xilai,

Make sure you debug configuration in Eclipse points to port 5005. By default it is 8000. Also once you are connected to this port the second try will fail. To ensure that you are not already connected to Karaf switch a perspective to debug and check the process/threads list.

 

Regards,

Lukasz

 

 



Tried with set KARAF_DEBUG=true before start karaf, and got:

 

karaf.bat: Enabling Java debug options: -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,sus

pend=n,address=5005

Listening for transport dt_socket at address: 5005

 

But still got the same error L when try to debug a bundle project.

 

Thanks.

Xilai

From: Łukasz Dywicki [mailto:[hidden email]] 
Sent: Thursday, December 15, 2011 5:05 PM
To: [hidden email]
Subject: Re: How to set up the remote debug with karaf in eclipse indigo

 

For windows users it won't be a export, it will be

set KARAF_DEBUG=1

 

You can also add KARAF_DEBUG as user environment variable, but then every time when'll start karaf you'll get a debug turned on, which might slow a bit JVM.

 

Regards,

Lukasz




Hi,

 

Try to use

export KARAF_DEBUG=true

in the shell where you launch karaf to see if there's any difference, seems the "bin/karaf debug" is incorrect, you should be able to see output like

karaf: Enabling Java debug options: -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

Listening for transport dt_socket at address: 5005

if all set.

 

Freeman

 

On 2011-12-15, at 下午4:44, XiLai Dai wrote:




Hi, Freeman,

 

Run with bin\karaf.bat debug,  and got:

TCP    0.0.0.0:5005           0.0.0.0:0              LISTENING       3288

When execute netstat –ano

 

Thanks.

Xilai

From: Freeman Fang [[hidden email]] 
Sent: Thursday, December 15, 2011 4:34 PM
To: [hidden email]
Subject: Re: How to set up the remote debug with karaf in eclipse indigo

 

Hi,

 

How you enable karaf debug?

Did you

export KARAF_DEBUG=true

in the shell before you launch Karaf?

 

Freeman

On 2011-12-15, at 下午4:20, XiLai Dai wrote:





Hello, 

Does anybody has the experience which setting up the debug environment with eclipse indigo? 

I did the following steps:
1. install EIK plugin from update site: http://svn.codespot.com/a/eclipselabs.org/eik/trunk/features/info.evanchik.eclipse.karaf.update/ 
2. follow the steps of http://code.google.com/a/eclipselabs.org/p/eik/wiki/UsingEIK 

Then , start karaf 2.2.4 with debug option:   Listening for transport dt_socket at address: 5005 
Debug a bundle project from eclipse IDE, but always got:

Failed to connect to remote VM. Connection refused.
Connection refused: connect

Thanks.
Xilai

 

---------------------------------------------

Freeman Fang

 

FuseSource

Twitter: freemanfang

 

 

 

 

 

 

 

 

 

 

---------------------------------------------

Freeman Fang

 

FuseSource

Twitter: freemanfang

 

 

 

 

 

 

 

 

 

 

 

Reply | Threaded
Open this post in threaded view
|

RE: How to set up the remote debug with karaf in eclipse indigo

XiLai Dai
<base href="x-msg://43/">

Finally, the error gone after I replaced the eik-0.5.2 with eik-0.5.3 manually.

Seems the eik plugin which installed from update site is not up-to-date.

 

Thanks Freeman, Lukasz!

Xilai

 

From: XiLai Dai [mailto:[hidden email]]
Sent: Thursday, December 15, 2011 5:32 PM
To: [hidden email]
Subject: RE: How to set up the remote debug with karaf in eclipse indigo

 

I’m sure I’ve changed the port to 5005 before click the Debug button,  and tried this step many times L

 

From: Łukasz Dywicki [mailto:[hidden email]]
Sent: Thursday, December 15, 2011 5:23 PM
To: [hidden email]
Subject: Re: How to set up the remote debug with karaf in eclipse indigo

 

Xilai,

Make sure you debug configuration in Eclipse points to port 5005. By default it is 8000. Also once you are connected to this port the second try will fail. To ensure that you are not already connected to Karaf switch a perspective to debug and check the process/threads list.

 

Regards,

Lukasz

 

 

 

Tried with set KARAF_DEBUG=true before start karaf, and got:

 

karaf.bat: Enabling Java debug options: -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,sus

pend=n,address=5005

Listening for transport dt_socket at address: 5005

 

But still got the same error L when try to debug a bundle project.

 

Thanks.

Xilai

From: Łukasz Dywicki [mailto:[hidden email]] 
Sent: Thursday, December 15, 2011 5:05 PM
To: [hidden email]
Subject: Re: How to set up the remote debug with karaf in eclipse indigo

 

For windows users it won't be a export, it will be

set KARAF_DEBUG=1

 

You can also add KARAF_DEBUG as user environment variable, but then every time when'll start karaf you'll get a debug turned on, which might slow a bit JVM.

 

Regards,

Lukasz



Hi,

 

Try to use

export KARAF_DEBUG=true

in the shell where you launch karaf to see if there's any difference, seems the "bin/karaf debug" is incorrect, you should be able to see output like

karaf: Enabling Java debug options: -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

Listening for transport dt_socket at address: 5005

if all set.

 

Freeman

 

On 2011-12-15, at 下午4:44, XiLai Dai wrote:



Hi, Freeman,

 

Run with bin\karaf.bat debug,  and got:

TCP    0.0.0.0:5005           0.0.0.0:0              LISTENING       3288

When execute netstat –ano

 

Thanks.

Xilai

From: Freeman Fang [[hidden email]] 
Sent: Thursday, December 15, 2011 4:34 PM
To: [hidden email]
Subject: Re: How to set up the remote debug with karaf in eclipse indigo

 

Hi,

 

How you enable karaf debug?

Did you

export KARAF_DEBUG=true

in the shell before you launch Karaf?

 

Freeman

On 2011-12-15, at 下午4:20, XiLai Dai wrote:




Hello, 

Does anybody has the experience which setting up the debug environment with eclipse indigo? 

I did the following steps:
1. install EIK plugin from update site: http://svn.codespot.com/a/eclipselabs.org/eik/trunk/features/info.evanchik.eclipse.karaf.update/ 
2. follow the steps of http://code.google.com/a/eclipselabs.org/p/eik/wiki/UsingEIK 

Then , start karaf 2.2.4 with debug option:   Listening for transport dt_socket at address: 5005 
Debug a bundle project from eclipse IDE, but always got:

Failed to connect to remote VM. Connection refused.
Connection refused: connect

Thanks.
Xilai

 

---------------------------------------------

Freeman Fang

 

FuseSource

Twitter: freemanfang

 

 

 

 

 

 

 

 

 

 

---------------------------------------------

Freeman Fang

 

FuseSource

Twitter: freemanfang

 

 

 

 

 

 

 

 

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: How to set up the remote debug with karaf in eclipse indigo

Andreas Pieber
interesting; does it work for you if you download karaf seperately; set KARAF_DEBUG=1; start it and attach the remote debugger? Just to make sure it's an issue of EIP and not of your platform/karaf/whatever in general

Kind regards,
Andreas

On Thu, Dec 15, 2011 at 11:23, XiLai Dai <[hidden email]> wrote:

Finally, the error gone after I replaced the eik-0.5.2 with eik-0.5.3 manually.

Seems the eik plugin which installed from update site is not up-to-date.

 

Thanks Freeman, Lukasz!

Xilai

 

From: XiLai Dai [mailto:[hidden email]]
Sent: Thursday, December 15, 2011 5:32 PM
To: [hidden email]
Subject: RE: How to set up the remote debug with karaf in eclipse indigo

 

I’m sure I’ve changed the port to 5005 before click the Debug button,  and tried this step many times L

 

From: Łukasz Dywicki [mailto:[hidden email]]
Sent: Thursday, December 15, 2011 5:23 PM
To: [hidden email]
Subject: Re: How to set up the remote debug with karaf in eclipse indigo

 

Xilai,

Make sure you debug configuration in Eclipse points to port 5005. By default it is 8000. Also once you are connected to this port the second try will fail. To ensure that you are not already connected to Karaf switch a perspective to debug and check the process/threads list.

 

Regards,

Lukasz

 

 

 

Tried with set KARAF_DEBUG=true before start karaf, and got:

 

karaf.bat: Enabling Java debug options: -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,sus

pend=n,address=5005

Listening for transport dt_socket at address: 5005

 

But still got the same error L when try to debug a bundle project.

 

Thanks.

Xilai

From: Łukasz Dywicki [mailto:[hidden email]] 
Sent: Thursday, December 15, 2011 5:05 PM
To: [hidden email]
Subject: Re: How to set up the remote debug with karaf in eclipse indigo

 

For windows users it won't be a export, it will be

set KARAF_DEBUG=1

 

You can also add KARAF_DEBUG as user environment variable, but then every time when'll start karaf you'll get a debug turned on, which might slow a bit JVM.

 

Regards,

Lukasz



Hi,

 

Try to use

export KARAF_DEBUG=true

in the shell where you launch karaf to see if there's any difference, seems the "bin/karaf debug" is incorrect, you should be able to see output like

karaf: Enabling Java debug options: -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

Listening for transport dt_socket at address: 5005

if all set.

 

Freeman

 

On 2011-12-15, at 下午4:44, XiLai Dai wrote:



Hi, Freeman,

 

Run with bin\karaf.bat debug,  and got:

TCP    0.0.0.0:5005           0.0.0.0:0              LISTENING       3288

When execute netstat –ano

 

Thanks.

Xilai

From: Freeman Fang [[hidden email]] 
Sent: Thursday, December 15, 2011 4:34 PM
To: [hidden email]
Subject: Re: How to set up the remote debug with karaf in eclipse indigo

 

Hi,

 

How you enable karaf debug?

Did you

export KARAF_DEBUG=true

in the shell before you launch Karaf?

 

Freeman

On 2011-12-15, at 下午4:20, XiLai Dai wrote:




Hello, 

Does anybody has the experience which setting up the debug environment with eclipse indigo? 

I did the following steps:
1. install EIK plugin from update site: http://svn.codespot.com/a/eclipselabs.org/eik/trunk/features/info.evanchik.eclipse.karaf.update/ 
2. follow the steps of http://code.google.com/a/eclipselabs.org/p/eik/wiki/UsingEIK 

Then , start karaf 2.2.4 with debug option:   Listening for transport dt_socket at address: 5005 
Debug a bundle project from eclipse IDE, but always got:

Failed to connect to remote VM. Connection refused.
Connection refused: connect

Thanks.
Xilai

 

---------------------------------------------

Freeman Fang

 

FuseSource

Twitter: freemanfang

 

 

 

 

 

 

 

 

 

 

---------------------------------------------

Freeman Fang

 

FuseSource

Twitter: freemanfang