Web Service won't start (:8080)

  • Platform information: BananaPI Board
    • Hardware: armv7l / 1GB RAM / 32GB SD
    • OS: ARMBian 5.38 - Linux oh 4.14.15-sunxi #28 SMP Mon Jan 29 07:24:48 CET 2018 armv7l GNU/Linux
    • Java Runtime Environment: openjdk version “1.8.0_152” - Zulu Embedded 8.25.0.76-linux-aarch32hf
    • openHAB version: 2.2.0-1

Hello to all.
I’ve installed a fresh board and openhab2. Then I’ve tried to restore the backups from a 2.0 conf.
After correcting some issues (env, path) now the service starts manually in debug mode, but the webserver is not running, no service listening on port 8080. What could be the cause? I’m in the console, but have no idea what to check.

Thanks, Simon

Is the http-string correct?

Is the ip-address or the server-name vaild?
Has your Pi contact to your router?

What do you exactly mean?
The board is online, I’m reaching it remotely.
This is the process:

root      3153  3033  1 14:48 pts/0    00:02:23 /usr/bin/java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc/openhab2 -Dopenhab.runtime=/usr/share/openhab2/runtime -Dopenhab.userdata=/var/lib/openhab2 -Dopenhab.logdir=/var/log/openhab2 -Dfelix.cm.dir=/var/lib/openhab2/config -Djetty.host=0.0.0.0 -Djetty.http.compliance=RFC2616 -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 -Djava.endorsed.dirs=/usr/lib/jvm/zulu-embedded-8-armhf/jre/lib/endorsed:/usr/lib/jvm/zulu-embedded-8-armhf/lib/endorsed:/usr/share/openhab2/runtime/lib/endorsed -Djava.ext.dirs=/usr/lib/jvm/zulu-embedded-8-armhf/jre/lib/ext:/usr/lib/jvm/zulu-embedded-8-armhf/lib/ext:/usr/share/openhab2/runtime/lib/ext -Dkaraf.instances=/var/lib/openhab2/tmp/instances -Dkaraf.home=/usr/share/openhab2/runtime -Dkaraf.base=/var/lib/openhab2 -Dkaraf.data=/var/lib/openhab2 -Dkaraf.etc=/var/lib/openhab2/etc -Dkaraf.logs=/var/log/openhab2 -Dkaraf.restart.jvm.supported=true -Djava.io.tmpdir=/var/lib/openhab2/tmp -Djava.util.logging.config.file=/var/lib/openhab2/etc/java.util.logging.properties -Dkaraf.startLocalConsole=true -Dkaraf.startRemoteShell=true -classpath /usr/share/openhab2/runtime/lib/boot/org.apache.karaf.diagnostic.boot-4.1.3.jar:/usr/share/openhab2/runtime/lib/boot/org.apache.karaf.jaas.boot-4.1.3.jar:/usr/share/openhab2/runtime/lib/boot/org.apache.karaf.main-4.1.3.jar:/usr/share/openhab2/runtime/lib/boot/org.osgi.core-6.0.0.jar org.apache.karaf.main.Main

As you can see there is a -Dorg.osgi.service.http.port=8080 but java is listening only here:

root@oh:~# netstat -naop  | grep java
tcp        0      0 0.0.0.0:5005            0.0.0.0:*               LISTEN      3153/java            off (0.00/0/0)
tcp6       0      0 127.0.0.1:43779         :::*                    LISTEN      3153/java            off (0.00/0/0)
tcp6       0      0 127.0.0.1:8101          :::*                    LISTEN      3153/java            off (0.00/0/0)
tcp6       0      0 :::5007                 :::*                    LISTEN      3153/java            off (0.00/0/0)
tcp6       0      0 :::8181                 :::*                    LISTEN      3153/java            off (0.00/0/0)
udp6       0      0 :::5353                 :::*                                3153/java            off (0.00/0/0)
udp6       0      0 :::5353                 :::*                                3153/java            off (0.00/0/0)

is there a way to check it from the openhab console?

# ./start_debug.sh 
Launching the openHAB runtime...
Listening for transport dt_socket at address: 5005
                      __  _____    ____      
  ____  ____  ___  ____  / / / /   |  / __ )     
 / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __  | 
/ /_/ / /_/ /  __/ / / / __  / ___ |/ /_/ /      
\____/ .___/\___/_/ /_/_/ /_/_/  |_/_____/     
    /_/                        2.2.0
                               Release Build   

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.
openhab>

Thank you!

Simon

How did you install openHAB? The preferred way would be openHABian or apt.

Please take a look into openhab.log (if installed through apt or opnHABian, this file can be found under
/var/log/openhab/)

openHAB should not be run as root (but of course you can do this, especially to exclude insufficient permissions)

I’ve installed it via apt on an armbian ISO. I’ll try to install OpenHABian then, but my board is not a raspberry. Maybe compatible as well, don’t know. I would like to understood why it’s not working BTW.
Openhab log is near empty:

Jan 30, 2018 5:32:38 PM org.apache.karaf.main.lock.SimpleFileLock lock
INFO: Trying to lock /var/lib/openhab2/tmp/lock
Jan 30, 2018 5:32:38 PM org.apache.karaf.main.lock.SimpleFileLock lock
INFO: Lock acquired
Jan 30, 2018 5:32:38 PM org.apache.karaf.main.Main$KarafLockCallback lockAquired
INFO: Lock acquired. Setting startlevel to 100

A way to start it in debug?

Thanks, Simon

Hello @Udo_Hartmann
I’ve made some step more. I’ve recovered this file from my 2.0 openhab:

/var/lib/openhab2/etc/config.properties

Now, after correcting the karaf.framework.equinox path to the new one, the webserver starts. BTW seems other modules onthe file are poining on old modules I have on the 2.0 openhab.

Is there a default config.properties to start with?

Thanks, Simon

Ok, solved… I’ve reinstalled from scratch openhab via repo cleaning well all old configs. Seems to work now, ty for the support.

Simon