Skip to content

[server] Validate Java version >= 11 in config.sh to prevent silent startup failures#3197

Open
matrixsparse wants to merge 3 commits intoapache:mainfrom
matrixsparse:feature/issue-3192-java-home-validation
Open

[server] Validate Java version >= 11 in config.sh to prevent silent startup failures#3197
matrixsparse wants to merge 3 commits intoapache:mainfrom
matrixsparse:feature/issue-3192-java-home-validation

Conversation

@matrixsparse
Copy link
Copy Markdown
Contributor

Summary

  • Add is_jdk_version_ge_11() function in config.sh to validate Java version
  • Insert version check after JAVA_RUN resolution, before any process startup
  • When Java < 11, print clear error message and exit with code 1

Test Plan

  • bash -n syntax check passes on config.sh, coordinator-server.sh, tablet-server.sh, local-cluster.sh
  • Integration test: Java 17 correctly passes version check; simulated Java 8 correctly blocked with error message

Fixes #3192

@matrixsparse
Copy link
Copy Markdown
Contributor Author

Fixes #3192

@luoyuxia @Yohahaha PTAL, thanks!

Copy link
Copy Markdown
Contributor

@Yohahaha Yohahaha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall LGTM! thank you, I will verify this fix locally next week.

@matrixsparse
Copy link
Copy Markdown
Contributor Author

matrixsparse commented Apr 25, 2026

Thanks for the review!

@Yohahaha
Copy link
Copy Markdown
Contributor

@matrixsparse thank you for the fix, I have verified this fix works for me.

one minor comments, we already have is_jdk_version_ge_17 func in config.sh, should we merge these into one? cc @luoyuxia

@matrixsparse
Copy link
Copy Markdown
Contributor Author

@Yohahaha Thanks for the review! I've merged is_jdk_version_ge_11 and is_jdk_version_ge_17 into a single parameterized function is_jdk_version_ge(). PTAL again, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[server] local-cluster.sh starts successfully but processes fail silently when JAVA_HOME is misconfigured

2 participants