我已经成功在ubuntu 16.04上设置了jenkins,没有出现如下情况:
docker run -p 8080:8080 --name=jenkins-master jenkins/jenkins
但是,当我尝试使用以下命令在docker swarm中设置jenkins时:
docker service create --name jenkins -p 8080:8080 jenkins/jenkins:lts-alpine
容器和图像已创建,但是当我进入服务日志时,它具有以下错误:
INFO: Jenkins is fully up and running
Mar 26, 2019 1:01:09 PM javax.jmdns.impl.HostInfo newHostInfo
WARNING: Could not intialize the host network interface on nullbecause of an error: fc27ff0bc486: fc27ff0bc486: Name does not resolve
java.net.UnknownHostException: fc27ff0bc486: fc27ff0bc486: Name does not resolve
at java.net.InetAddress.getLocalHost(InetAddress.java:1506)
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 jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.UnknownHostException: fc27ff0bc486: Name does not resolve
at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1324)
at java.net.InetAddress.getLocalHost(InetAddress.java:1501)
... 10 more
答案 0 :(得分:0)
我的解决方案是以下之一: 1.删除/etc/resolv.conf中的“搜索”,然后再次运行jenkins服务。 2.在詹金斯CMD中配置该选项。 -Dhudson.DNSMultiCast.disabled = true -Dhudson.udp = -1