The glassfish administraion console requires that you reach it from localhost, which I believe is for safety reasons. However, this is not possible if you want to reach the administraion console on a headless server without a X Server. You could use a text only browser like lynx to navigate the admin console, which would work, but the console is not built for this senario, and it would be much easier to just use asadmin for everything instead.
First you must set the admin password, since it is now required, unlike when using the console from localhost. This is done use this command:
asadmin change-admin-password
Depending on which glassfish version, the default admin password is one of the following:
- “adminadmin”
- “changeit”
- no password
It is also adviserable to set the master password for security reasons, which is done using this command:
asadmin change-master-password
When the password has been set, all you need to do is enable the secure admin console, which is not enabled by default:
asadmin enable-secure-admin
Then after a restart of the glassfish server, you should be able to access the admin console remotely.