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

47 views
Skip to first unread message

Ahmet Akkoç

unread,
Jan 18, 2024, 5:15:50 AMJan 18
to obiba-users
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

rhaeri

unread,
Jan 18, 2024, 6:10:19 AMJan 18
to obiba-users
Hi,
I assume that you had read this part. It looks like you do not have a Java installed, make sure you have Java 8. 

There is also a Docker version for Opal which I recommend, less messing around with your server, read info here.

Best,

Ahmet Akkoç

unread,
Jan 18, 2024, 6:14:54 AMJan 18
to obiba...@googlegroups.com
Okay this makes sense.

Before I would install MongoDB before Opal, inadvertently adding Java 8 in the process. I will see what happens if I install Java myself instead.

Thanks

--
You received this message because you are subscribed to a topic in the Google Groups "obiba-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/obiba-users/sGOk8B3QDc0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to obiba-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/obiba-users/8107246c-0d59-4dff-9b4e-21f291a1ebacn%40googlegroups.com.

Please note that it is bad practice - and potentially against national regulation - to send personally identifiable information, e.g., national identity numbers (e.g., SSN, NHS or CPR numbers) via unencrypted email. Please use project provided IDs instead if possible or if in doubt contact us before sending potentially sensitive patient information.

Ahmet Akkoç

unread,
Jan 18, 2024, 6:21:42 AMJan 18
to obiba-users
Good news: java stopped the initial crash.
Bad news: There is still an issue when the admin password should have been updated during instalation.

# java -version
openjdk version "1.8.0_392"
OpenJDK Runtime Environment (build 1.8.0_392-8u392-ga-1~20.04-b08)
OpenJDK 64-Bit Server VM (build 25.392-b08, mixed mode)


Log from apt-get install opal
...
Preparing to unpack .../archives/opal_4.6.6_all.deb ...
Unpacking opal (4.6.6) ...
Setting up opal (4.6.6) ...
Updating administrator password.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

Adding system user `opal' (UID 114) ...
Adding new user `opal' (UID 114) with group `nogroup' ...
Not creating home directory `/var/lib/opal'.
Created symlink /etc/systemd/system/multi-user.target.wants/opal.service → /lib/systemd/system/opal.service.


What else could it be?

Ramin H.A.

unread,
Jan 18, 2024, 9:52:23 AMJan 18
to obiba...@googlegroups.com

Opal needs Java 8 and if you are using Mongo, it should be installed prior to Opal installation.

Does Opal run at all? I mean, if you go to http://localhost:8080 (or your server address), do you see the login page? Maybe restart installation from scratch by purging the opal package and monitor /var/log/opal/opal.log once it loads up.


Ahmet Akkoç

unread,
Jan 18, 2024, 9:54:33 AMJan 18
to obiba...@googlegroups.com
Opal runs now (if Java or Mongo is installed prior to opal)

It’s giving a new error when attempting to assign a password. 

See the line from above:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". 

Ramin H.A.

unread,
Jan 18, 2024, 10:26:29 AMJan 18
to obiba...@googlegroups.com
Did you try a clean install, purge and install again?


You received this message because you are subscribed to the Google Groups "obiba-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to obiba-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/obiba-users/CAF9J6eN262wKMpWmYcN7C355keasmyYXzhON3mWLM2OGWJarBA%40mail.gmail.com.

Ahmet Akkoç

unread,
Jan 18, 2024, 10:52:35 AMJan 18
to obiba...@googlegroups.com
I rebuilt the entire system.

This is to help me debug an active issue I have on an older installation of Opal.
There, updating the shiro.ini file does not reflect on the admin password, so I have been spinning up clean machines to try and find what causes the password update problem.

Seeing that I cannot update the admin password on the initial prompt on a clean install of Opal suggests that there is something funny going on.

Reply all
Reply to author
Forward
0 new messages