Skip to content

Fix the JDK checks on startup please, and Windows won't start at all #95

@duhmojo

Description

@duhmojo

Guidelines

ongdb 1.0.4
Windows Server 2002
AlmaLinux 8.5

Hi all.

This:

And this:

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:

if ! ("${version_command[@]}" 2>&1 | egrep -q "(Java HotSpot\\(TM\\)|OpenJDK|IBM) (64-Bit Server|Server|Client|J9) VM"); then

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.

C:\Program Files\ongdb\bin>"C:\Program Files\ongdb\bin\tools\prunsrv-amd64.exe" "//ES//ongdb"

Nothing. I retried it with all the logs deleted:

[2023-02-14 23:26:36] [info]  [ 7428] Commons Daemon procrun (1.0.15.0 64-bit) started
[2023-02-14 23:26:36] [info]  [ 7428] Running 'ongdb' Service...
[2023-02-14 23:26:36] [error] [ 7428] StartServiceCtrlDispatcher for 'ongdb' failed
[2023-02-14 23:26:36] [error] [ 7428] The service process could not connect to the service controller.
[2023-02-14 23:26:36] [error] [ 7428] Commons Daemon procrun failed with exit value: 4 (Failed to run service)
[2023-02-14 23:26:36] [error] [ 7428] The service process could not connect to the service controller.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions