cancel
Showing results for 
Search instead for 
Did you mean: 

How to Enable remote debug when Nuxeo on Windows

PomCompot_
Confirmed Champ
Confirmed Champ

Hi,

I'm using Nuxeo DM 5.4.1 (Tomcat bundle) on windows and trying to debug the code of a plugin. Following the docs, I have put those lines in nuxeo-dm-5.4.1-tomcat/bin/nuxeo.conf:

JAVA_OPTS=-Xms512m -Xmx1024m -XX:MaxPermSize=512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dfile.encoding=UTF-8 -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044
[...]
nuxeo.force.generation=true
[...]
JAVA_OPTS=$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044

It seems to have no effect. Neither I can connect from my IDE to the Tomcat with a remote debug configuration on localhost on port 1044, nor I see with JVisualVM the expected parameters in the JVM arguments list of the Tomcat process.

Any idea would be appreciated.

Thanks in advance.

Stéphane

1 ACCEPTED ANSWER

PomCompot_
Confirmed Champ
Confirmed Champ

The nuxeo.conf indicated in logs is just the one I was touching. I don't get a NUXEO_CONF variable in my env properties.

I have made other tests. In nuxeoclt.bat, there is a set JAVA_OPTS line for the launcher JVM arguments. It seems to be propagated to the Tomcat. When I add debug configuration at the end of this line, I see with JVisualVM the correct VM arguments on my Tomcat. It only works with no gui in option, if not the launcher, which is not halt after Tomcat launch, blocks the debug port.

View answer in original post

7 REPLIES 7

Benjamin_Jalon1
Elite Collaborator
Elite Collaborator

I noticed that on widows, it doesn't work.

My quick fix was to copy the additional parameters at the end of the first JAVA_OPTS definition.

But I think you can replace $JAVA_OPTS by %JAVA_OPTS% may work also...

If this answer is right one please don't forget to mark it.

Indeed, I'm on Windows. I don't succeed with your answer. I have already tried to put parameters at the end of the first line without success. %JAVA_OPTS% don't work better.

Can you start your tomcat and look into the first lines of logs this line

Windows 7, Nuxeo Cap 5.5, unmcomment

PomCompot_
Confirmed Champ
Confirmed Champ

The nuxeo.conf indicated in logs is just the one I was touching. I don't get a NUXEO_CONF variable in my env properties.

I have made other tests. In nuxeoclt.bat, there is a set JAVA_OPTS line for the launcher JVM arguments. It seems to be propagated to the Tomcat. When I add debug configuration at the end of this line, I see with JVisualVM the correct VM arguments on my Tomcat. It only works with no gui in option, if not the launcher, which is not halt after Tomcat launch, blocks the debug port.

Ok this problem have been fixed for Nuxeo 5.4.2

Thanks for your help. Planning to upgrade in a mid-term.

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.