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 asSecure 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: -
1
| 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: -- The target Glassfish Server which is the port owner is started before executing the above command.
- 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: -
1
| asadmin --host [host] --port [port] disable-secure-admin |
------------------------------------------------- To Change the Administration PasswordUse the change-admin-password subcommand in remote mode to change the administration password. The default administration password is admin. You are prompted for the old and new admin passwords, with confirmation.Note – If you accepted the default admin user with no password during zip installation, you can add a password to this user. If there is a single user called admin that does not have a password, you are not prompted for login information. Any other situation requires login. Encrypting the admin password is strongly encouraged. Before You BeginIf you want to change the admin password before creating an alias for the password (encrypting), you can use the set subcommand with syntax similar to the following:
Example 11–2 Changing the Admin PasswordThis example changes the admin password for user anonymous from adminadmin to newadmin:
To Restart a DomainUse the restart-domain subcommand in remote mode to restart the Domain Administration Server (DAS) of the specified host. When restarting a domain, the DAS stops accepting new connections and then waits for all outstanding connections to complete. This shutdown process takes a few seconds. Until the domain has restarted, the Administration Console and most of the asadmin subcommands cannot be used.This subcommand is particularly useful for environments where the server machine is secured and difficult to get to. With the right credentials, you can restart the server from a remote location as well as from the same machine. If the server will not restart, use the stop-domain(1) subcommand followed by the start-domain(1) subcommand.
Example 3–8 Restarting a Domain (or Server)This example restarts mydoimain4 in the default directory.
Example 3–9 Restarting a Domain in a BrowserThis example invokes the restart-domain subcommand in a browser.
Last but not least: the configure information of a domain is located in the file ${GF INSTALL DIR}/domains/domain1/config/domain.xml |
No comments:
Post a Comment