Openhabian-config - Zulu OpenJDK forces OpenHAB to restart

I switched to Zulu OpenJDK (1.8.0_222) on OpenHAB 2.5M3 (openhabian) a few days ago and everything is running well so far.
But: every time I run an update via openhabian-config, java seems to be removed, openhab stopped, a fresh install of Zulu OpenJDK and restart of openhab (see logfile attached).

How can I stop this behaviour and only restart openhab when a real upgrade is performed?

$ java_install_or_update
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (Zulu8.40.0.178-CA-linux_aarch32hf) (build 1.8.0_222-b178)
OpenJDK Client VM (Zulu8.40.0.178-CA-linux_aarch32hf) (build 25.222-b178, mixed mode, Evaluation)

$ systemctl stop openhab2.service
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (Zulu8.40.0.178-CA-linux_aarch32hf) (build 1.8.0_222-b178)
OpenJDK Client VM (Zulu8.40.0.178-CA-linux_aarch32hf) (build 25.222-b178, mixed mode, Evaluation)
2019-09-19_10:04:06_CEST [openHABian] Installing Java Zulu 32-Bit OpenJDK...
$ wget -nv -O /tmp/openhabian.bxJ35/zulu8.tar.gz https://cdn.azul.com/zulu-embedded/bin/zulu8.40.0.178-ca-jdk1.8.0_222-linux_aarch32hf.tar.gz
2019-09-19 10:04:30 URL:https://cdn.azul.com/zulu-embedded/bin/zulu8.40.0.178-ca-jdk1.8.0_222-linux_aarch32hf.tar.gz [175560479/175560479] -> "/tmp/openhabian.bxJ35/zulu8.tar.gz" [1]

$ update-alternatives --remove-all java

$ update-alternatives --remove-all javac

$ update-alternatives --install /usr/bin/java java /opt/jdk/zulu8.40.0.178-ca-jdk1.8.0_222-linux_aarch32hf/bin/java 1083000
update-alternatives: /opt/jdk/zulu8.40.0.178-ca-jdk1.8.0_222-linux_aarch32hf/bin/java wird verwendet, um /usr/bin/java (java) im automatischen Modus bereitzustellen

$ update-alternatives --install /usr/bin/javac javac /opt/jdk/zulu8.40.0.178-ca-jdk1.8.0_222-linux_aarch32hf/bin/javac 1083000
update-alternatives: /opt/jdk/zulu8.40.0.178-ca-jdk1.8.0_222-linux_aarch32hf/bin/javac wird verwendet, um /usr/bin/javac (javac) im automatischen Modus bereitzustellen

$ wget -nv -O /tmp/openhabian.AKcv1/crypto.zip http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip
2019-09-19 10:05:01 URL:http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip [12181/12181] -> "/tmp/openhabian.AKcv1/crypto.zip" [1]

$ unzip /tmp/openhabian.AKcv1/crypto.zip -d /tmp/openhabian.AKcv1
Archive:  /tmp/openhabian.AKcv1/crypto.zip
   creating: /tmp/openhabian.AKcv1/ZuluJCEPolicies/
  inflating: /tmp/openhabian.AKcv1/ZuluJCEPolicies/LICENSE
  inflating: /tmp/openhabian.AKcv1/ZuluJCEPolicies/README.txt
  inflating: /tmp/openhabian.AKcv1/ZuluJCEPolicies/DISCLAIMER
  inflating: /tmp/openhabian.AKcv1/ZuluJCEPolicies/local_policy.jar
  inflating: /tmp/openhabian.AKcv1/ZuluJCEPolicies/US_export_policy.jar
OK

Exactly what menu path are you selecting?

Hi codegrau,

I’ve had this very same behaviour with constant reinstallation of the Zulu OpenJDK, as commented here

Unfortunately no reply to my query yet, or maybe we should open another issue for this particular case.

Installed Zulu with openhabian-config [63] and trying to update with [02]

Do you have any zulu files in /etc/apt/sources.list.d ?
If so, delete them and retry.

I removed the zulu list but still stopping openhab.

$ apt-get --yes upgrade
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
Paketaktualisierung (Upgrade) wird berechnet... Fertig
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.

$ java_install_or_update
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (Zulu8.40.0.178-CA-linux_aarch32hf) (build 1.8.0_222-b178)
OpenJDK Client VM (Zulu8.40.0.178-CA-linux_aarch32hf) (build 25.222-b178, mixed mode, Evaluation)

$ systemctl stop openhab2.service
...

But java was NOT un- or reinstalled this time ? Did you run apt update or did openhabian-config run that ?

You need to be more verbose. Provide the whole log, explain the starting point and carefully describe all the steps.
It’s guessing else.

Hey @mstormi
sorry for cutting the logs - even last time java was downloaded and installed.

I guess here’s the thing - so theres a stop/check/download/start of openhab every time the “update” is processed? Am I right?

openhabian-config updated.

No zulu files in /etc/apt/sources.list.d

The issue is still there for me every time I run an Upgrade System through openhabian-config, constantly re-installing the same build 1.8.0_222-b178 over and over again.

Raspberry Pi 4, initially set up with openHABian 1.5 image.

$ apt-key add openhab-key.asc 
OK

$ apt-get --yes upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ java_install_or_update  
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (Zulu8.40.0.178-CA-linux_aarch32hf) (build 1.8.0_222-b178)
OpenJDK Client VM (Zulu8.40.0.178-CA-linux_aarch32hf) (build 25.222-b178, mixed mode, Evaluation)

$ systemctl stop openhab2.service 
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (Zulu8.40.0.178-CA-linux_aarch32hf) (build 1.8.0_222-b178)
OpenJDK Client VM (Zulu8.40.0.178-CA-linux_aarch32hf) (build 25.222-b178, mixed mode, Evaluation)
2019-09-23_19:37:46_CEST [openHABian] Installing Java Zulu 32-Bit OpenJDK... 
$ wget -nv -O /tmp/openhabian.Q5nlw/zulu8.tar.gz https://cdn.azul.com/zulu-embedded/bin/zulu8.40.0.178-ca-jdk1.8.0_222-linux_aarch32hf.tar.gz 
2019-09-23 19:40:01 URL:https://cdn.azul.com/zulu-embedded/bin/zulu8.40.0.178-ca-jdk1.8.0_222-linux_aarch32hf.tar.gz [175560479/175560479] -> "/tmp/openhabian.Q5nlw/zulu8.tar.gz" [1]

$ update-alternatives --remove-all java 

$ update-alternatives --remove-all javac 

$ update-alternatives --install /usr/bin/java java /opt/jdk/zulu8.40.0.178-ca-jdk1.8.0_222-linux_aarch32hf/bin/java 1083000 
update-alternatives: using /opt/jdk/zulu8.40.0.178-ca-jdk1.8.0_222-linux_aarch32hf/bin/java to provide /usr/bin/java (java) in auto mode

$ update-alternatives --install /usr/bin/javac javac /opt/jdk/zulu8.40.0.178-ca-jdk1.8.0_222-linux_aarch32hf/bin/javac 1083000 
update-alternatives: using /opt/jdk/zulu8.40.0.178-ca-jdk1.8.0_222-linux_aarch32hf/bin/javac to provide /usr/bin/javac (javac) in auto mode

$ wget -nv -O /tmp/openhabian.x6iU4/crypto.zip http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip 
2019-09-23 19:41:23 URL:http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip [12181/12181] -> "/tmp/openhabian.x6iU4/crypto.zip" [1]

$ unzip /tmp/openhabian.x6iU4/crypto.zip -d /tmp/openhabian.x6iU4 
Archive:  /tmp/openhabian.x6iU4/crypto.zip
   creating: /tmp/openhabian.x6iU4/ZuluJCEPolicies/
  inflating: /tmp/openhabian.x6iU4/ZuluJCEPolicies/LICENSE  
  inflating: /tmp/openhabian.x6iU4/ZuluJCEPolicies/README.txt  
  inflating: /tmp/openhabian.x6iU4/ZuluJCEPolicies/DISCLAIMER  
  inflating: /tmp/openhabian.x6iU4/ZuluJCEPolicies/local_policy.jar  
  inflating: /tmp/openhabian.x6iU4/ZuluJCEPolicies/US_export_policy.jar  
OK

$ systemctl start openhab2.service 

The only thing, which might be different to other users, is that In was bitten by the Java update error, which was briefly happening until it quickly got fixed - Openhabian config error on upgrade system

Other than not using Upgrade System through openhabian-config any longer, I’m at a loss as how to fix this issue.

I have exatly the same behaviour, als had the Update error and done the mentioned fix.
Would really aprechiate a fix.

Thanks in andvantage
Andy