Upgrade OH3 to OH4

Please help!! Updated without reading from Openhab3 to openhab 4 via openhabian-config/ Now openhab doesn’t start, what can I do? How to update Java 11 to Java 17? There is no openhabian-config option. When updating the software and the structure from the site, the JAGDG gives the error zulu/deb stable InRelease’ doesn’t support
architecture ‘armhf’

  • What is the hardware that you use ?
  • What is the OS and version ( jessie, stretch, buster, bullseye, … ) that you use ?

Release = Raspbian GNU/Linux 10 (buster)

Kernel = Linux 5.10.103-v7l+

Openhabian

See reply to your double post:

how to manually install step by step?

this has already been answered

Read the PDF at the bottom!

2 Likes

I stuck at 4b) tar -xzf zulu17.38.21-ca-src-jdk17.0.5-linux_aarch32hf.tar.gz -C /usr/lib/jvm

openhabian@openhabian:/usr/share/openhab $ tar -xzf zulu17.38.21-ca-src-jdk17.0.5-linux_aarch32hf.tar.gz -C /usr/lib/jvm
tar (child): zulu17.38.21-ca-src-jdk17.0.5-linux_aarch32hf.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

the filename on my pi is “zulu17.38.21-ca-jdk17.0.5-linux_aarch32hf.tar.gz” so I tried without the “src”:

openhabian@openhabian:/usr/share/openhab $ tar -xzf zulu17.38.21-ca-jdk17.0.5-linux_aarch32hf.tar.gz -C /usr/lib/jvm
tar: /usr/lib/jvm: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now

Any help what Iam doing wrong?

The option “-C /usr/lib/jvm” tries to extract the tar file content into directory /usr/lib/jvm ( see: man tar ).
According to the error message ( tar: /usr/lib/jvm: Cannot open: No such file or directory ) the directory /usr/lib/jvm does not exist. You need to create it first ( sudo mkdir /usr/lib/jvm ) if you would like to extract the file into that directory.

thx, I tried again after ( sudo mkdir /usr/lib/jvm ) I used
tar -xzf zulu17.38.21-ca-jdk17.0.5-linux_aarch32hf.tar.gz -C /usr/lib/jvm
and got many similar errors like:
tar: zulu17.38.21-ca-jdk17.0.5-linux_aarch32hf: Cannot mkdir: Permission denied
tar: zulu17.38.21-ca-jdk17.0.5-linux_aarch32hf: Cannot mkdir: Permission denied
tar: zulu17.38.21-ca-jdk17.0.5-linux_aarch32hf/man: Cannot mkdir: No such file or directory
tar: zulu17.38.21-ca-jdk17.0.5-linux_aarch32hf: Cannot mkdir: Permission denied

Use sudo in front of the tar command to extract the file with root permissions. This will enable you to create missing sub directories while extracting the files.

sudo tar -xzf zulu17.38.21-ca-jdk17.0.5-linux_aarch32hf.tar.gz -C /usr/lib/jvm
doesnt do anything not even asking for the password :frowning:

Sure that it didn’t do anything ?
Doing two sudo commands in short time the password may not be requested for the second command.
What does ls /usr/lib/jvm/ show ?

If you add the v option it will show verbose output.
sudo tar -xvzf zulu17.38.21-ca-jdk17.0.5-linux_aarch32hf.tar.gz -C /usr/lib/jvm

openhabian@openhabian:/usr/share/openhab $ ls /usr/lib/jvm/
zulu17.38.21-ca-jdk17.0.5-linux_aarch32hf

this is what i want?

That is created with all its content using the command you used.
So yes, that is the content you want.

great, I keep going:
openhabian@openhabian:/usr/share/openhab $ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/zulu17.38.21-ca-jdk17.0.5-linux_aarch32hf/bin/java 2222
update-alternatives: using /usr/lib/jvm/zulu17.38.21-ca-jdk17.0.5-linux_aarch32hf/bin/java to provide /usr/bin/java (java) in auto mode
openhabian@openhabian:/usr/share/openhab $ sudo update-alternatives --list
update-alternatives: --list needs

Use ‘update-alternatives --help’ for program usage information.

so I tried
openhabian@openhabian:/usr/share/openhab $ update-alternatives --list java
/usr/lib/jvm/zulu17.38.21-ca-jdk17.0.5-linux_aarch32hf/bin/java
openhabian@openhabian:/usr/share/openhab $ sudo update-alternatives --config java
There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/zulu17.38.21-ca-jdk17.0.5-linux_aarch32hf/bin/java
Nothing to configure.

I guess Iam done and finish it with sudo systemctl restart openhab?

nvm, got it running after the last steps. thank you very much :slight_smile:

1 Like

Hi,
I updated java to 17 and after upgrade to OH 4

systemctl status openhab shows

 openhab.service - openHAB - empowering the smart home
     Loaded: loaded (/lib/systemd/system/openhab.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/openhab.service.d
             └─override.conf
     Active: deactivating (stop-sigterm) since Thu 2023-08-24 19:43:11 CEST; 59s ago
       Docs: https://www.openhab.org/docs/
             https://community.openhab.org
    Process: 11407 ExecStop=/usr/share/openhab/runtime/bin/karaf stop (code=exited, status=0/SUCCESS)
   Main PID: 10825 (java)
      Tasks: 94 (limit: 4531)
        CPU: 3min 18.172s
     CGroup: /system.slice/openhab.service
             └─10825 /usr/bin/java -XX:-UsePerfData -Dopenhab.home=/usr/share/openhab -Dopenhab.conf=/etc/openhab -Dopenhab.runtime=/usr/share/op>

Aug 24 19:43:11 openhabian systemd[1]: Stopping openHAB - empowering the smart home...

When I start Web UI it shows:
No service was found.

I started Upgrade process because Phoscon sucks again and no Zigbee was working. Now there is the big mass

Now its showing active but same problem:

 openhab.service - openHAB - empowering the smart home
     Loaded: loaded (/lib/systemd/system/openhab.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/openhab.service.d
             └─override.conf
     Active: active (running) since Thu 2023-08-24 19:55:24 CEST; 12s ago
       Docs: https://www.openhab.org/docs/
             https://community.openhab.org
   Main PID: 22596 (java)
      Tasks: 35 (limit: 4531)
        CPU: 26.648s
     CGroup: /system.slice/openhab.service
             └─22596 /usr/bin/java -XX:-UsePerfData -Dopenhab.home=/usr/share/openhab -Dopenhab.conf=/etc/openhab -Dopenhab.runtime=/usr/share/op>

Aug 24 19:55:24 openhabian systemd[1]: Started openHAB - empowering the smart home.

What does the openhab.log file in /var/log/openhab log show ?
What is the output of

sudo netstat -tulpn | grep -i java

How did you upgrade ? OS is Bullseye ? Java is version 17 ?