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
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
)?
nuxeo.templates=default,/data/nuxeo-template/stepnet
where /data/nuxeo-template/stepnet is our custom configuration. (It does not contain a nuxeo.xml file)
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
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.
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.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
? default.target=server/default/deploy
Replaced by "default.target=.", the nuxeo.xml is rewrited with correct values.
Thanks again. This issue is solved.
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
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.