gpt4 book ai didi

ubuntu - 在 minikube 中运行 jenkins 时出错

转载 作者:行者123 更新时间:2023-12-04 17:05:44 26 4
gpt4 key购买 nike

在 pod 内运行 jenkins 时,它显示 jenkins 已启动并正在运行,但出现这个长错误。

我在 pod 内执行的命令:

docker run --name=jenkins-container docker-jenkins

错误日志:

 Running from: /usr/share/jenkins/jenkins.war
webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")
2020-06-07 03:32:13.394+0000 [id=1] INFO org.eclipse.jetty.util.log.Log#initialized: Logging initialized @519ms to org.eclipse.jetty.util.log.JavaUtilLog
2020-06-07 03:32:13.588+0000 [id=1] INFO winstone.Logger#logInternal: Beginning extraction from war file
2020-06-07 03:32:15.180+0000 [id=1] WARNING o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath
2020-06-07 03:32:15.302+0000 [id=1] INFO org.eclipse.jetty.server.Server#doStart: jetty-9.4.27.v20200227; built: 2020-02-27T18:37:21.340Z; git: a304fd9f351f337e7c0e2a7c28878dd536149c6c; jvm 1.8.0_242-b08
2020-06-07 03:32:15.764+0000 [id=1] INFO o.e.j.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
2020-06-07 03:32:15.888+0000 [id=1] INFO o.e.j.s.s.DefaultSessionIdManager#doStart: DefaultSessionIdManager workerName=node0
2020-06-07 03:32:15.888+0000 [id=1] INFO o.e.j.s.s.DefaultSessionIdManager#doStart: No SessionScavenger set, using defaults
2020-06-07 03:32:15.897+0000 [id=1] INFO o.e.j.server.session.HouseKeeper#startScavenging: node0 Scavenging every 660000ms
2020-06-07 03:32:16.757+0000 [id=1] INFO hudson.WebAppMain#contextInitialized: Jenkins home directory: /var/jenkins_home found at: EnvVars.masterEnvVars.get("JENKINS_HOME")
2020-06-07 03:32:16.944+0000 [id=1] INFO o.e.j.s.handler.ContextHandler#doStart: Started w.@5b800468{Jenkins v2.239,/,file:///var/jenkins_home/war/,AVAILABLE}{/var/jenkins_home/war}
2020-06-07 03:32:17.001+0000 [id=1] INFO o.e.j.server.AbstractConnector#doStart: Started ServerConnector@6f43c82{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
2020-06-07 03:32:17.001+0000 [id=1] INFO org.eclipse.jetty.server.Server#doStart: Started @4126ms
2020-06-07 03:32:17.003+0000 [id=21] INFO winstone.Logger#logInternal: Winstone Servlet Engine running: controlPort=disabled
2020-06-07 03:32:18.622+0000 [id=27] INFO jenkins.InitReactorRunner$1#onAttained: Started initialization
2020-06-07 03:32:18.725+0000 [id=27] INFO jenkins.InitReactorRunner$1#onAttained: Listed all plugins
2020-06-07 03:32:20.825+0000 [id=33] INFO jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
2020-06-07 03:32:20.838+0000 [id=28] INFO jenkins.InitReactorRunner$1#onAttained: Started all plugins
2020-06-07 03:32:20.863+0000 [id=31] INFO jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
2020-06-07 03:32:21.808+0000 [id=26] INFO jenkins.InitReactorRunner$1#onAttained: System config loaded
2020-06-07 03:32:21.809+0000 [id=29] INFO jenkins.InitReactorRunner$1#onAttained: System config adapted
2020-06-07 03:32:21.957+0000 [id=26] INFO jenkins.InitReactorRunner$1#onAttained: Loaded all jobs
2020-06-07 03:32:21.960+0000 [id=28] INFO jenkins.InitReactorRunner$1#onAttained: Configuration for all jobs updated
2020-06-07 03:32:22.086+0000 [id=46] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started Download metadata
2020-06-07 03:32:22.136+0000 [id=46] INFO hudson.util.Retrier#start: Attempt #1 to do the action check updates server
2020-06-07 03:32:22.635+0000 [id=27] INFO jenkins.install.UpgradeWizard#applyForcedChanges: New API token system configured with insecure options to keep legacy behavior
2020-06-07 03:32:22.884+0000 [id=46] INFO hudson.util.Retrier#start: The attempt #1 to do the action check updates server failed with an allowed exception:
java.net.NoRouteToHostException: No route to host (Host unreachable)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:607)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:666)
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:1162)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1570)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
at hudson.model.DownloadService.loadJSON(DownloadService.java:114)
at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:212)
at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:207)
at hudson.PluginManager.checkUpdatesServer(PluginManager.java:1767)
at hudson.util.Retrier.start(Retrier.java:63)
at hudson.PluginManager.doCheckUpdatesServer(PluginManager.java:1738)
at jenkins.DailyCheck.execute(DailyCheck.java:93)
at hudson.model.AsyncPeriodicWork.lambda$doRun$0(AsyncPeriodicWork.java:100)
at java.lang.Thread.run(Thread.java:748)
2020-06-07 03:32:22.885+0000 [id=46] INFO hudson.util.Retrier#start: Calling the listener of the allowed exception 'No route to host (Host unreachable)' at the attempt #1 to do the action check updates server
2020-06-07 03:32:22.887+0000 [id=46] INFO hudson.util.Retrier#start: Attempted the action check updates server for 1 time(s) with no success
2020-06-07 03:32:22.888+0000 [id=46] SEVERE hudson.PluginManager#doCheckUpdatesServer: Error checking update sites for 1 attempt(s). Last exception was: NoRouteToHostException: No route to host (Host unreachable)
2020-06-07 03:32:22.900+0000 [id=46] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Finished Download metadata. 802 ms
2020-06-07 03:32:23.166+0000 [id=32] INFO jenkins.InitReactorRunner$1#onAttained: Completed initialization
2020-06-07 03:32:23.393+0000 [id=20] INFO hudson.WebAppMain$3#run: Jenkins is fully up and running

任何解决方案?

如何在 kubernetes 上部署 jenkins 并执行它

最佳答案

On running Jenkins inside the pod Command I executed inside the pod: docker run --name=jenkins-container docker-jenkins



Pod 运行 Docker 容器,如果 Jenkins 是从 Pod 内部使用 docker run 启动的,Jenkins 将成为“Docker 中的 Docker”。

有可能遇到 a lot of problems Docker 在另一个 Docker 容器中运行。一个更好的方法是容器不运行自己的 Docker 守护进程,而是连接到主机系统的 Docker 守护进程。

更好的解决方案是将 Jenkins 作为 Pod(而不是作为 Pod 内的容器)运行。

How to deploy Jenkins on Kubernetes and execute it



有一个已经好的 script这允许您在 minikube 上使用动态启动的 Jenkins 从站来设置持久的 Jenkins 主站。
基本上它指的是以下(经过验证的)完整教程 how to set up Jenkins on minikube .

希望有帮助。

关于ubuntu - 在 minikube 中运行 jenkins 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62240613/

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