RE: Klaros not starting after something happens at midnight

Massimo Dulisse, modified 1 Month ago.

Klaros not starting after something happens at midnight

Youngling Post: 1 Join Date: 6/30/22 Recent Posts
Hi there,
I have successfully installed Klaros on a virtual server hosted by Ionos and configured it.

​​​​​​​However now something strange is happening - at midnight something happens (I think is Mysql backup); the next morning I find that tomcat is not running and if I restart Klaros I get a SEVERE error message in the logs:
​​​​​​​
SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file

A couple of questions:
  1. How can I find which listener is failing?
  2. Why the heck the configuration that was working before midnight isn't working if I try to restart Klaros???
TIA,
​​​​​​​Max
thumbnail
Torsten Stolpmann, modified 1 Month ago.

RE: Klaros not starting after something happens at midnight

Jedi Council Member Posts: 721 Join Date: 2/12/09 Recent Posts
Hi Massimo,

Can you please attach the complete log files for analysis?

If this is too big, please feel free to also zip them and send to support@verit.de

Thanks and regards,

​​​​​​​Torsten
thumbnail
Torsten Stolpmann, modified 1 Month ago.

RE: Klaros not starting after something happens at midnight

Jedi Council Member Posts: 721 Join Date: 2/12/09 Recent Posts
Hi Massimo,

Thank you for for sending the logs. The relevant log entry can be found here:

de.verit.klaros.contentrepository.migration.exception.KlarosRepositoryUpgradeException: java.io.IOException: Cannot run program "java": error=2, No such file or directory
    at de.verit.klaros.contentrepository.migration.BaseRepositoryUtil.execute(BaseRepositoryUtil.java:88)

The reason why you see this error is as follows.

​​​​​​​During startup, Klaros forks a separate java Process to compact the file repository before the application will start.
​​​​​​​In your root environment, java is not available, so the startup will fail with above message.

​​​​​​​You rightly may ask, why this is not happening during your initial startup. In this case, the Installer is bringing in it's own Java runtime and a startup initiated from the installer will succeed.

To resolve this, you will need to add a Java runtime to your root account environment.

​​​​​​​In standard Linux installations we do this via systemd like shown below:

[Unit]
Description=Klaros Testmanagement Service
After=syslog.target network.target

[Service]
Environment="JRE_HOME=/opt/klaros-testmanagement/jre"
Environment="PATH=/opt/klaros-testmanagement/jre/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin"
Type=forking
User=klaros

ExecStart=/opt/klaros-testmanagement/bin/startup.sh
ExecStop=/opt/klaros-testmanagement/bin/shutdown.sh

[Install]
WantedBy=multi-user.target

This is documented in the user manual here: https://www.klaros-testmanagement.com/files/doc/html/User-Manual.Installation.installAsService.html#User-Manual.Installation.installAsService.Linux

I am unsure about the steps you took in your Container environment. It may be sufficient to install a Java runtime via your package manager.

​​​​​​​In case you haven't noticed yet, we also provide ready-made docker images here: https://github.com/klaros-testmanagement/klaros-docker/pkgs/container/klaros.
​​​​​​​
Please let me know if this helps you succeed or require additional information.

Regards,

Torsten