Tag Archives: glassfish

glassfish reset admin password

If you have forgotten the administrator user name, you can find it by inspecting the as-install/domains/domain-name/config/admin-keyfile file, where domain-name is the name of the domain. In the default domain, domain1, the file to inspect is as-install/domains/domain1/config/admin-keyfile. For a different domain, substitute its name in the path.

If you have forgotten the administrator password, one solution is to create a new domain with the admin username and password that you want, then copy the entry from the config/admin-keyfile file in that new domain to the other domain.

glassfish centos 6

mkdir /usr/java
cd /usr/java
tar -xzf jdk-7u5-linux-i586.tar.gz
vi ‘~/.bash_profile’

export JAVA_HOME=/usr/java/jdk1.7.0_05
export PATH=$JAVA_HOME/bin:$PATH

cd /opt
wget http://download.java.net/glassfish/3.1.2/release/glassfish-3.1.2.zip
unzip glassfish-3.1.2.zip

groupadd glassfish
useradd -s /bin/bash -g glassfish glassfish
chown -R glassfish: /opt/glassfish3/
passwd glassfish

Create a start/stop/restart script:

vi /etc/init.d/glassfish

#!/usr/bin/env bash
# description: Glassfish start/stop/restart
# processname: glassfish
# chkconfig: 2445 20 80
export JAVA_HOME
export PATH

case $1 in
su $GLASSFISH_USER -c "$GLASSFISH_HOME/bin/asadmin start-domain domain1"
su $GLASSFISH_USER -c "$GLASSFISH_HOME/bin/asadmin stop-domain domain1"
su $GLASSFISH_USER -c "$GLASSFISH_HOME/bin/asadmin stop-domain domain1"
su $GLASSFISH_USER -c "$GLASSFISH_HOME/bin/asadmin start-domain domain1"
exit 0

chmod +x /etc/init.d/glassfish

chkconfig --add glassfish
chkconfig glassfish on

/etc/init.d/glassfish start/stop/restart

GlassFish HTTP Status 500 – Internal Server Erro j_security_check no error logs

/etc/init.d/glassfish restart
Waiting for the domain to stop .
Command stop-domain executed successfully.
Waiting for domain1 to start ……….
Successfully started the domain : domain1
domain Location: /opt/glassfish4/glassfish/domains/domain1
Log File: /opt/glassfish4/glassfish/domains/domain1/logs/server.log
Admin Port: 4848
Command start-domain executed successfully.