View Revisions: Issue #4353

Summary 0004353: Unable to run as a service on RHEL because Java absolute path
Revision 2020-04-16 19:46 by gwilmer
Description Unable to install SymmetricDS as a service on RHEL 7.7

Linux version info:

cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.7 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.7"
PRETTY_NAME=RHEL
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.7:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.7
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.7"

Revision 2020-04-21 14:49 by elong
Description Unable to run SymmetricDS as a service on RHEL 7.7. The /usr/lib/systemd/system/SymmetricDS.service file has "java" as the executable, but it should be an absolute path to Java.

Linux version info:

cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.7 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.7"
PRETTY_NAME=RHEL
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.7:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.7
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.7"

Revision 2020-04-16 19:46 by gwilmer
Additional Information I attempted to manually change /usr/lib/systemd/system/SymmetricDS.service to add the full java path... i.e. change java to /usr/bin/java (validated /usr/bin/java -version worked properly)

After that was complete and system was rebooted, received different error:

sudo systemctl start SymmetricDS.service
Job for SymmetricDS.service failed because the control process exited with error code. See "systemctl status SymmetricDS.service" and "journalctl -xe" for details.
[REDACTED@REDACTED ~]$ sudo systemctl status SymmetricDS.service
● SymmetricDS.service - Database Synchronization
  Loaded: loaded (/usr/lib/systemd/system/SymmetricDS.service; enabled; vendor preset: disabled)
  Active: failed (Result: exit-code) since Thu 2020-04-16 12:23:53 PDT; 10s ago
 Process: 2427 ExecStart=/usr/bin/java -jar /app/symmetricds/lib/symmetric-wrapper.jar start (code=exited, status=1/FAILURE)
Apr 16 12:23:53 REDACTED java[2427]: at java.lang.ClassLoader$NativeLibrary.load(Native Method)
Apr 16 12:23:53 REDACTED java[2427]: at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1946)
Apr 16 12:23:53 REDACTED java[2427]: at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1828)
Apr 16 12:23:53 REDACTED java[2427]: at java.lang.Runtime.load0(Runtime.java:810)
Apr 16 12:23:53 REDACTED java[2427]: at java.lang.System.load(System.java:1088)
Apr 16 12:23:53 REDACTED java[2427]: at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:947)
Apr 16 12:23:53 REDACTED systemd[1]: SymmetricDS.service: control process exited, code=exited status=1
Apr 16 12:23:53 REDACTED systemd[1]: Failed to start Database Synchronization.
Apr 16 12:23:53 REDACTED systemd[1]: Unit SymmetricDS.service entered failed state.
Apr 16 12:23:53 REDACTED systemd[1]: SymmetricDS.service failed.
[REDACTED@REDACTED ~]$

Revision 2020-04-21 14:49 by elong
Additional Information