Startup fails, fresh install, OH3.2.0, Ubuntu 18.04, OpenJDK 11.0.13

  • Platform information:
    • Hardware: ThinkPad T540p
    • OS: Ubuntu 18.04 LTS
    • Java Runtime Environment: OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.18.04, mixed mode, sharing)
    • openHAB version: 3.2.0
  • Issue of the topic:
    Fresh install, never used. Followed instructions for setup, did manage to start the service, but http://localhost:8080 in Firefox (96.0 64-bit) gives me “Unable to connect”. Attempting to curl that URL gives “Failed to connect to localhost port 8080: Connection refused”. This is as vanilla an install as I could have attempted.

Here’s the output I get from “sudo systemctl status openhab.service”:

● openhab.service - openHAB - empowering the smart home
   Loaded: loaded (/usr/lib/systemd/system/openhab.service; disabled; vendor preset: enabled)
   Active: active (running) since Sat 2022-02-12 13:29:08 EST; 1h 8min ago
     Docs: https://www.openhab.org/docs/
           https://community.openhab.org
 Main PID: 16848 (java)
    Tasks: 42 (limit: 4915)
   CGroup: /system.slice/openhab.service
           └─16848 /usr/bin/java -XX:-UsePerfData -Dopenhab.home=/usr/share/openhab -Dopenhab.conf=/etc/openhab -Dopenhab.runtime=/usr/share/openhab/runtime -Dopenhab.userdata=/var/lib/openhab -Dopenhab.logdir=/var/log/openhab -Dfelix.cm.dir=/var/lib/openhab/config -Djava.library.path=/var/lib/openhab/tmp/lib -Djetty.host=0.0.0.0 -Djetty.http.compliance=RFC2616 -Dnashorn.args=--no-deprecation-warning -Dorg.apache.cxf.osgi.http.transport.disable=true -Dorg.ops4j.pax.web.listening.addresses=0.0.0.0 -Dorg.osgi.service.http.port=8080 -Dorg.osgi.service.http.port.secure=8443 -Djava.awt.headless=true -Dfile.encoding=UTF-8 -XX:+UseG1GC --add-reads=java.xml=java.logging --add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED --patch-module java.base=/usr/share/openhab/runtime/lib/endorsed/org.apache.karaf.specs.locator-4.3.4.jar --patch-module java.xml=/usr/share/openhab/runtime/lib/endorsed/org.apache.karaf.specs.java.xml-4.3.4.jar --add-opens java.base/java.securit

Feb 12 13:29:13 nate-T540p karaf[16848]:         at java.base/java.lang.Thread.run(Thread.java:844)
Feb 12 13:29:13 nate-T540p karaf[16848]: Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve openhab-runtime-base/3.2.0: missing requirement [openhab-runtime-base/3.2.0] osgi.identity; osgi.identity=openhab-runtime-certificate; type=karaf.feature [caused by: Unable to resolve openhab-runtime-certificate/3.2.0: missing requirement [openhab-runtime-certificate/3.2.0] osgi.identity; osgi.identity=org.openhab.core.io.jetty.certificate; type=osgi.bundle; version="[3.2.0,3.2.0]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.core.io.jetty.certificate/3.2.0: missing requirement [org.openhab.core.io.jetty.certificate/3.2.0] osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"]]
Feb 12 13:29:13 nate-T540p karaf[16848]:         at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341)
Feb 12 13:29:13 nate-T540p karaf[16848]:         ... 12 more
Feb 12 13:29:13 nate-T540p karaf[16848]: Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve openhab-runtime-certificate/3.2.0: missing requirement [openhab-runtime-certificate/3.2.0] osgi.identity; osgi.identity=org.openhab.core.io.jetty.certificate; type=osgi.bundle; version="[3.2.0,3.2.0]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.core.io.jetty.certificate/3.2.0: missing requirement [org.openhab.core.io.jetty.certificate/3.2.0] osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"]
Feb 12 13:29:13 nate-T540p karaf[16848]:         at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341)
Feb 12 13:29:13 nate-T540p karaf[16848]:         ... 13 more
Feb 12 13:29:13 nate-T540p karaf[16848]: Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve org.openhab.core.io.jetty.certificate/3.2.0: missing requirement [org.openhab.core.io.jetty.certificate/3.2.0] osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"
Feb 12 13:29:13 nate-T540p karaf[16848]:         at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341)
Feb 12 13:29:13 nate-T540p karaf[16848]:         ... 14 more
lines

Could you link to the instructions used? What else have you got running on this device that might try to use port 8080?

Thanks @hafniumzinc, I just ran through a series of commands to find listeners on 8080 (netstat, lsof, fuser), and none of them show anything listening on 8080 (including openhab). I’m not sure I read the instructions correctly, might openhab have latched onto a different port? But also, does the stack trace I posted not point to a certificate-related problem?

Instructions I followed: openHAB on Linux | openHAB

Additional point that may be relevant: I didn’t install Zulu Java as recommended because there were all kinds of conflicts. I installed the standard Ubuntu packaging of OpenJDK 11 (openjdk-11-jdk) instead.

Looked into the Karaf/Felix layers a bit. Looks to me as if the root cause is a failure to find the osgi bundle “org.openhab.core.io.jetty.certificate/3.2.0”. Why would that be? It seems to be part of the “core” repository: