gpt4 book ai didi

linux - jenkins.war 停止错误 “Name or service not known”

转载 作者:太空宇宙 更新时间:2023-11-04 12:03:09 32 4
gpt4 key购买 nike

我有一个在 linux 中运行的 jenkins 服务(没有 docker),有时服务没有响应当我执行“service --status-all”命令时,show .war is stop在 Jenkins 日志中显示此消息

WARNING: Could not intialize the host network interface on nullbecause of an error: myserver: myserver: Name or service not known
java.net.UnknownHostException: myserver: myserver: Name or service not known
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 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: myserver: Name or service not known
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)

如果我重启服务运行正常但是这个问题很不方便

最佳答案

将您的主机名 添加到/etc/hosts 可能会有所帮助。

关于linux - jenkins.war 停止错误 “Name or service not known”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51660064/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com