Fix create-domain with a custom master password#26042
Merged
dmatej merged 4 commits intoJun 3, 2026
Merged
Conversation
Contributor
Author
|
Moving to draft because @dmatej will raise a new PR which also fixes this. I will then rebase this PR. |
57cd1b1 to
120e09c
Compare
dmatej
reviewed
May 28, 2026
dmatej
left a comment
Contributor
There was a problem hiding this comment.
It looks well, funny is that you fixed completely different thing than me, so I will just add my commit to your PR and resolve conflicts. Most of the #26037 is about host names, just the first commit was related to the master password, then I noticed that some things related smell and started learning OS specific behaviors, combinations of domain name resolution ... and following problems caused by NetUtils decisions made based on unexpected situations.
The problem was that the command expected the truststore file exists when setting a custom password. The fix is to set the password only if the truststore file exists (e.g. is part of the domain template), otherwise rely on creating the truststore when copying certificates from the keystore. I also fixed the case, when the provided password is too short. Keytool exists with 0 in that case and GlassFish failed later because the keystore wasn't created, without reporting any error about the password. Now the output contains an error message from keytool, such as: Invalid password, try again with a different password.( KeyTool command failed with exit code: 0 and output: Enter keystore password: Keystore password is too short - must be at least 6 characters Enter keystore password: Keystore password is too short - must be at least 6 characters Enter keystore password: Keystore password is too short - must be at least 6 characters Too many failures - try later )
- changeit is default JDK password for keystores Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
120e09c to
4857d04
Compare
dmatej
approved these changes
Jun 3, 2026
This was referenced Jun 13, 2026
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.
The problem was that the command expected the truststore file exists when setting a custom password. The fix is to set the password only if the truststore file exists (e.g. is part of the domain template), otherwise rely on creating the truststore when copying certificates from the keystore.
I also fixed the case, when the provided password is too short. Keytool exists with 0 in that case and GlassFish failed later because the keystore wasn't created, without reporting any error about the password. Now the output contains an error message from keytool, such as:
Invalid password, try again with a different password.( KeyTool command failed with exit code: 0 and output: Enter keystore password: Keystore password is too short - must be at least 6 characters Enter keystore password: Keystore password is too short - must be at least 6 characters Enter keystore password: Keystore password is too short - must be at least 6 characters Too many failures - try later
)