Check multiple urls to ensure glassfish is up and add a wait after the check. This attempts to ensure that the admin console is correctly initialized prior to accessing it in other resources.