For my sake try the following once :
Make sure the domain is running before you run the script, you can check this by following command:
netstat -na | grep 4849
if you get a +ve result that means domain is up.
restartgf.bat:
@echo on
echo stop domain (in same cmd)....
call D:\dev\3rdparty\glassfish-v2ur2\glassfish\bin\asadmin.bat stop-domain
echo wait ...
rem wait 60sec
echo starting in 4 mins...
rem wait 60sec
echo starting in 3 mins...
rem wait 60sec
echo starting in 2 mins...
rem wait 60sec
echo starting in 1 min...
rem wait 60sec
echo starting now...
@ping 127.0.0.1 -n 2 -w 1000
@ping 127.0.0.1 -n 30 -w 1000
call D:\dev\3rdparty\glassfish-v2ur2\glassfish\bin\asadmin.bat start-domain
exit
Now call restartgf.bat and let me know what happens. I have intentionally introduces the 5 mins wait period.
[Message sent by forum member 'anzy' (anzy)]
http://forums.java.net/jive/thread.jspa?messageID=300099