From 8eccf5b2dde8fbf23ac45445c7ab8621e046961e Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Mon, 7 Sep 2020 09:38:28 +0300 Subject: [PATCH] Merge "Fix JMX startup after offline installation" from Amos "Currently after offline installation, the scylla-jmx fails to start. This pull request fixes issues with openjdk version detection and working directory configuration to make scylla-jmx start. Fixes: scylladb/scylla#7098 by [PATCH] install.sh: check both openjdk-8 and openjdk-11 Fixes: #129 by [PATCH] nonroot.conf: set WorkingDirectory to empty" Reviewed-by: Takuya ASADA * 'openjdk' of git://github.com/amoskong/scylla-jmx: install.sh: check both openjdk-8 and openjdk-11 nonroot.conf: set WorkingDirectory to empty (cherry picked from commit 12ab6aaeb86ed10ad223199232c8d24b7d34d590) --- install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 20ecb8f..adeea07 100755 --- a/install.sh +++ b/install.sh @@ -78,12 +78,12 @@ if ! $packaging; then has_java=false if [ -x /usr/bin/java ]; then javaver=$(/usr/bin/java -version 2>&1|head -n1|cut -f 3 -d " ") - if [[ "$javaver" =~ ^\"1.8.0 ]]; then + if [[ "$javaver" =~ ^\"1.8.0 || "$javaver" =~ ^\"11.0. ]]; then has_java=true fi fi if ! $has_java; then - echo "Please install openjdk-8 before running install.sh." + echo "Please install openjdk-8 or openjdk-11 before running install.sh." exit 1 fi fi @@ -133,6 +133,7 @@ ExecStart= ExecStart=$rprefix/jmx/scylla-jmx \$SCYLLA_JMX_PORT \$SCYLLA_API_PORT \$SCYLLA_API_ADDR \$SCYLLA_JMX_ADDR \$SCYLLA_JMX_FILE \$SCYLLA_JMX_LOCAL \$SCYLLA_JMX_REMOTE \$SCYLLA_JMX_DEBUG User= Group= +WorkingDirectory= EOS if [ ! -d ~/.config/systemd/user/scylla-jmx.service.d ]; then mkdir -p ~/.config/systemd/user/scylla-jmx.service.d