Ifthe “interact with desktop” option is not set, the service stays in a “start-pending” state
andappears to hang. Kill the service process to recover from this state.
OnWindows or UNIX, create a domain using the --savemasterpassword=true option and
createa password le to store the admin password. When starting the component, use the
--passwordfileoption to point to the le that contains the password.
Forexample:
1. Createdomain with a saved master password. In this syntax, you are prompted for the
administrationpassword and master password:
asadmin create-domain --adminport 4848 --adminuser admin
--savemasterpassword=true --instanceport 8080 domain1
2. OnWindows, create a service using a password le to populate the admin password:
C:\windows\system32\sc.exe create domain1 binPath=
"C:\Sun\AppServer\lib\appservService.exe \"C:\Sun\AppServer\bin\asadmin.bat
start-domain --user admin
--passwordfile C:\Sun\AppServer\password.txt domain1\"
\"C:\Sun\AppServer\bin\asadmin.bat stop-domain domain1\"" start= auto
DisplayName= "SunJavaSystemAppServer DOMAIN1"
Thepath to the password le password.txt is C:\Sun\AppServer\password.txt.It
containsthe password in the following format
AS_ADMIN_password=password
Forexample, for a password adminadmin:
AS_ADMIN_password=adminadmin
3. OnUNIX, use the --passwordfile option in the line you add to the inittab le:
das:3:respawn:/opt/SUNWappserver/bin/asadmin start-domain --user admin
--passwordfile /opt/SUNWappserver/password.txt domain1
Thepath to the password le password.txt is /opt/SUNWappserver/password.txt.It
containsthe password in the following format
AS_ADMIN_password=password
Forexample, for a password adminadmin:
AS_ADMIN_password=adminadmin
Securityfor AutomaticRestar ts
SunGlassFishEnterprise Ser ver2.1 Administration Guide • December 2008226