nuxeo.xml file does not reflect nuxeo.conf parameter change.

Using nuxeo 5.5, I changed the SMTP configuration in the Admin console, but it has no effect (even after restart). The default configuration is still used (mail.smtp.host=localhost).

The nuxeo.conf file includes the correct SMTP parameters (mail.smtp.host=

The issue is with the nuxeo.xml configuration file located in NUXEO_HOME/conf/Catalina/localhost which contains the old default parameter.

This file is left unchanged by the restarts. I guess the nuxeo.xml file should be rewrited at each restart to include nuxeo.conf updated values.

Is it right ?

What is the the correct value to be found in the live nuxeo.xml ?

Something like :

<Resource auth="Container" name="Mail" type="javax.mail.Session"
        mail.store.protocol="pop3"
        mail.pop3.host="pop3.nosuchhost.nosuchdomain.com"
        mail.pop3.user="nobody"
        mail.transport.protocol="smtp"
        mail.smtp.host="localhost" mail.smtp.port="25"
        mail.smtp.starttls.enable="false"
        mail.smtp.auth="false"
        mail.smtp.user="anonymous"
        password="password" mail.from="noreply@nuxeo.com"
        mail.debug="false" />

Or something like :

<Resource auth="Container" name="Mail" type="javax.mail.Session"
        mail.store.protocol="${mail.store.protocol}"
        mail.pop3.host="${mail.pop3.host}"
        mail.pop3.user="${mail.user}"
        mail.transport.protocol="${mail.transport.protocol}"
        mail.smtp.host="${mail.smtp.host}" mail.smtp.port="${mail.smtp.port}"
        mail.smtp.starttls.enable="${mail.smtp.usetls}"
        mail.smtp.auth="${mail.smtp.auth}"
        mail.smtp.user="${mail.smtp.username}"
        password="${mail.smtp.password}" mail.from="${mail.from}"
        mail.debug="${mail.debug}" />

Thanks

0 votes

2 answers

1864 views

ANSWER



You're right.

At startup (or simply by running ./bin/nuxeoctl configure), the file conf/Catalina/localhost/nuxeo.xml must be overwritten by templates/default/conf/Catalina/localhost/nuxeo.xml with the values you customized in nuxeo.conf.

Which configuration templates do you use (what is the value of nuxeo.templates)?

0 votes



Here are the templates we are using :

nuxeo.templates=default,/data/nuxeo-template/stepnet

where /data/nuxeo-template/stepnet is our custom configuration. (It does not contain a nuxeo.xml file)

07/10/2012

As suggested by Benjamin, check the value of nuxeo.force.generation.

When running ./bin/nuxeoctl configure, do you see the default template in the output?

Nuxeo home: .../nuxeo-cap-5.5-tomcat
Nuxeo configuration: .../nuxeo-cap-5.5-tomcat/bin/nuxeo.conf
Include template: .../nuxeo-cap-5.5-tomcat/templates/common
Include template: .../nuxeo-cap-5.5-tomcat/templates/default
Include template: /data/nuxeo-template/stepnet

The "live" nuxeo.xml (in conf/Catalina/localhost/nuxeo.xml) must contain values, not parameters.

You can also give a look at the parameter value; all the configuration parameters are dumped into a configuration.properties file:

grep mail.smtp.host bin/nuxeo.conf /data/nuxeo-template/stepnet/nuxeo.defaults nxserver/config/configuration.properties
07/10/2012

I've found something interesting.

The NUXEO_HOME/conf/Catalina/localhost/nuxeo.xml is not re-writed by nuxeo restarts.

BUT, NUXEO_HOME/server/default/deploy/conf/Catalina/localhost/nuxeo.xml is re-writed each time.

So the restart does not write the nuxeo.xml file in the right place. How can I modify this path ?

Thanks.

07/10/2012

Ok, that's the issue. It comes from the "target" path used by templates. Look into templates/default/nuxeo.defaults, there must be: default.target=. in order to get the default template being deployed at root of the server. That's also true for other templates: they should specify the template_name.target property with values usually equal to . (dot) or nxserver instead of relying on default value.
07/10/2012

With the default target value, the wrong path should be nxserver/conf/Catalina/localhost/nuxeo.xml, whereas server/default/deploy/... looks like a JBoss path, I wonder where it comes from. Didn't you mixed Tomcat and JBoss packages or templates? Or don't you have some JBoss properties in /etc/init.d/nuxeo?
07/10/2012

Thanks Julien. The nuxeo.defaults file in the custom template was copied from an older nuxeo/jboss install and left "as is". It contained :

 default.target=server/default/deploy

Replaced by "default.target=.", the nuxeo.xml is rewrited with correct values.

Thanks again. This issue is solved.

07/10/2012

The *.target property in each nuxeo.defaults file must be named accordingly to its container template. Here, it must be named "stepnet.target" so it won't override the one of the "default" template.
07/10/2012

I have got the same problem and I have noticed the following thing: when I restart the server with the start .bat, nuxeo.xml is updated, but if I restart the server from browser (admin center) OR from window services (I have installed nuxeo as windows service with your guide: http://doc.nuxeo.com/display/ADMINDOC/Installing+the+Nuxeo+Platform+as+a+Windows+service ) … is there some error in script?
07/16/2012

@Alice: Hi, it's not the same issue at all. Please create a dedicated post for your own.
07/16/2012


Please prefer to use comment for comments and answers for answers.

Some things to check:

  • Do you have in nuxeo.conf the following line not commented: nuxeo.force.generation=true
  • Do you have in your environment a variable set for NUXEO_CONF
0 votes



In /etc/init.d/nuxeo, NUXEO_CONF is set :

NUXEO_CONF=/etc/nuxeo.conf

Then, in /etc/nuxeo.conf : nuxeo.force.generation=true is uncommented. And there is also : mail.smtp.host=<correct_smtp> uncommented.

07/10/2012