-
-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace OracleJDK by Zulu Embedded JDK #26
Comments
Hi @kaikreuzer, that sounds good. @cyberkov what do you think? Chris |
Not sure if https://github.com/zulu-openjdk/zulu-openjdk/blob/master/8u102-8.17.0.3/Dockerfile contains the ARM versions, but you are probably the better ones to tell. |
As of https://www.azul.com/products/zulu/zulu-system-specifications/ ARM v7 and 32-bit v8 |
I was speaking about the linked Dockerfile above. Zulu is definitely available for ARM, that's why I created this issue in the first place. |
Yees, ok. Ok, they've no tagged ARM version. So either we have to add a Step to the README to build the image first manually on the target system. Then apt will ensure the right platform I think. Or we integrate the few steps of their dockerfile to our build. |
I´ve just had a look at the zulu repos and it looks like that they do not provide deb´s for the arm version. So I just created a fork of this repository and changed it from oracle jdk to Zulu. So if you´re interested, take a look at https://github.com/patrickse/openhab-docker/tree/zulu. I am using this one on my private environment from now on to get a feeling for Zulu. But it looks promising.. |
The environment is not working as expected with online mode. Got a problem with certificates for ssl connection. |
Probably, this will soon change, what should make the packaging simpler.
@patrickse Do you have any further details on this? |
Hi Kai, just tried to reproduce this problem with a current build. It looks like the problem disappeared. The only difference now is, if tried this in docker4mac. I will try to run it tomorrow on one of my Pi´s. Here´s the Stacktrace of the failure...
|
Just forgot to mention that I am using Zulu on my pi with the offline distro for 2 weeks now. |
This occurs for all kinds of SSL communication and seems to be solvable by setting some variables and is not really related to Zulu itself.
That is great - so it indeed seems to be working pretty well! |
I do not really see a difference between oracle and azul java on my pi. So I guess it's ok. If you're keen enough you can try my modified openhab image in my repo. |
With PR #47 this project is using OpenJDK8. I think using OpenJDK8 it's better than using Zulu. Can this issue be closed or are there any requirements left for migrating to Zulu? |
Not at all, openHAB does not work reliably with OpenJDK. Zulu Embedded is the only OpenJDK build that works decently on arm platforms. |
I could not find a download for Zulu architecture ARM64. There are only 32Bit images at: http://www.azul.com/downloads/zulu-embedded/ |
Correct. In any case, you should use the 32bit JVM also on ARM64 - see here. |
FTR, there are now alias links available for the Zulu JDK (so that the links do not need to be adapted on any newer JDK update version): https://www.azul.com/downloads/zulu/zdk-8-ga-linux_aarch32hf.tar.gz In a few weeks, we will also see public apt repositories at Azul. |
The 32Bit binaries are not working on 64Bit operating system used by this dockerfile architecture ARM64. For raspberry pi there is only a 32Bit raspian operating system available. That is the reason why you can use the 32Bit armhf version of zulu. So far i did not get it working on ARM64. |
@legacycode
after unpacking the 32 bit ARM Zulu JDK? |
Yes. I have tried following commands:
without success... for amd64 and armhf these commands works fine. maybe you can find the solution. |
If I execute Docker on the arm64 device directly (without qemu), everything runs fine ...
But on a amd64, I'm getting the ' No such file or directory' error message (which you get on arm64 as well if you forget to install the armv7 shared libraries). May be we can ask @moul if he has an idea. P.S. I was unable to use ezdk on the latest arm64 kernel, calling javac stops with an 'undefined instruction' error. |
I found the reason. Qemu-*-static is only compiled for ELF 64-bit. You can find the releases and details at: https://github.com/multiarch/qemu-user-static/releases/ This meens that we are able to compile the docker images for 32-bit arm and zulu, but we can not launch openhab with Qemu. I mailed zulu and get the following answer:
We should wait till the download for arm64 is available. |
As mentioned in my #26 (comment), I do not advice a 64-bit JVM, we should stick to 32-bit by all means. If this doesn't work for qemu, so be it and it needs some specific solution, but the general arm64 Docker image should package the 32-bit JVM. So imho no need to wait for anything. |
IHMO Qemu is needed for automated builds on Dockerhub. I hope Azul does a better job than Oracle when building a JVM for aarch64. |
Hm, that's bad then...
It is not just the issues of the JVM itself. Note that with e 64-bit JVM (regardless how well this works), no binding that requires serial connection (like e.g. Z-Wave) will work. Therefore such an openHAB installation will be useless for many users. |
Unless you issue your own aarch64 build of libNRJavaSerial.so. |
I have done a lot of work the last days and tried a lot. I can only test the amd64 version and it seems to be running fine. Could you please verify my arm64 image with the 32-Bit Azul version. You can download it from openhab:2.1.0-snapshot. Btw: Note that i deleted gosu and the entryfile. Therefore the default docker behaviour in managing data in containers gets in place. If you would like to use a volume on the host with the default openhab config files generated use the ADD method in the following documentation. If you would like to use existing openhab config files, you can MOUNT them: https://docs.docker.com/engine/tutorials/dockervolumes/ ADD Method (generates openhab config files in volume):
MOUNT Method (mount existing configuration files to openhab). Do not forget to set permission for the openhab user on your hosts filesystem. It runs user id 9001 and group id 9001. You have to
Any comments? |
LGTM |
@umiddelb have you tested the new 2.1.0-snapshot? This runs zulu in 32bit on arm64. Could you please verify if it works as expected? |
I've created
If I use
I could set up one Pine64 for external access (DMZ) so that you can test it by yourself directly. Just send me your ssh key to uli@middelberg.de |
I know. It's an open todo. I will write a setup script to initiate the directories and update the docs next week. In the meantime you can create the files from the image by following: Create the mountpoints:
Copy config files from image to mount point:
Or you can run the image by using a docker data volume:
There is a difference between using docker data container or docker mount points. Docker data containers are copying the volumes. Docker mount points does not do that. Thats the normal behaviour. For details visit: https://docs.docker.com/engine/tutorials/dockervolumes/
|
OK. |
Yep. My last example should always run. Because the volumes are defined in the Dockerfile as well, mounting the data volume is redundant anyway. |
I think, we can close this issue, or? |
Yes. I will check if it works when my aarch64 arrives :-) |
the ZDK is there, but OH doesn't start properly. |
hmmm... ok. maybe we should fallback to oracle for aarch64 till azul publishes the 64bit version. |
IMHO this issue doesn't seem to be related to the choice of the JDK, looks like a missing parameter or wrong shell:
|
On my machine (amd64) works zulu java! |
Could this font problem be related to the zulu Java? |
That does not relate to the zulu Java version. I think there is a permission problem with the docker mounted volume. We changed it from uid 1000 to 9001. The local filesystem on the host must reflect this uid. I dont loke mounted volumes for beginners. Therefore i changed the documentation to use named volumes instead. I will write an upgrade section in the next days. |
Back to zulu, would not it be better if you directly installed the linux packages per apt-get? |
Zulu only provides the amd64 images in an apt-repository. For armhf it needs to be installed manually and for aarch64 there is only the 32bit armhf version. That does not bring any benefit right now. |
i will do some more tests when my aarch 64 arrives. |
@cniweb: We are on Azul Zulu right now and i think we should not change this. Pls close this issue and lets create new issues for upcoming problems. |
Good news! Azul Systems has released their OpenJDK build for ARM 32-bit, which can be downloaded here: http://zulu.org/download/?platform=Linux&processor=ARM%20v7&bitness=32
In contrast to the OracleJDK, this can be freely redistributed and thus it is a much better option to use within the Docker container.
In my initial tests, openHAB is running very smoothly on it and I couldn't make out any performance or stability issues with it - it felt just like the OracleJDK.
I therefore highly recommend to change the Docker image to this JVM.
The text was updated successfully, but these errors were encountered: