Skip to content

Fix create-domain with a custom master password (Backport 7.x)#26087

Open
OndroMih wants to merge 4 commits into
eclipse-ee4j:7.xfrom
OndroMih:ondromih-2026-06-port-25883-7.1
Open

Fix create-domain with a custom master password (Backport 7.x)#26087
OndroMih wants to merge 4 commits into
eclipse-ee4j:7.xfrom
OndroMih:ondromih-2026-06-port-25883-7.1

Conversation

@OndroMih

@OndroMih OndroMih commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Backport of #26042 to branch 7.x.

/cc @dmatej

OndroMih and others added 4 commits June 13, 2026 17:13
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>
@OndroMih OndroMih added this to the 7.1.1 milestone Jun 13, 2026
@OndroMih OndroMih changed the title Backport issue #25883 to 7.x (7.1) Fix of Command create-domain --savemasterpassword=true failed (Backport 7.x) Jun 13, 2026
@OndroMih OndroMih changed the title Fix of Command create-domain --savemasterpassword=true failed (Backport 7.x) Fix create-domain with a custom master password (Backport 7.x) Jun 13, 2026
@OndroMih OndroMih requested a review from dmatej June 13, 2026 18:09
@OndroMih OndroMih mentioned this pull request Jun 13, 2026
35 tasks
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.

2 participants