java.net.UnknownHostException(java.net.UnknownHostException)
问题描述
我正在使用 jdk1.6.0_23 安装 CSVN,但出现以下 Java 错误:
I'm installing CSVN using jdk1.6.0_23 and I'm getting the following Java error:
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 下面的 hosts 文件中添加了一个条目,其中包含以下内容:
My server has 3 NICs (eth0, eth1 and eth2). I've added an entry to the hosts file bellow localhost containing the following:
127.0.0.1 vkqgae01
我可以成功ping vkqgae01,但是nslookup无法解析.
I can successfully ping vkqgae01, but nslookup cannot resolve it.
有什么想法吗?
推荐答案
那个和
主机名
和
/etc/hosts
如果/etc/hosts 不包含主机名的定义,它会失败.只需将您的主机名添加到/etc/host 例如,如果您的主机名是工作添加或修改以下行:
If /etc/hosts doesn't containt the definition of the hostname it fails. Just add your hostname to /etc/host for example if your hostname is work add or modified the following line:
127.0.0.1 work localhost
这篇关于java.net.UnknownHostException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:java.net.UnknownHostException
基础教程推荐
- 在 Java 中创建日期的正确方法是什么? 2022-01-01
- 如何在 JFrame 中覆盖 windowsClosing 事件 2022-01-01
- 大摇大摆的枚举 2022-01-01
- 不推荐使用 Api 注释的描述 2022-01-01
- 如何在 Spring @Value 注解中正确指定默认值? 2022-01-01
- 验证是否调用了所有 getter 方法 2022-01-01
- Java Swing计时器未清除 2022-01-01
- 从 python 访问 JVM 2022-01-01
- Java 实例变量在两个语句中声明和初始化 2022-01-01
- 多个组件的复杂布局 2022-01-01
