Stop Neo4j dying on a modern host kernel - #79
Merged
Merged
Conversation
The pinned graphdb:Release97 image ships JDK 11.0.16, whose container-metrics probe cannot read cgroup v2 as newer kernels lay it out. It throws a NullPointerException from CgroupV2Subsystem.getInstance, inside a static initialiser, so Neo4j dies with ExceptionInInitializerError before it starts and the container sits in a restart loop. Nothing in the logs names a cause a reader would connect to the host kernel. Disabling container support skips exactly that probe. The heap is pinned on the line above, so container-aware sizing was only ever going to compute a number we already override — there is nothing to lose and it is inert on older kernels. Verified on the running JVM rather than assumed: /usr/local/openjdk-11/bin/java ... -XX:-UseContainerSupport No image change: the tag is untouched and this is a runtime setting, which Neo4j's entrypoint maps from NEO4J_* into dbms.jvm.additional in neo4j.conf. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Symptom
reactome-neo4jsits in a restart loop and never comes up:Cause
The pinned
graphdb:Release97image ships JDK 11.0.16, whose container-metrics probe cannot read cgroup v2 as newer kernels lay it out. The NPE happens inside a static initialiser, so it surfaces asExceptionInInitializerErrorbefore Neo4j starts. Nothing in the log names a cause a reader would connect to a host kernel upgrade — this one cost a while to find.Fix
One environment entry.
-XX:-UseContainerSupportskips exactly that probe.The heap is pinned on the line above (
NEO4J_dbms_memory_heap_maxSize=8g), so container-aware sizing was only ever going to compute a number we already override. Nothing is lost, and the flag is inert on kernels where the probe works.No image change. The tag is untouched; this is a runtime setting that Neo4j's entrypoint maps from
NEO4J_*intodbms.jvm.additionalinneo4j.conf.Verified, not assumed
On the running JVM:
and in the container's config:
Neo4j then logs
Started.with Bolt on 7687, and a real query against Release97 returns data.Note
The same host upgrade removed Python 3.12 (only 3.14 remains), so
poetry installcannot buildscipy 1.15.3locally. CI runs 3.10–3.12 and is unaffected. Not addressed here.🤖 Generated with Claude Code