Opal Server fails to launch (Debian Package Installation), missing env variables

Hi,

I recently tried installing Opal as a Debian Package. Somehow, I think the environment variables OPAL_HOME, OPAL_DIST, OPAL_LOG and OPAL_ARGS are not created correctly.


After following all instructions upto sudo apt-get install opal, I was unable to load web ui. Also service opal gives opal: unrecognized service.

Running systemctl:

# systemctl status opal.service 
● opal.service - OBiBa Opal service
     Loaded: loaded (/lib/systemd/system/opal.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2024-01-17 22:21:24 UTC; 22min ago
   Main PID: 3024 (code=exited, status=127)

Jan 17 22:21:24 ubuntu-8gb-hel1-2 systemd[1]: Started OBiBa Opal service.
Jan 17 22:21:24 ubuntu-8gb-hel1-2 systemd[1]: opal.service: Main process exited, code=exited, status=127/n/a
Jan 17 22:21:24 ubuntu-8gb-hel1-2 systemd[1]: opal.service: Failed with result 'exit-code'.

The log file is also interesting:

/var/log/opal/stderr.log:

/usr/share/opal/bin/start.sh: line 3: /usr/bin/java: No such file or directory

start.sh references OPAL_HOME and its sister OPAL variables:

#!/bin/bash

$JAVA $JAVA_ARGS -cp "${OPAL_HOME}/conf:${OPAL_DIST}/lib/*" -DOPAL_HOME=${OPAL_HOME} -DOPAL_DIST=${OPAL_DIST} -DOPAL_LOG=${OPAL_LOG} org.obiba.opal.server.OpalServer $OPAL_ARGS

When I check my env, these are missing.

If I restart opal.service from systemctl:

  • The variables are seemingly loaded in correctly
/usr/bin/java -Xms1G -Xmx2G -XX:+UseG1GC -cp /var/lib/opal/conf:/usr/share/opal/lib/* -DOPAL_HOME=/var/lib/opal -DOPAL_DIST=/usr/share/opal -DOPAL_LOG=/var/log/opal  org.obiba.opal.server.OpalServer
  • The web UI loads but log-in fails for the admin/password I chose.
  • service opal remains unavailable.

Is there anything I am skipping here?

Machine Details:

  • Ubuntu 20 (Freshly Spun-up)
  • RAM: 8GB
  • Storage: 80GB

Solution: Java 8 should be installed prior to opal. Else a restart is required for the Opal .sh command to execute correctly.

For information: Opal currently depends on Java 8, and Opal’s development plan for this year is to upgrade to a higher version (at least Java 17). This is a major piece of work that I will keep the community posted on as soon as a release date can be anticipated.

Note that whatever the Java version is, these are not compatible, so Java must always be properly setup prior to the Opal install. Or use Opal’s Docker container instead to hide this system dependency’s extra complexity.

Regards
Yannick

1 Like