I get the following error
remote failure: NCLS-SECURITY-05200 : org.jvnet.hk2.config.TransactionFailure: java.lang.RuntimeException: java.lang.IllegalArgumentException: Could not find the alias s1as in the key store
java.lang.RuntimeException: java.lang.IllegalArgumentException: Could not find the alias s1as in the key store
when I run
[root@mail config]# /opt/glassfish6/glassfish/bin/asadmin --host mydomain.com --port 4848 enable-secure-admin
I was trying to install Let's Encrypt certificates on Glassfish following this answer on StackExchange: https://stackoverflow.com/questions/40069423/glassfish-ssl-installation-with-certbot (Answer 0). So I ran this command:
[root@mail config]# keytool -changealias -alias "s1as" -destalias "s1as_new" -keypass password -keystore keystore.jks -storepass password
which I now realize I should not have, before proceeding with the rest of the answer. Now even if I reverse the aliases to change the keystore alias back, it gives me the same error.
So I tried changing every instance of "s1as" in the domain.xml file to "s1as_new", but that didn't work either.
Please help. What do I do?