Need help starting up OpenHab3

Tags: #<Tag:0x00007f1751fdc338>

I’m having a problem getting Openhab3 to run. I originally had Openhab2 running on an Ubuntu PC. I then starting trying out Openhab3 on a Raspberry PI. Openhab3 was running fine, I had everything set up the way I wanted. All my rules were running fine. So now I’ve moving my Openhab3 to to the Ubuntu PC. I removed Openhab2 from it and used openhabian to install Openhab3. I restored the Openhab3 backup from my Raspberry PI to the Ubuntu PC. I tried to view the Openhab3 menu and log but its not working. Is there a certain command to start it up or something. Any help would be appreciated.

Check if openhab is running:

systemctl is-active openhab.service

it should return “active”.
Were you able to access openhab before you restored everything?

Yes, it does say “active”.
No, I don’t think it was running before the restore either. I just thought once I restored stuff it would start working.

Hi @MikeH

Are there any files in /var/log/openhab?

Are there any errors at the bottom (you’ll need to scroll) of the command:

sudo journalctl -u openhab -b

Yes, there are files in /var/log/openhab. I see:audit.log, events.log, and multiple openhab.log’s

There are errors in journalctl:

-- Logs begin at Mon 2021-02-08 08:39:36 EST, end at Thu 2021-02-11 09:42:40 EST. --
Feb 11 09:09:54 openhab systemd[1]: Started openHAB - empowering the smart home.
Feb 11 09:11:46 openhab karaf[1054]: org.apache.felix.resolver.reason.ReasonException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=openhab-runtime-base; type=karaf.feature; version="[3.0.1,3.0.1]"; fi>
Feb 11 09:11:46 openhab karaf[1054]:         at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
Feb 11 09:11:46 openhab karaf[1054]:         at org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:392)
Feb 11 09:11:46 openhab karaf[1054]:         at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:378)
Feb 11 09:11:46 openhab karaf[1054]:         at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:332)
Feb 11 09:11:46 openhab karaf[1054]:         at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:257)
Feb 11 09:11:46 openhab karaf[1054]:         at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:393)
Feb 11 09:11:46 openhab karaf[1054]:         at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062)
Feb 11 09:11:46 openhab karaf[1054]:         at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998)
Feb 11 09:11:46 openhab karaf[1054]:         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
Feb 11 09:11:46 openhab karaf[1054]:         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
Feb 11 09:11:46 openhab karaf[1054]:         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
Feb 11 09:11:46 openhab karaf[1054]:         at java.lang.Thread.run(Thread.java:748)
Feb 11 09:11:46 openhab karaf[1054]: Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve openhab-runtime-base/3.0.1: missing requirement [openhab-runtime-base/3.0.1] osgi.identity; osgi.identity=openhab-core-m>
Feb 11 09:11:46 openhab karaf[1054]:         at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
Feb 11 09:11:46 openhab karaf[1054]:         ... 12 more
Feb 11 09:11:46 openhab karaf[1054]: Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve openhab-core-model-lsp/3.0.1: missing requirement [openhab-core-model-lsp/3.0.1] osgi.identity; osgi.identity=openhab-co>
Feb 11 09:11:46 openhab karaf[1054]:         at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
Feb 11 09:11:46 openhab karaf[1054]:         ... 13 more
Feb 11 09:11:46 openhab karaf[1054]: Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve openhab-core-model-persistence-ide/3.0.1: missing requirement [openhab-core-model-persistence-ide/3.0.1] osgi.identity; >
Feb 11 09:11:46 openhab karaf[1054]:         at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
Feb 11 09:11:46 openhab karaf[1054]:         ... 14 more
Feb 11 09:11:46 openhab karaf[1054]: Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve org.openhab.core.model.persistence.ide/3.0.1: missing requirement [org.openhab.core.model.persistence.ide/3.0.1] osgi.wi>
Feb 11 09:11:46 openhab karaf[1054]:         at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
Feb 11 09:11:46 openhab karaf[1054]:         ... 15 more
Feb 11 09:11:46 openhab karaf[1054]: Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve org.openhab.core.model.persistence/3.0.1: missing requirement [org.openhab.core.model.persistence/3.0.1] osgi.wiring.pac>
Feb 11 09:11:46 openhab karaf[1054]:         at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
Feb 11 09:11:46 openhab karaf[1054]:         ... 16 more
Feb 11 09:11:46 openhab karaf[1054]: Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve org.openhab.core.persistence/3.0.1: missing requirement [org.openhab.core.persistence/3.0.1] osgi.wiring.package; filter>
Feb 11 09:11:46 openhab karaf[1054]:         at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
Feb 11 09:11:46 openhab karaf[1054]:         ... 17 more
Feb 11 09:11:46 openhab karaf[1054]: Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve org.openhab.core/3.0.1: missing requirement [org.openhab.core/3.0.1] osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"
Feb 11 09:11:46 openhab karaf[1054]:         at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
Feb 11 09:11:46 openhab karaf[1054]:         ... 18 more

Do you have the correct java version instaled ?

I think I installed zulu 11 32 bit from the openHABian menu. Is that correct?

That should be good. You may verify if it is installed by running: java --version

Maybe I don’t have zulu 11. This is what the java -version showed:

java version “1.8.0_201”
Java™ SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot™ 64-Bit Server VM (build 25.201-b09, mixed mode)

That is java 8. For OH3 java 11 is required.

I did the openHABian menu to install it. Not sure what happened.

how can I install it manually? I tried through openHABian again and then checked and it’s still java 8

You used menu entry 45 and zulu 11 was shown there ?
Closing openhabian-config menu after installation also shows that zulu 11 was installed ?

Yes, tried that through the openHABian menu, but it never worked. It was still java 8. Now I’m messed up more after I tried the link below to install it. After executing those commands I get this when I check the java version:
-bash: /usr/bin/java: cannot execute binary file: Exec format error

right. exec format error is the wrong binary format for your hardware.
What does

file -L /usr/bin/java

show ?

and what does e.g.

file /bin/ls

show ?

/usr/bin/java: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.26, BuildID[sha1]=aea2077415200ba36a0077f97a06a977726c32d7, not stripped

/bin/ls: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=2f15ad836be3339dec0e2e6a3c637e08e48aacbd, for GNU/Linux 3.2.0, stripped

Could you check which files you have in /etc/apt/sources.list.d/ .
Especially what is the content of files that start with zulu in the name.

You wrote you restored a backup from PI to PC. That is about OH2 / OH3 backup not a complete system backup, right ?

Not sure, what you mean. This is what I did:

  1. This computer originally had OpenHAB2 on it.
  2. I wanted to try out OpenHAB3 so I installed it on a Raspberry PI
  3. When I was comfortable with OpenHAB3 I did a backup of OpenHAB3
  4. On computer I got rid of Openhab2, I think I did a purge
  5. Then I used OpenHabian to install OpenHab3
  6. Then I restored my Openhab3 backup
zulu-embedded.list              zulu-openjdk.list.distUpgrade
iconnor-ubuntu-zoneminder-xenial.list.distUpgrade  nodesource.list.save         openhab.list.distUpgrade           webupd8team-ubuntu-java-xenial.list              zulu-embedded.list.distUpgrade  zulu-openjdk.list.save
iconnor-ubuntu-zoneminder-xenial.list.save         openhab2.list.distUpgrade    webupd8team-java.list              webupd8team-ubuntu-java-xenial.list.distUpgrade  zulu-embedded.list.save
nodesource.list                                    openhab2.list.save           webupd8team-java.list.distUpgrade  webupd8team-ubuntu-java-xenial.list.save         zulu-openjdk.list

Which files do you need contents?
All the zulu files have one line at the top, with a # sound in front of it

Try to run

dpkg-query --showformat '${Status}\t${Package}\t${Version}\t${Architecture}\t${Origin}\t${Section}\n' -W | column -ts $'\t' | grep zulu

This should list the installed java packages from zulu repositories.
Check the architecture column. There must be at least one package that is not amd64 nor x86 but arm.
Note down the package names of the arm packages.
Deinstall them with

sudo apt-get remove package-name

Remove the file zuluzulu-embedded.list ( or rename the extension to zulu-embedded.list.old )
Then update the repository cache: sudo apt-get update
What is the content of
zulu-embedded.list
zulu-openjdk.list

Do a
dpkg -l | grep java