I would like to achieve the same restart effect as clicking on the Restart button of the glassfish admin web gui (Server->General->Restart) on picture. But I would like to do it via command line
I have some strange behaviour of the app during undeploy. If I restart the server via GUI ant then do the : asadmin deploy asadmin undeploy
the app undeploys in a few seconds
But If I have the GF server as a windows service and do a restart of the service and after that : asadmin deploy asadmin undeploy
the app undeploys in 5 minutes.
So I would like to find the equivalent asadmin command for server restart as via web GUI.
I have already tried:
asadmin restart-domain --force=false domain1
asadmin restart-domain --force=true domain1
asadmin stop-domain domain1
asadmin start-domain domain1
but no luck
Here's the script we use:
echo "Stopping the server"
INSTANCES=`asadmin list-instances | grep -v "Command" | cut -d' ' -f1`
for INSTANCE in $INSTANCES; do
asadmin stop-instance $INSTANCE
done
asadmin stop-domain $DOMAIN
echo "Starting the server"
asadmin start-domain
INSTANCES=`asadmin list-instances | grep -v "Command" | cut -d' ' -f1`
for INSTANCE in $INSTANCES; do
asadmin start-instance $INSTANCE
done
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.