Public bug reported:
Environment:
--------------
on ubuntu 16.04.2 TLS
Issue:
--------
systemctl start apacheds.service
Failed to start apacheds.service: Unit apacheds.service is not loaded properly:
Invalid argument.
See system logs and 'systemctl status apacheds.service' for details.
Steps to reproduce:
------------------
- install oracle jdk8 :
apt install oracle-java8-installer oracle-java8-unlimited-jce-policy
oracle-java8-set-default
- install apacheds:
apt install apacheds
- start apacheds:
systemctl enable apacheds.service
systemctl start apacheds.service
Logs/output/files:
------------
root@security:~# systemctl status apacheds.service
● apacheds.service - Apache Directory Server
Loaded: error (Reason: Invalid argument)
Active: inactive (dead)
Mar 25 11:14:04 security systemd[1]: [/lib/systemd/system/apacheds.service:11]
Executable path is not absolute, ignoring: ${JAVA_HOME}/bin/java ${JAVA_OPTS}
-Dapacheds.controls=${ADS_CONTROLS}
Mar 25 11:14:04 security systemd[1]: apacheds.service: Service lacks both
ExecStart= and ExecStop= setting. Refusing.
Root cause
----------
- first: apacheds.service contains syntax error
systemctl edit apacheds.service:
with won't work:
ExecStart=${JAVA_HOME}/bin/java ${JAVA_OPTS} \
-Dapacheds.controls=${ADS_CONTROLS} \
-Dapacheds.extendedOperations=${ADS_EXTENDED_OPERATIONS} \
-Dlog4j.configuration=file:${ADS_INSTANCES}/${ADS_INSTANCE}/conf/log4j.properties
\
-Dapacheds.log.dir=${ADS_INSTANCES}/${ADS_INSTANCE}/log \
-cp '${ADS_HOME}/lib/*' \
org.apache.directory.server.UberjarMain \
${ADS_INSTANCES}/${ADS_INSTANCE}/
this works fine:
ExecStart=/bin/sh -c "${JAVA_HOME}/bin/java ${JAVA_OPTS} \
-Dapacheds.controls=${ADS_CONTROLS} \
-Dapacheds.extendedOperations=${ADS_EXTENDED_OPERATIONS} \
-Dlog4j.configuration=file:${ADS_INSTANCES}/${ADS_INSTANCE}/conf/log4j.properties
\
-Dapacheds.log.dir=${ADS_INSTANCES}/${ADS_INSTANCE}/log \
-cp '${ADS_HOME}/lib/*' \
org.apache.directory.server.UberjarMain \
${ADS_INSTANCES}/${ADS_INSTANCE}/"
- second:
/usr/lib/jvm/default-java do not exists if oracle jdk is installed: i had to
create it:
cd /usr/lib/jvm/ && ln -s java-8-oracle default-java
** Affects: apache-directory-server (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1676035
Title:
apache directory server: do not start with systemctl
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apache-directory-server/+bug/1676035/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs