Tuesday, February 4, 2014

Glassfish: Secure Admin must be enabled to access the DAS remotely

Some times ago I wrote article about installation of Glassfish server 3.1.x on Debian.or Ubuntu. You can find this article here.

But in the fresh installation you can't run administration console from remote IP. If you try this, you will see an message: "Secure Admin must be enabled to access the DAS remotely".

To activate Secure Admin, you have to:
  • start Glassfish server
  • go to you Glassfish installation bin folder, by example: /home/glassfish/glassfish3/bin
  • run asadmin enable-secure-admin
But. In the fresh installation, you will see here next error message:  "remote failure: At least one admin user has an empty password, which secure admin does not permit. Use the change-admin-password command or the admin console to create non-empty passwords for admin accounts."

So you first need to run: asadmin change-admin-password and put the new password.
Then you can safely use the command again: asadmin enable-secure-admin

To complete the described procedure you need to restart the Glassfish server. Finally after this operation you can run Glassfish console. Usually, if you have not changed the default ports, the console is available at: https://your_flassfish_server_ip:4848 .