[SOLVED] CentOS7: not starting automatically

Hi!

I recently installed OpenHAB2 (2.4.0) with Zulu 10.1 on CentOS 7 (7.6) following the Linux Install Guide.
The install was successful and i can start OpenHAB2 with “openhab-cli start” without problems.
But starting after reboot doesnt work. Neither “systemctl start openhab2.service” or “/etc/init.d/openhab2 start”
work for starting OpenHAB2 - no error Messages.

A (successfully) start with openhab-cli start --debug produces following Output:
_openhab> WARNING: An illegal reflective access operation has occurred _
WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/var/lib/openhab2/cache/org.eclipse.osgi/101/0/.cp/lib/xstream-1.4.7.jar) to field java.lang.reflect.Proxy.h
WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

“/usr/share/openhab2/runtime/bin/karaf daemon” produces follwoing error:
mkdir: das Verzeichnis „/usr/share/openhab2/userdata/tmp“ kann nicht angelegt werden: Datei oder Verzeichnis nicht gefunden
KARAF_BASE is not valid: /usr/share/openhab2/userdata

Are there any known issue like this?

BR,
Herbert

The warnings are because you use Java 10, which is not supported for OH 2.4.0. Support for Java versions >8 is currently worked on.

Can‘t help with your CentOS issue.

I installed zulu 8, after removing zulu10 and reinstalled openhab2 without luck.
Same issue: i am only able to start openhab with “openhab-cli start” :frowning:

Followup:
The issue occurred after the step “setcap” in the install guide:
setcap ‘cap_net_raw,cap_net_admin=+eip cap_net_bind_service=+ep’ $(realpath /usr/bin/java)

I rebooted the system two times Right after installing and openhab started successfully .
After executing the “setcap” command, openhab didn´t start after a reboot

This is my solution:
do not enter the command “setcap ‘cap_net_raw,cap_net_admin=+eip cap_net_bind_service=+ep’ $(realpath /usr/bin/java)” under CentOS7, because Openhab wont start anymore. I assume there is a Java incompatibility with this command ….