Category Archives: Glassfish Server

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

Overview

Firstly, I only install the new Glassfish 3.1.2 only in my laptop and access the administration module locally by using “localhost:4048”. When I install it on the development server and try to access it remotely, by using “http:/my_host:port”. It shows me an error as cannot login with the message as

Secure Admin must be enabled to access the DAS remotely.

The Investigation

I’ve found the nice solution form stack overflow here.

The solution

It’s simple by activate the secure admin by using the following command line: –

asadmin --host [host] --port [port] enable-secure-admin

The host is the host name or IP address for the Glassfish Server which we need to enable the secure admin.

The port is the target Glassfish Server port which wee need to enable the secure admin.

Caution

Please take a big note as the following: –

  1. The target Glassfish Server which is the port owner is started before executing the above command.
  2. After executing, the target Glassfish Server need to be restarted for taking effect.

Rollback

If we would like to disable the secure admin, it can be done easily as the following: –

asadmin --host [host] --port [port] disable-secure-admin