I have just retried this with the same setup which rherschke described. Naturally, it works fine for me.
I was able to get something close - but not exactly the same - as the failure people are describing here by doing the following:
1. I was connected to Oracle's internal network using VPN; Safari was open and I had visited various sites.
2. I installed GlassFish 3.1.2 b23.
3. asadmin start-domain
4. asadmin change-admin-password (this is required or GlassFish rejects the next step).
5. asadmin enable-secure-admin
6. asadmin stop-domain
7. asadmin start-domain
8. Use Safari to connect to https://localhost:4848. Worked.
9. Use Safari to connect to https://192.168.2.102:4848. Worked.
10. Use Safari to connect to https://host-assigned-by-vpn:4848. Worked.
11. Disconnect from VPN. I did not restart GlassFish or Safari.
12. Use Safari to connect to https://192.168.2.102:4848. Worked.
13. Run uname -n to get the current host name.
14. Use Safari to connect to https://output-from-uname-minus-n:4848. It took a VERY long time but it eventually worked.
15. Restart Safari.
16. Repeat 14. Worked immediately.
I have auto-proxy discovery set in networking.
I believe it is well-known (if not well-loved) behavior of Safari that going on or off VPN causes delays like what I described in step 14, and I have seen this trying to connect to other web sites. Restarting Safari clears that up.
I can believe that, depending on exactly what goes on inside Safari and the network stack during step 14, I might have received a timeout instead of a slow response if it took a little longer.
Those of you who have seen this problem: Could there be something related to networking on your Macs that might be contributing to this? Going on or off VPN, or moving from one network to another?
Please report what sort of name you are specifying for the host. We don't need to know the exact name; it just might help to know whether you are using numerical addresses, whether they are 192.168.x.y or "real" numeric addresses, "localhost," some other host name. Also please check your /etc/hosts file.