FYI, that didn't work for me.
Am running Debian Squeeze on new laptop and had same problem bringing up GlassFish.
Realized the problem was i had no internet access via java, i.e. was back to an earlier problem with ipv6 which was introduced during an update sometime back in Jan 2010. There is now an ipv6-only switch in netbase that is set in [b]/etc/sysctl.d/bindv6only.conf.[/b]
need to update this file and change net.ipv6.bindv6only from 1 to 0, then restart the network. after that, Glassfish started fine.
read about it here in its entirety
http://www.eclipse.org/forums/index.php?t=msg&goto=505058&#msg_505058
[Message sent by forum member 'cyanide_bunny']
http://forums.java.net/jive/thread.jspa?messageID=397701