11-Nov-2016 06:01:33.229 WARNING [Computer.threadPoolForRemoting [#1]] null.null Could not intialize the host network interface on nullbecause of an error: myserver: myserver: unknown error
java.net.UnknownHostException: myserver: myserver: unknown error
at java.net.InetAddress.getLocalHost(InetAddress.java:1505)
at javax.jmdns.impl.HostInfo.newHostInfo(HostInfo.java:75)
at javax.jmdns.impl.JmDNSImpl.<init>(JmDNSImpl.java:407)
at javax.jmdns.JmDNS.create(JmDNS.java:60)
at hudson.DNSMultiCast$1.call(DNSMultiCast.java:33)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.UnknownHostException: myserver: unknown error
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
at java.net.InetAddress.getLocalHost(InetAddress.java:1500)
... 9 more
在Linux Tomcat下启动Jekins的时候报以上的错误,究其原因是因为服务器配置了自定义的host name 没有在hosts文件中定义.
解决方法如下:
1. 查看自己服务器的host name
# hostname
2. 进入etc/hosts 编辑,在下面加一行:
127.0.0.1 你的hostname
3. 保存退出,重启tomcat.解决
|