#2 nuxwdog is cutting off long ExeArgs resulting in PKI service startup failure
Closed: fixed Opened by mharmsen.

When using nuxwdog to start PKI services if the ExeArgs line is too long in nuxwdog.conf it will get cutoff and the service will fail to start. There are no logs produced when this happens.

For example, I have this ExeArgs line:
/usr/lib/jvm/jre-1.8.0_oracle/bin/java -DRESTEASY_LIB=/usr/share/java/resteasy-base -Djava.library.path=/usr/lib64/nuxwdog-jni -Dpentaho.installed.licenses.file=/var/lib/pki/tms-ars-5/.pentaho/.installedLicenses.xml -Xms1g -Xmx3g -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djavax.net.debug=all -Djavax.net.ssl.trustStore=None -Djavax.net.ssl.keyStore=None -Djava.awt.headless=true -Dorg.owasp.esapi.resources=/var/lib/pki/tms-ars-5/pentaho/server/pentaho-server/tomcat/webapps/pentaho/WEB-INF/classes -classpath /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar -Dcatalina.base=/var/lib/pki/tms-ars-5 -Dcatalina.home=/usr/share/tomcat -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/lib/pki/tms-ars-5 -Djava.util.logging.config.file=/var/lib/pki/tms-ars-5/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.security.manager -Djava.security.policy==/var/lib/pki/tms-ars-5/conf/catalina.policy org.apache.catalina.startup.Bootstrap start

Using strace, you can see that when java is called not all of the parameters are passed:
execve("/usr/lib/jvm/jre-1.8.0_oracle/bin/java", ["/usr/lib/jvm/jre-1.8.0_oracle/bin/java", "-DRESTEASY_LIB=/usr/share/java/resteasy-base", "-Djava.library.path=/usr/lib64/nuxwdog-jni", "-Dpentaho.installed.licenses.file=/var/lib/pki/tms-ars-5/.pentaho/.installedLicenses.xml", "-Xms1g", "-Xmx3g", "-Dsun.rmi.dgc.client.gcInterval=3600000", "-Dsun.rmi.dgc.server.gcInterval=3600000", "-Djavax.net.debug=all", "-Djavax.net.ssl.trustStore=None", "-Djavax.net.ssl.keyStore=None", "-Djava.awt.headless=true", "-Dorg.owasp.esapi.resources=/var/lib/pki/tms-ars-5/pentaho/server/pentaho-server/tomcat/webapps/pentaho/WEB-INF/classes", "-classpath", "/usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar", "-Dcatalina.base=/var/lib/pki/tms-ars-5", "-Dcatalina.home=/usr/share/tomcat", "-Djava.endorsed.dirs=", "-Djava.io.tmpdir=/var/lib/pki/tms-ars-5", "-Djava.util.logging.config.file=/var/lib/pki/tms-ars-5/conf/logging.properties", "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager", "-Djava.security.manager", "-Djava.security.policy==/var/lib/pki/tms-ars"], [/ 26 vars /]) = 0

The above is missing "/conf/catalina.policy org.apache.catalina.startup.Bootstrap start"

When using "pki-server-nuxwdog" to create the nuxwdog.conf it will concatanate the JAVA_OPTS line from . /etc/sysconfig/$NAME which creates the long line.

Is it possible to update nuxwdog to allow for a much longer ExeArgs line to be processed?


Metadata Update from @mharmsen:
- Custom field component adjusted to None
- Custom field feature adjusted to None
- Custom field origin adjusted to None
- Custom field proposedmilestone adjusted to None
- Custom field proposedpriority adjusted to None
- Custom field reviewer adjusted to None
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1503753
- Custom field type adjusted to None
- Custom field version adjusted to None
- Issue assigned to vakwetu
- Issue priority set to: critical
- Issue set to the milestone: milestone1

commit f4b47d21560fd57c7d2e326ebfae66f42b66864f
Author: Ade Lee alee@redhat.com
Date: Mon Oct 30 22:47:15 2017 -0400

Allow unlimited conf line length
Errors occurred because the line length was being truncated,
especially for long lines like JVM args.  Now the line length
will be allocated correctly.
Change-Id: I77553817931883e05180a1082d45a20e3a6afe4c

Metadata Update from @vakwetu:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata Update from @mharmsen:
- Custom field fixedinversion adjusted to nuxwdog-1.0.3-12.fc27

Metadata