美文网首页
记录一个jenkins容器突然无法访问的问题

记录一个jenkins容器突然无法访问的问题

作者: 装完逼立马跑 | 来源:发表于2019-06-11 11:20 被阅读0次

这几天因为服务器路由出了问题,所以一直没有网络,后来老板让我给服务器换一个网络配置。
换完之后,我又莫名其妙的重启了一下jenkins容器,
然后就崩了...
一直无法连接...
再次重启jenkins,查看日志

Jun 11, 2019 2:57:44 AM winstone.Logger logInternal
INFO: JVM is terminating. Shutting down Jetty
Running from: /usr/share/jenkins/jenkins.war
webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")
Jun 11, 2019 2:58:11 AM org.eclipse.jetty.util.log.Log initialized
INFO: Logging initialized @293ms to org.eclipse.jetty.util.log.JavaUtilLog
Jun 11, 2019 2:58:11 AM winstone.Logger logInternal
INFO: Beginning extraction from war file
Jun 11, 2019 2:58:11 AM org.eclipse.jetty.server.handler.ContextHandler setContextPath
WARNING: Empty contextPath
Jun 11, 2019 2:58:11 AM org.eclipse.jetty.server.Server doStart
INFO: jetty-9.4.z-SNAPSHOT; built: 2018-08-30T13:59:14.071Z; git: 27208684755d94a92186989f695db2d7b21ebc51; jvm 1.8.0_181-8u181-b13-2~deb9u1-b13
Jun 11, 2019 2:58:11 AM org.eclipse.jetty.webapp.StandardDescriptorProcessor visitServlet
INFO: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
Jun 11, 2019 2:58:11 AM org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: DefaultSessionIdManager workerName=node0
Jun 11, 2019 2:58:11 AM org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: No SessionScavenger set, using defaults
Jun 11, 2019 2:58:11 AM org.eclipse.jetty.server.session.HouseKeeper startScavenging
INFO: node0 Scavenging every 600000ms
Jenkins home directory: /var/jenkins_home found at: EnvVars.masterEnvVars.get("JENKINS_HOME")
Jun 11, 2019 2:58:11 AM org.eclipse.jetty.server.handler.ContextHandler doStart
INFO: Started w.@7d322cad{Jenkins v2.156,/,file:///var/jenkins_home/war/,AVAILABLE}{/var/jenkins_home/war}
Jun 11, 2019 2:58:12 AM org.eclipse.jetty.server.AbstractConnector doStart
INFO: Started ServerConnector@50029372{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
Jun 11, 2019 2:58:12 AM org.eclipse.jetty.server.Server doStart
INFO: Started @1138ms
Jun 11, 2019 2:58:12 AM winstone.Logger logInternal
INFO: Winstone Servlet Engine v4.0 running: controlPort=disabled
Jun 11, 2019 2:58:13 AM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
Jun 11, 2019 2:58:13 AM jenkins.InitReactorRunner$1 onAttained
INFO: Listed all plugins
Jun 11, 2019 2:58:17 AM jenkins.InitReactorRunner$1 onAttained
INFO: Prepared all plugins
Jun 11, 2019 2:58:17 AM jenkins.InitReactorRunner$1 onAttained
INFO: Started all plugins
Jun 11, 2019 2:58:18 AM hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 error
INFO: Failed to instantiate optional component hudson.plugins.build_timeout.operations.AbortAndRestartOperation$DescriptorImpl; skipping
Jun 11, 2019 2:58:18 AM jenkins.InitReactorRunner$1 onAttained
INFO: Augmented all extensions
Jun 11, 2019 2:58:19 AM jenkins.InitReactorRunner$1 onAttained
INFO: Loaded all jobs
Jun 11, 2019 2:58:19 AM jenkins.util.groovy.GroovyHookScript execute
INFO: Executing /var/jenkins_home/init.groovy.d/tcp-slave-agent-port.groovy
Jun 11, 2019 2:58:19 AM hudson.model.AsyncPeriodicWork$1 run
INFO: Started Download metadata
Jun 11, 2019 2:58:19 AM hudson.util.Retrier start
INFO: Attempt #1 to do the action check updates server
Jun 11, 2019 2:58:19 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@7e9b1885: display name [Root WebApplicationContext]; startup date [Tue Jun 11 02:58:19 UTC 2019]; root of context hierarchy
Jun 11, 2019 2:58:19 AM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@7e9b1885]: org.springframework.beans.factory.support.DefaultListableBeanFactory@5f065182
Jun 11, 2019 2:58:19 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5f065182: defining beans [authenticationManager]; root of factory hierarchy
Jun 11, 2019 2:58:20 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@54a13f00: display name [Root WebApplicationContext]; startup date [Tue Jun 11 02:58:20 UTC 2019]; root of context hierarchy
Jun 11, 2019 2:58:20 AM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@54a13f00]: org.springframework.beans.factory.support.DefaultListableBeanFactory@2d2e53e2
Jun 11, 2019 2:58:20 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@2d2e53e2: defining beans [filter,legacy]; root of factory hierarchy
Jun 11, 2019 2:58:20 AM jenkins.InitReactorRunner$1 onAttained
INFO: Completed initialization
Jun 11, 2019 2:58:20 AM hudson.WebAppMain$3 run
INFO: Jenkins is fully up and running
--> setting agent port for jnlp
--> setting agent port for jnlp... done
Jun 11, 2019 2:58:39 AM hudson.util.Retrier start
INFO: The attempt #1 to do the action check updates server failed with an allowed exception:
java.net.UnknownHostException: updates.jenkins.io
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:673)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
    at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
    at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263)
    at hudson.model.DownloadService.loadJSON(DownloadService.java:167)
    at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:186)
    at hudson.PluginManager.checkUpdatesServer(PluginManager.java:1747)
    at hudson.util.Retrier.start(Retrier.java:62)
    at hudson.PluginManager.doCheckUpdatesServer(PluginManager.java:1718)
    at jenkins.model.DownloadSettings$DailyCheck.execute(DownloadSettings.java:130)
    at hudson.model.AsyncPeriodicWork$1.run(AsyncPeriodicWork.java:101)
    at java.lang.Thread.run(Thread.java:748)

Jun 11, 2019 2:58:39 AM hudson.util.Retrier start
INFO: Calling the listener of the allowed exception 'updates.jenkins.io' at the attempt #1 to do the action check updates server
Jun 11, 2019 2:58:39 AM hudson.util.Retrier start
INFO: Attempted the action check updates server for 1 time(s) with no success
Jun 11, 2019 2:58:39 AM hudson.PluginManager doCheckUpdatesServer
SEVERE: Error checking update sites for 1 attempt(s). Last exception was: UnknownHostException: updates.jenkins.io
Jun 11, 2019 2:58:39 AM hudson.model.AsyncPeriodicWork$1 run
INFO: Finished Download metadata. 20,136 ms
Jun 11, 2019 3:11:27 AM winstone.Logger logInternal
INFO: JVM is terminating. Shutting down Jetty
Running from: /usr/share/jenkins/jenkins.war
webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")
Jun 11, 2019 3:11:46 AM org.eclipse.jetty.util.log.Log initialized
INFO: Logging initialized @666ms to org.eclipse.jetty.util.log.JavaUtilLog
Jun 11, 2019 3:11:46 AM winstone.Logger logInternal
INFO: Beginning extraction from war file
Jun 11, 2019 3:11:46 AM org.eclipse.jetty.server.handler.ContextHandler setContextPath
WARNING: Empty contextPath
Jun 11, 2019 3:11:46 AM org.eclipse.jetty.server.Server doStart
INFO: jetty-9.4.z-SNAPSHOT; built: 2018-08-30T13:59:14.071Z; git: 27208684755d94a92186989f695db2d7b21ebc51; jvm 1.8.0_181-8u181-b13-2~deb9u1-b13
Jun 11, 2019 3:11:47 AM org.eclipse.jetty.webapp.StandardDescriptorProcessor visitServlet
INFO: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
Jun 11, 2019 3:11:47 AM org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: DefaultSessionIdManager workerName=node0
Jun 11, 2019 3:11:47 AM org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: No SessionScavenger set, using defaults
Jun 11, 2019 3:11:47 AM org.eclipse.jetty.server.session.HouseKeeper startScavenging
INFO: node0 Scavenging every 600000ms
Jenkins home directory: /var/jenkins_home found at: EnvVars.masterEnvVars.get("JENKINS_HOME")
Jun 11, 2019 3:11:50 AM org.eclipse.jetty.server.handler.ContextHandler doStart
INFO: Started w.@7d322cad{Jenkins v2.156,/,file:///var/jenkins_home/war/,AVAILABLE}{/var/jenkins_home/war}
Jun 11, 2019 3:11:50 AM org.eclipse.jetty.server.AbstractConnector doStart
INFO: Started ServerConnector@50029372{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
Jun 11, 2019 3:11:50 AM org.eclipse.jetty.server.Server doStart
INFO: Started @4978ms
Jun 11, 2019 3:11:50 AM winstone.Logger logInternal
INFO: Winstone Servlet Engine v4.0 running: controlPort=disabled
Jun 11, 2019 3:11:55 AM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
Jun 11, 2019 3:11:55 AM jenkins.InitReactorRunner$1 onAttained
INFO: Listed all plugins
Jun 11, 2019 3:12:23 AM jenkins.InitReactorRunner$1 onAttained
INFO: Prepared all plugins
Jun 11, 2019 3:12:23 AM jenkins.InitReactorRunner$1 onAttained
INFO: Started all plugins
Jun 11, 2019 3:12:30 AM hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 error
INFO: Failed to instantiate optional component hudson.plugins.build_timeout.operations.AbortAndRestartOperation$DescriptorImpl; skipping
Jun 11, 2019 3:12:33 AM jenkins.InitReactorRunner$1 onAttained
INFO: Augmented all extensions
Jun 11, 2019 3:12:35 AM jenkins.InitReactorRunner$1 onAttained
INFO: Loaded all jobs
Jun 11, 2019 3:12:35 AM jenkins.util.groovy.GroovyHookScript execute
INFO: Executing /var/jenkins_home/init.groovy.d/tcp-slave-agent-port.groovy
Jun 11, 2019 3:12:36 AM hudson.model.AsyncPeriodicWork$1 run
INFO: Started Download metadata
Jun 11, 2019 3:12:36 AM hudson.util.Retrier start
INFO: Attempt #1 to do the action check updates server
Jun 11, 2019 3:12:38 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@5c514e93: display name [Root WebApplicationContext]; startup date [Tue Jun 11 03:12:38 UTC 2019]; root of context hierarchy
Jun 11, 2019 3:12:38 AM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@5c514e93]: org.springframework.beans.factory.support.DefaultListableBeanFactory@6019b0e
Jun 11, 2019 3:12:38 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@6019b0e: defining beans [authenticationManager]; root of factory hierarchy
Jun 11, 2019 3:12:39 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@484ecf96: display name [Root WebApplicationContext]; startup date [Tue Jun 11 03:12:39 UTC 2019]; root of context hierarchy
Jun 11, 2019 3:12:39 AM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@484ecf96]: org.springframework.beans.factory.support.DefaultListableBeanFactory@724a85da
Jun 11, 2019 3:12:39 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@724a85da: defining beans [filter,legacy]; root of factory hierarchy
Jun 11, 2019 3:12:39 AM jenkins.InitReactorRunner$1 onAttained
INFO: Completed initialization
Jun 11, 2019 3:12:40 AM hudson.WebAppMain$3 run
INFO: Jenkins is fully up and running
--> setting agent port for jnlp
--> setting agent port for jnlp... done
Jun 11, 2019 3:12:57 AM hudson.util.Retrier start
INFO: The attempt #1 to do the action check updates server failed with an allowed exception:
java.net.UnknownHostException: updates.jenkins.io
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:673)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
    at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
    at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263)
    at hudson.model.DownloadService.loadJSON(DownloadService.java:167)
    at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:186)
    at hudson.PluginManager.checkUpdatesServer(PluginManager.java:1747)
    at hudson.util.Retrier.start(Retrier.java:62)
    at hudson.PluginManager.doCheckUpdatesServer(PluginManager.java:1718)
    at jenkins.model.DownloadSettings$DailyCheck.execute(DownloadSettings.java:130)
    at hudson.model.AsyncPeriodicWork$1.run(AsyncPeriodicWork.java:101)
    at java.lang.Thread.run(Thread.java:748)

Jun 11, 2019 3:12:57 AM hudson.util.Retrier start
INFO: Calling the listener of the allowed exception 'updates.jenkins.io' at the attempt #1 to do the action check updates server
Jun 11, 2019 3:12:57 AM hudson.util.Retrier start
INFO: Attempted the action check updates server for 1 time(s) with no success
Jun 11, 2019 3:12:57 AM hudson.PluginManager doCheckUpdatesServer
SEVERE: Error checking update sites for 1 attempt(s). Last exception was: UnknownHostException: updates.jenkins.io
Jun 11, 2019 3:12:57 AM hudson.model.AsyncPeriodicWork$1 run
INFO: Finished Download metadata. 20,779 ms

大概就是这些吧
然后又是各种百度谷歌,最后在github上找到
https://github.com/jenkinsci/docker/issues/57#issuecomment-354646649
重启一下docker服务就可以了
猜测是因为我只重启了宿主机的网络服务,但是docker服务的网络映射信息还没有同步,所以访问时找不到对应的端口映射吧

相关文章

网友评论

      本文标题:记录一个jenkins容器突然无法访问的问题

      本文链接:https://www.haomeiwen.com/subject/ufvffctx.html