启动Glassfish AS会告诉我端口4848被阻塞(或我配置的任何端口).但是没有使用检查端口.没有防火墙.
root@ubuntu:~/glassfishv3/glassfish/bin# netstat -tlunp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2149/sshd tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2441/cupsd tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN 2075/postgres tcp6 0 0 :::22 :::* LISTEN 2149/sshd tcp6 0 0 :::5432 :::* LISTEN 2075/postgres udp 0 0 0.0.0.0:68 0.0.0.0:* 2082/dhclient3 udp 0 0 0.0.0.0:39256 0.0.0.0:* 2413/avahi-daemon: udp 0 0 0.0.0.0:5353 0.0.0.0:* 2413/avahi-daemon:
Ubuntu 9.04 Linux ubuntu 2.6.28-11-generic#42-Ubuntu SMP Fri Apr 17 01:58:03 UTC 2009 x86_64 GNU / Linux(它是一个虚拟服务器hough).
不太确定如何解决这个问题.
解决方法
缺少etc / hosts文件!
java.net.UnknownHostException: ubuntu: ubuntu at java.net.InetAddress.getLocalHost(InetAddress.java:1353) at com.sun.enterprise.util.net.NetUtils.getCanonicalHostName
原因很简单,有时候不应该寻找复杂的问题!