Hi Matt,

Thanks for the reply.

The issue with J11, and up?, is that the debug port is only opened on localhost 
and not on a regular adapter. So remote debugging from a different machine is 
not possible out of the box. That is why I changed 'address=${JAVA_DEBUG_PORT}' 
to 'address=*:${JAVA_DEBUG_PORT}’. Note the asterix to open the port on all 
adapters (0.0.0.0).

Obviously that change is wiped out when a new assembly is built.


Cheers,

Erwin


> On Jan 25, 2021, at 20:57, Matt Pavlovich <[email protected]> wrote:
> 
> Karaf has you covered every which way you’d want to debug =)
> 
> 1. $ export KARAF_DEBUG=true (anytime before you start karaf)
> 
> -or-
> 
> 2. Edit bin/setenv and uncomment KARAF_DEBUG=true
> 
> -or-
> 
> 3. Start Karaf using "./bin/karaf debug" (starts Karaf in debug mode)
> 
> -or-
> 
> 4. Start Karaf using "./bin/karaf debugs" (starts Karaf in debug mode AND 
> suspends the start until debugger has attached!!)
> 
> -Matt Pavlovich
> 
>> On Jan 25, 2021, at 7:23 PM, Erwin Hogeweg <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> Hi,
>> 
>> What is the preferred/recommended way to open 5005 for remote connections 
>> under J11?
>> 
>> Right now I hacked these two lines in …/bin/inc but those are gone every 
>> time I build a new assembly.
>> 
>>    
>> DEFAULT_JAVA_DEBUG_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:${JAVA_DEBUG_PORT}"
>>   
>> DEFAULT_JAVA_DEBUGS_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:${JAVA_DEBUG_PORT}"
>> 
>> Plse advice.
>> 
>> 
>> Kind Regards,
>> 
>> Erwin
> 

Reply via email to