Trying to update zulu everytime

Running openhabian 2.5@Rpi3 and everytime i update via openhab-config it keeps re/updating zulu java too. I get :

2019-12-28_17:53:29_EET [openHABian] Updating repositories and upgrading installed packages...
$ wget -O openhab-key.asc https://bintray.com/user/downloadSubjectPublicKey?username=openhab
--2019-12-28 17:53:29--  https://bintray.com/user/downloadSubjectPublicKey?username=openhab
Resolving bintray.com (bintray.com)... 75.126.208.206
Connecting to bintray.com (bintray.com)|75.126.208.206|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/octet-stream]
Saving to: ā€˜openhab-key.ascā€™

openhab-key.asc                                     [ <=>                                                                                                 ]   3.14K  --.-KB/s    in 0.001s

2019-12-28 17:53:30 (3.57 MB/s) - ā€˜openhab-key.ascā€™ saved [3219]


$ 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-12-28_17:54:11_EET [openHABian] Installing Java Zulu 32-Bit OpenJDK...
$ wget -nv -O /tmp/openhabian.IPFRd/zulu8.tar.gz https://cdn.azul.com/zulu-embedded/bin/zulu8.40.0.178-ca-jdk1.8.0_222-linux_aarch32hf.tar.gz
2019-12-28 17:55:03 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.IPFRd/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.bhrxP/crypto.zip http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip
2019-12-28 17:56:20 URL:http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip [12181/12181] -> "/tmp/openhabian.bhrxP/crypto.zip" [1]

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

Is that normal???

Have you ran this from command line?

wget -qO - 'https://bintray.com/user/downloadSubjectPublicKey?username=openhab' | sudo apt-key add -

ok thnx mate

Did you copy and paste or type it in? I ask b/c I think itā€™s a capital O behind the -q

You also missed the first line of the command. It is wget not get

What am I missing?

yes i got it ,its updated ok but still it tries to update java again stoping openhab.service and restartingā€¦

Yes its normal for openhabian to update and usually mentions that itā€™s the latest version. It also checks most everything else as well.

Are you having an issue or just curious about the message?

i dont have an issue other than it restarts openhab.service everytime i check for updatesā€¦i was just more curious about it.

When you use openhabian-config to update it stops OH, updates, and restarts everything so itā€™s normal.:smiley:

1 Like

Same here. As reported below each time I upgrade system in openhabian-config it seems to install java again. It started to do this some months ago with Openhab 2.4
I did a upgrade to Openhab 2.5 and itā€™s still the same.

I didnā€™t understandā€¦ is it normal?

$ 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)
2020-01-04_14:34:06_CET [openHABian] Installing Java Zulu 32-Bit OpenJDK...
$ wget -nv -O /tmp/openhabian.RGLTQ/zulu8.tar.gz https://cdn.azul.com/zulu-embedded/bin/zulu8.40.0.178-ca-jdk1.8.0_222-linux_aarch32hf.tar.gz
2020-01-04 14:34:34 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.RGLTQ/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.AX6Gl/crypto.zip http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip
2020-01-04 14:34:59 URL:http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip [12181/12181] -> "/tmp/openhabian.AX6Gl/crypto.zip" [1]

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

$ systemctl start openhab2.service
OK

I think it is normal. @mstormi can verify.

Normal yes, optimal no.
Add a ā€œme tooā€ to current Java gets installed again and openHAB restarted on every system upgrade from openhabian-config Ā· Issue #723 Ā· openhab/openhabian Ā· GitHub