obiba / rock

R server with a REST API
GNU General Public License v3.0
3 stars 1 forks source link

[2.1.0] don't start #18

Open mdc-webdb opened 2 months ago

mdc-webdb commented 2 months ago

On Rocky 9.4, after the update from rock 2.0.1 to 2.1 the service don't start any more.

2024-09-24T11:23:22+0200 systemd[1]: Started Opal Rock service.
2024-09-24T11:23:22+0200 java[12514]: Error: Could not find or load main class org.springframework.boot.loader.JarLauncher
2024-09-24T11:23:22+0200 java[12514]: Caused by: java.lang.ClassNotFoundException: org.springframework.boot.loader.JarLauncher
2024-09-24T11:23:22+0200 systemd[1]: rock.service: Main process exited, code=exited, status=1/FAILURE
mdc-webdb commented 2 months ago

The path of the start up files was changed without noted in change log. From: org.springframework.boot.loader.JarLauncher to org.springframework.boot.loader.launch.JarLauncher

ymarcon commented 2 months ago

The start script is part of the distribution. Have you modified it?

mdc-webdb commented 2 months ago

To fix it, yes. here the content(after the change): /etc/systemd/system/rock.service

[Unit]
Description=Opal Rock service

[Service]
WorkingDirectory=/var/lib/rock
EnvironmentFile=/etc/default/rock
User=rock
LimitNOFILE=16384
ExecStart=/usr/lib/jvm/jre-21-openjdk/bin/java $JAVA_ARGS -cp "${ROCK_HOME}/conf:${ROCK_DIST}/lib/*" -DROCK_HOME=${ROCK_HOME} -DROCK_DIST=${ROCK_DIST} -DROCK_LOG=${ROCK_LOG} org.springframework.boot.loader.launch.JarLauncher $ROCK_ARGS

[Install]
WantedBy=network-online.target
ymarcon commented 2 months ago

It should not be necessary to fix it. The script included in the distribution should be automatically updated. Which system do you use: deb or rpm?

mdc-webdb commented 1 month ago

I use the rpm package.