blazegraph / database

Blazegraph High Performance Graph Database
GNU General Public License v2.0
891 stars 172 forks source link

RPM package should use the alternatives settings for JRE #46

Open donpellegrino opened 7 years ago

donpellegrino commented 7 years ago

The RPM package for Blazegraph does not run out-of-the-box on RHEL. It seems that the package depends on a manual configuration of JAVA_HOME. For RHEL, the "alternatives" tool is used to set the default JRE. The RPM package should probably use the conventions from alternatives instead of requiring manual setting of the JAVA_HOME as part of the service startup.

Some relevant references might be:

Test Instance:

$ cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.3 (Maipo)

$ sudo service blazegraph start Starting blazegraph (via systemctl): Job for blazegraph.service failed because the control process exited with error code. See "systemctl status blazegraph.service" and "journalctl -xe" for details. [FAILED]

Jan 23 09:46:39 u549486-dev systemd: Cannot add dependency job for unit microcode.service, ignoring: Unit is not loaded properly: Invalid argument. Jan 23 09:46:39 u549486-dev systemd: Starting LSB: Start Blazegraph... Jan 23 09:46:39 u549486-dev blazegraph: no JDK or JRE found - please set JAVA_HOME Jan 23 09:46:39 u549486-dev systemd: blazegraph.service: control process exited, code=exited status=1 Jan 23 09:46:39 u549486-dev systemd: Failed to start LSB: Start Blazegraph. Jan 23 09:46:39 u549486-dev systemd: Unit blazegraph.service entered failed state. Jan 23 09:46:39 u549486-dev systemd: blazegraph.service failed.

Pernat1y commented 7 years ago

Same on Debian 9.1:

-- Subject: Unit blazegraph.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit blazegraph.service has begun starting up.
Aug 16 11:08:11 debian blazegraph[435]: no JDK or JRE found - please set JAVA_HOME ... failed!
Aug 16 11:08:11 debian systemd[1]: blazegraph.service: Control process exited, code=exited status=1
Aug 16 11:08:11 debian systemd[1]: Failed to start LSB: Start Blazegraph.
-- Subject: Unit blazegraph.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit blazegraph.service has failed.
-- 
-- The result is failed.
donpellegrino commented 6 years ago

As a work-around, adding the following line to /etc/blazegraph/blazegraph seems to get things working:

JAVA_HOME=/etc/alternatives/java_sdk

Test system:

Red Hat Enterprise Linux Server release 7.4 (Maipo)

$ rpm -qi blazegraph-rpm Name : blazegraph-rpm Version : 2.1.4 Release : SNAPSHOT Architecture: noarch