ryansch / docker-unifi-rpi

Unifi Controller for Raspberry Pi 3+ and x86
https://hub.docker.com/r/ryansch/unifi-rpi/
347 stars 42 forks source link

WARNING: An illegal reflective access operation has occurred #101

Closed Tonyhaenn closed 1 year ago

Tonyhaenn commented 1 year ago

I've been running the the Unifi docker image successfully for the last few years. I've got a docker compose setup. I noticed on my most recent update to the most recent version, I'm getting the following error in the logs. Is this a unifi bug?

unifi | WARNING: An illegal reflective access operation has occurred unifi | WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase (file:/usr/lib/unifi/lib/tomcat-embed-core-9.0.65.jar) to field java.io.ObjectStreamClass$Caches.localDescs unifi | WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoaderBase unifi | WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations unifi | WARNING: All illegal access operations will be denied in a future release

ryansch commented 1 year ago

That's one I haven't seen! I don't have any reason to believe it's docker related.

Tonyhaenn commented 1 year ago

I'm assuming it's a unifi bug vs. some version / package clash inside the docker image.

The controller still seems to function properly. I'm not sure what to make of it. I'm still running 7.4.156. I can try upgrading to latest and seeing if it disappears.

Tonyhaenn commented 1 year ago

Still present in 7.4.162

ryansch commented 1 year ago

@Tonyhaenn If you're willing to run the latest beta release, I had to completely change the way the java environment is set up for 7.5.165. Would you mind testing that?

ryansch commented 1 year ago

Update: I'm now running my home network on 7.5.165 on a pi 4b.

Tonyhaenn commented 1 year ago

Yup. With 7.5.165 I was able to boot successfully and no longer see the error. I am seeing a new message

unifi The requested image's platform (linux/arm64v8) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

I had previously solved that by updating my compose.yml to include platform: linux/arm64v8 but that wouldn't work this time to pull the 7.5.165 image.

uname -a output: Linux mango 5.15.0-1033-raspi #36-Ubuntu SMP PREEMPT Thu Jun 22 08:10:31 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

ryansch commented 1 year ago

@Tonyhaenn What version of docker are you running?

Do you have all of the following packages installed (if you used apt)? docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Edit: Official docs are here: https://docs.docker.com/engine/install/ubuntu/

Tonyhaenn commented 1 year ago

I'm running docker 24.0.04

I checked those packages, I do not have docker-buildx-plugin installed, but I have the rest

ryansch commented 1 year ago

@Tonyhaenn I haven't been able to figure out what causes that bad request for linux/arm64v8 on some devices. Could you try installing docker-buildx-plugin to see if that changes the behaviour?

Tonyhaenn commented 1 year ago

My mistake. It was already installed.

ryansch commented 1 year ago

If you remove the platform key entirely from your compose.yml file does it do anything different?

Tonyhaenn commented 1 year ago

For the 7.5.165 version, I had to remove the platform key. For the prior version I was on (latest), I needed that key to get docker to pull the image.

ryansch commented 1 year ago
image

I don't understand why your device says the image has the platform linux/arm64v8. That screenshot is pulling the manifest directly and displaying it.

Tonyhaenn commented 1 year ago

I ran the same and see the same thing on my RPI. It's such an odd error message with the extra slash in the detected host platform vs. the requested image. Perhaps this is a docker bug?

! unifi The requested image's platform (linux/arm64v8) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

ryansch commented 1 year ago

You're not the first person to run into it either! I'd love to have some kind of fix.

Tonyhaenn commented 1 year ago

This specific issue is probably good to close, since the top level issue with the illegal reflection is resolved in 7.5. Unless you want to leave it open to track the docker platform shenanigans?

ryansch commented 1 year ago

No honestly that should be a new issue or discussion. Thanks so much for the feedback!