我正在使用jdk1.6.0_23安装CSVN,并且遇到以下Java错误:
2011-02-10 16:25:50,951 [WrapperJarAppMain] WARN util.GrailsUtil - [WARNING] Property [ldapServerPort] of domain class com.collabnet.svnedge.console.Server has type [int] and doesn't support constraint [nullable]. This constraint will not be checked during validation.
2011-02-10 16:25:51,117 [WrapperJarAppMain] ERROR ehcache.Cache - Unable to set localhost. This prevents creation of a GUID. Cause was: vkqgae01: vkqgae01
java.net.UnknownHostException: vkqgae01: vkqgae01
at java.net.InetAddress.getLocalHost(InetAddress.java:1354)
at net.sf.ehcache.Cache.<clinit>(Cache.java:143)
我的服务器有3个NIC(
eth0
,eth1
和eth2
)。我已经在主机文件以下的localhost中添加了一个条目,其中包含以下内容:127.0.0.1 vkqgae01
我可以成功
ping vkqgae01
,但是nslookup
无法解决它。有任何想法吗?
最佳答案
这与
和
如果/etc/hosts不包含主机名的定义,则它将失败。只需将您的主机名添加到/etc/host即可,例如,如果您的主机名是work,请添加或修改以下行:
127.0.0.1 work localhost
关于java - java.net.UnknownHostException,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/4969156/