GlassFish 3.1.2 - My remote admin doesn't work. What the hell ?
By Jonathan Lermitage on Wednesday 29 February 2012, 19:25 - Java EE / Web - Permalink
GlassFish Server 3.1.2 has just been released. If you already have installed it, you probably tried to connect to the administration page from an other computer (in my case, GlassFish is installed on a dedicated server).
If you don't have modified security configuration, you must face a problem : you cannot login to GlassFish administration page, and it shows a message like Secure Admin must be enabled to access the DAS remotely
.
This kind of security rule is not new, but GlassFish 3.1.2 now enables it by default : you have to enable Secure Admin first to login remotely.
To activate Secure Admin, you only have to :
- start GlassFish.
- go to the "bin" directory of your GlassFish installation.
- run the "asadmin enable-secure-admin" command. You will have to type admin username and password.
- restart GlassFish.
- you can now go to the GlassFish administration page remotely (
http://YourServerAddress:4848/
). Note that you will be automatically redirected to the secured admin pagehttps://YourServerAddress:4848/
. You can log in.
Nota : I have noticed that Secure Admin doesn't work if you have changed the default admin port (4848). To use an other admin port, you may have to make some additional configurations.
Comments
Thanks! I strumbled into this today, as I upgraded from Glassfish 3.0. Regarding the port, it works fine using a port different from the default one (4848). You just have to add the option "--port <port number>" when calling asadmin.
(*) Are you sure about the restart? Everytime I have to restart Glassfish, I need to re-run these commands.
(*) This sucks. We have cron restarting Glassfish nightly to deal with memory leaks. If it now needs a username and password to restart...
Marco Aurélio,
thanks for the tip ! I'll update the post asap.
Eric,
I'm not sure that GlassFish's restart is needed. Actually, I always use the script when GlassFish is off.
Have you found a solution ? I'll try to exam the problem.
PS : sorry for the absence, I was too much taken by other projects.
Thanks a lot for the tip!
Example of Running enable-secure-admin
The following example shows how to enable secure admin for a domain using the default admin alias and the default instance alias. You must restart the DAS immediately after enabling secure admin.
Note - The only indicator that secure admin is enabled is the successful status from the enable-secure-admin subcommand. When secure admin is running, the DAS and instances do not report the secure admin status.
asadmin> enable-secure-admin
Command enable-secure-admin executed successfully.
The following example shows how to enable secure admin for a domain using an admin alias adtest and an instance alias intest. You can also use this command to modify an existing secure admin configuration to use different aliases.
asadmin> enable-secure-admin --adminalias adtest --instancealias intest
The following example shows how to disable secure admin:
asadmin> disable-secure-admin
Command disable-secure-admin executed successfully.
You can use the following command to see the current state of secure admin in a domain:
asadmin> get secure-admin.enabled