Skip to content
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

beta - Java 17 required for 7.5.165 #673

Closed
nibblerrick opened this issue Jul 26, 2023 · 14 comments · Fixed by #681
Closed

beta - Java 17 required for 7.5.165 #673

nibblerrick opened this issue Jul 26, 2023 · 14 comments · Fixed by #681
Assignees
Labels

Comments

@nibblerrick
Copy link

Operating system

Debian bullseye, docker beta image

UniFi Tag

EA

Docker run

docker run -d --init --restart=unless-stopped -p 8080:8080 -p 8443:8443 -p 3478:3478/udp -e TZ='Europe/Berlin' -v unifi-data:/unifi --name unifi -e https://dl.ui.com/unifi/7.5.165-9316de8cde/unifi_sysvinit_all.deb jacobalberty/unifi:beta

Bug description

Controller won't start and errors out because of incompatible java version.

Would be nice if the beta image could get some love again.
Probably changing the java version should do the trick already, if AFAIK the beta image uses bullseye and the package openjdk-17-jre-headless is available there.

Thanks in advance!

Steps to reproduce

No response

Relevant log output

No response

@jcostom
Copy link
Contributor

jcostom commented Aug 2, 2023

I forked and created a working proof-of-concept supporting v7.5. There's a delicate line to walk here - the base image has to be Ubuntu 20.04 (aka Focal).

Focal has Java 17 and MongoDB 3.6. The 18.04/Bionic release doesn't seem to have Java 17, so that's out. The more recent LTS, 22.04/Jammy has Java 17, but no Mongo packages at all. You can of course add the mongodb.org repo for Jammy to the image, but the furthest back they support is v4.x, which reportedly works, though isn't supported by Ubiquiti.

There seems to be a minor thing introduced by Java 17 here, where the controller tosses its cookies because of a permissions problem with java.time. I found a workaround though and added that to the JVM options in my proof-of-concept.

The differences here are not massive. It looks possible to support v7.5 without a ton of pain. Here's the diff between where I landed and the current release.

IMHO, this whole thing would get a LOT easier if Ubiquiti would support MongoDB 6.

@it-can
Copy link

it-can commented Aug 28, 2023

@jacobalberty any news on this?

@jcostom
Copy link
Contributor

jcostom commented Aug 31, 2023

FYI - I just updated to 7.5.174 and everything works in my testing. That link I posted above still goes to the diff's between this repo and my fork. I'm happy to file a pull request once 7.5 goes GA if folks would like.

@skynet01
Copy link

skynet01 commented Sep 1, 2023

Any ideas @jacobalberty when this can be added to the official release? Would love to get 7.5 going :) Thanks again for all your hard work

@it-can
Copy link

it-can commented Sep 2, 2023

FYI - I just updated to 7.5.174 and everything works in my testing. That link I posted above still goes to the diff's between this repo and my fork. I'm happy to file a pull request once 7.5 goes GA if folks would like.

yeah that would be nice! i see that https://community.ui.com/releases/UniFi-Network-Application-7-5-174/d05b091f-f00c-4ebb-8f42-b77e0adac78b is a RC now

@skynet01
Copy link

skynet01 commented Sep 4, 2023

FYI - I just updated to 7.5.174 and everything works in my testing. That link I posted above still goes to the diff's between this repo and my fork. I'm happy to file a pull request once 7.5 goes GA if folks would like.

Now that it's official, want to do that pull request now :)

@jcostom
Copy link
Contributor

jcostom commented Sep 5, 2023

FYI - I just updated to 7.5.174 and everything works in my testing. That link I posted above still goes to the diff's between this repo and my fork. I'm happy to file a pull request once 7.5 goes GA if folks would like.

Now that it's official, want to do that pull request now :)

I'm testing. I don't expect any problems, but wanted to check first.

@jacobalberty
Copy link
Owner

Taking a look at the pr right now, though its currently failing the build though, my guess is its failing on the 32 bit arm support. iirc 20.04 does not have any path to supporting arm32 which is why we stayed on 18.04 for so long. It might be worth bumping mongodb soon, the release notes for 7.5.x specify Require MongoDB 3.6 or newer. This also drops support for 32-bit systems. so it looks like its time to drop arm 32 entirely. Maybe bump mongodb to a newer version and go with the latest ubuntu lts (22.04)

@jcostom
Copy link
Contributor

jcostom commented Sep 5, 2023

I suspect you're correct. I don't have anything arm32 handy to test with, unfortunately. I didn't catch the mongodb 3.6 or newer line either. It would be nice if it worked on 6.x, which would enable going to the Ubuntu Jammy base image. I'll see if I get some time to try that out this week.

@jcostom
Copy link
Contributor

jcostom commented Sep 5, 2023

Taking a peek at the .deb file, the dependencies show...

Depends: binutils, coreutils, adduser, libcap2, curl,
  mongodb-server (>= 1:3.6.0) | mongodb-10gen (>= 3.6.0) | mongodb-org-server (>= 3.6.0),
  mongodb-server (<< 1:5.0.0) | mongodb-10gen (<< 5.0.0) | mongodb-org-server (<< 5.0.0),
  openjdk-17-jre-headless, logrotate

If I'm reading that right, 3.6 - 4.4.24 would now be acceptable versions. The earliest version available for Ubuntu Jammy in their repositories seems to be 5.x, so that still leaves us stuck on Focal/20.04. Definitely progress though!

@jcostom
Copy link
Contributor

jcostom commented Sep 5, 2023

I also just removed arm32 from the automatic builds, committed, and now this pull request passes testing, albeit without arm32. I think you're right - arm32 may be over. The good news is arm64 devices are pretty cheap now. I've got a couple of Orange Pi 4 LTS's around the house. 6 cores, 4GB RAM, 16GB eMMC onboard, and they're like $75-ish on Ali Express. Armbian arm64 builds are solid on them.

@nibblerrick
Copy link
Author

Thanks!
The beta-image isn't updated so far, or can the pkgurl-parameter also used with the master image?

@skialpine
Copy link

This is in the latest image, not beta. The release is GA.

@nibblerrick
Copy link
Author

Saw that, but my initial question/report was for the beta image, so question is what's with the beta image :-)
New EA from unifi will come sooner or later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants