-
Notifications
You must be signed in to change notification settings - Fork 58
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
Fix the JDK checks on startup please, and Windows won't start at all #95
Comments
Hi, can you share what java build (openjdk, zulu, adoptium) you have installed that is returning 1.17 for version? 11, 17 on temurin and openjdk start just fine with the 1.0.4 release as java -version returns As for the second issue, I'll look into how we can make this easier, we should be able to at least surface the error better. |
Hey.
The JRE 1.17 I was running on Windows was reinstalled to 1.8, so I can't get you a sample output right now. You can play with the existing logic in Bash like this:
Because Sun/Oracle switched up how versions are reported you'll have to do special checks for post 1.8 reported versions. A regex could handle doing the pattern detection and extracting the comparable value. Same in PowerShell. Probably the easiest approach. I point out how the Windows service is registered with the JRE path embedded because it'll be a future point of mysterious failure. I completely recognize that Windows services are a PITA. If you fix the version detection, people will upgrade their JRE versions and may not keep the old one around. Thanks for responding. |
Having the same problem: on Windows it just doesn't start. Not sure if the reason is the same, but here's all I get:
|
Yes it would. The point of the issue is that anything newer than JDK8 will work fine except for the start script's JDK version detection. Still no update to 1.0.4. |
Guidelines
ongdb 1.0.4
Windows Server 2002
AlmaLinux 8.5
Hi all.
This:
ongdb/packaging/standalone/src/main/distribution/shell-scripts/bin/ONgDB-Management/Get-JavaVersion.ps1
Line 110 in 0b53efa
And this:
ongdb/packaging/standalone/src/main/distribution/shell-scripts/bin/ongdb-shell
Line 99 in 182c231
Is not how you do a version check. You can't simply compare if a string is less than another and it'll magically understand the periods and the difference between "1.10" and "1.8" or "1.1". What it does mean is ongdb has most likely not been tested, as released, with an different JDK than 1.8.
I know you expect to support all the common JDKs:
ongdb/packaging/standalone/src/main/distribution/shell-scripts/bin/ongdb-shell
Line 105 in 182c231
You have no ongdb documentation and the project site (https://www.graphfoundation.org/ongdb/) doesn't provide documentation, installation or requirement guidance.
I've been using ongdb on Linux for a year now and I had to comment out the JDK check, but recently had to set it up on Windows and it has been a real pain.
JDK 1.17 would fail (obviously because it's not "1.8") and the service would not launch. The only way to know what the problem is (the JDK version issue) you have to manually run the ongdb batch with Verbose to get a clue:
C:\Program Files\ongdb\bin>ongdb.bat start -Verbose
So say I jumped back and installed OpenJDK 1.8. Still no luck. I dug in and tried manually running:
"C:\Program Files\ongdb\bin\tools\prunsrv-amd64.exe" "//RS//ongdb"
and it would silently fail.Nothing. I retried it with all the logs deleted:
Odd enough, the first hit for "Commons Daemon procrun failed with exit value: 4 (Failed to run service)" was against a Neo4j issue, that was related to but not conclusive, that the problem with JAVA path related.
I took a look at the Neo4j Github and it seems to have cleaned up the service scripts, and their install guidance cites JDK 1.17 so I assume it can be used.
The problem seems to be that I had to re-install the Windows service AFTER downgrading to the 1.8 JDK because it's embedded into the service call.
Seems like a problem waiting to happen if the admin upgrades to a newer version of Java, the old one will keep being used, not the new patched one. If I uninstalled the old version it would mean the ongdb service wouldn't run.
Expected behavior
I expect to know what the ongdb installation requirements are for Linux and Windows.
I expect to be able to install and use the product as a service on Linux and Windows.
This isn't too vague. Simply try installing with a JDK version newer than 1.8 and it will fail. Trying to track down ongdb installation requirements is impossible. Resorting to using old graphdb or neo4j docs is no longer safe for an administrator because the shell scrips are different now.
Actual behavior
The text was updated successfully, but these errors were encountered: