qq_21940627
zhallalxj
2019-03-26 15:51

rpm安装jenkins启动后报错 UnknownHostException: centos68-192-168-18-4: Name or service not known

10
  • linux
  • centos
  1. jenkins 版本 jenkins-2.164.1-1.1.noarch.rpm
  2. rpm安装方式安装成功后通过service jenkins start启动报错
  3. hostname和/etc/hosts都已修改centos68
[root@centos68 work]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 centos68
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
127.0.0.1 centos68
127.0.0.1 centos68-192-168-18-4
192.168.18.4 centos68

  1. 错误:
[root@centos68 jenkins]# tail -200f /var/log/jenkins/jenkins.log 
Running from: /usr/lib/jenkins/jenkins.war
webroot: $user.home/.jenkins
Mar 26, 2019 2:58:18 PM org.eclipse.jetty.util.log.Log initialized
INFO: Logging initialized @428ms to org.eclipse.jetty.util.log.JavaUtilLog
Mar 26, 2019 2:58:18 PM winstone.Logger logInternal
INFO: Beginning extraction from war file
Mar 26, 2019 2:58:18 PM org.eclipse.jetty.server.Server doStart
INFO: jetty-9.4.z-SNAPSHOT; built: 2018-08-30T13:59:14.071Z; git: 27208684755d94a92186989f695db2d7b21ebc51; jvm 11.0.1+13-LTS
Mar 26, 2019 2:58:18 PM org.eclipse.jetty.webapp.StandardDescriptorProcessor visitServlet
INFO: NO JSP Support for /jenkins, did not find org.eclipse.jetty.jsp.JettyJspServlet
Mar 26, 2019 2:58:18 PM org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: DefaultSessionIdManager workerName=node0
Mar 26, 2019 2:58:18 PM org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: No SessionScavenger set, using defaults
Mar 26, 2019 2:58:18 PM org.eclipse.jetty.server.session.HouseKeeper startScavenging
INFO: node0 Scavenging every 660000ms
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/root/.jenkins/war/WEB-INF/lib/xstream-1.4.7-jenkins-1.jar) to field java.util.TreeMap.comparator
WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Jenkins home directory: /root/.jenkins found at: $user.home/.jenkins
Mar 26, 2019 2:58:19 PM org.eclipse.jetty.server.handler.ContextHandler doStart
INFO: Started w.@66b72664{Jenkins v2.164.1,/jenkins,file:///root/.jenkins/war/,AVAILABLE}{/root/.jenkins/war}
Mar 26, 2019 2:58:19 PM org.eclipse.jetty.server.AbstractConnector doStart
INFO: Started ServerConnector@76b0ae1b{HTTP/1.1,[http/1.1]}{0.0.0.0:2155}
Mar 26, 2019 2:58:19 PM org.eclipse.jetty.server.Server doStart
INFO: Started @1369ms
Mar 26, 2019 2:58:19 PM winstone.Logger logInternal
INFO: Winstone Servlet Engine v4.0 running: controlPort=disabled
Mar 26, 2019 2:58:19 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
Mar 26, 2019 2:58:19 PM hudson.PluginManager loadDetachedPlugins
INFO: Upgrading Jenkins. The last running version was 2.150.1. This Jenkins is version 2.164.1.
Mar 26, 2019 2:58:19 PM hudson.PluginManager loadDetachedPlugins
INFO: Upgraded Jenkins from version 2.150.1 to version 2.164.1. Loaded detached plugins (and dependencies): [jaxb.hpi]
Mar 26, 2019 2:58:19 PM jenkins.InitReactorRunner$1 onAttained
INFO: Listed all plugins
Mar 26, 2019 2:58:20 PM jenkins.InitReactorRunner$1 onAttained
INFO: Prepared all plugins
Mar 26, 2019 2:58:20 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started all plugins
Mar 26, 2019 2:58:20 PM jenkins.InitReactorRunner$1 onAttained
INFO: Augmented all extensions
Mar 26, 2019 2:58:20 PM jenkins.InitReactorRunner$1 onAttained
INFO: Loaded all jobs
Mar 26, 2019 2:58:20 PM hudson.model.AsyncPeriodicWork$1 run
INFO: Started Download metadata
Mar 26, 2019 2:58:20 PM hudson.model.AsyncPeriodicWork$1 run
INFO: Finished Download metadata. 3 ms
Mar 26, 2019 2:58:21 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@3bf691fa: display name [Root WebApplicationContext]; startup date [Tue Mar 26 14:58:21 CST 2019]; root of context hierarchy
Mar 26, 2019 2:58:21 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@3bf691fa]: org.springframework.beans.factory.support.DefaultListableBeanFactory@6a2e76fa
Mar 26, 2019 2:58:21 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@6a2e76fa: defining beans [authenticationManager]; root of factory hierarchy
Mar 26, 2019 2:58:21 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@101e1204: display name [Root WebApplicationContext]; startup date [Tue Mar 26 14:58:21 CST 2019]; root of context hierarchy
Mar 26, 2019 2:58:21 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@101e1204]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1a7623e2
Mar 26, 2019 2:58:21 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1a7623e2: defining beans [filter,legacy]; root of factory hierarchy
Mar 26, 2019 2:58:21 PM jenkins.InitReactorRunner$1 onAttained
INFO: Completed initialization
Mar 26, 2019 2:58:21 PM hudson.WebAppMain$3 run
INFO: Jenkins is fully up and running
Mar 26, 2019 2:58:21 PM javax.jmdns.impl.HostInfo newHostInfo
WARNING: Could not intialize the host network interface on nullbecause of an error: centos68-192-168-18-4: centos68-192-168-18-4: Name or service not known
java.net.UnknownHostException: centos68-192-168-18-4: centos68-192-168-18-4: Name or service not known
        at java.base/java.net.InetAddress.getLocalHost(InetAddress.java:1642)
        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.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.net.UnknownHostException: centos68-192-168-18-4: Name or service not known
        at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
        at java.base/java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:929)
        at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1515)
        at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:848)
        at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1505)
        at java.base/java.net.InetAddress.getLocalHost(InetAddress.java:1637)
        ... 10 more



  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答