runzexia
jenkins已经运行了两天了,创建devops工程还是报上面的错误,还要等多久才能初始化完成呢?

    runzexia
    这是ks-jenkins日志
    Picked up JAVA_TOOL_OPTIONS: -Xms512m -Xmx512m -XX:MaxRAM=2g -Dhudson.slaves.NodeProvisioner.initialDelay=20 -Dhudson.slaves.NodeProvisioner.MARGIN=50 -Dhudson.slaves.NodeProvisioner.MARGIN0=0.85 -Dhudson.model.LoadStatistics.clock=5000 -Dhudson.model.LoadStatistics.decay=0.2 -Dhudson.slaves.NodeProvisioner.recurrencePeriod=5000 -verbose:gc -Xloggc:/var/jenkins_home/gc-%t.log -XX:NumberOfGCLogFiles=2 -XX:+UseGCLogFileRotation -XX:GCLogFileSize=100m -XX:+PrintGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintHeapAtGC -XX:+PrintGCCause -XX:+PrintTenuringDistribution -XX:+PrintReferenceGC -XX:+PrintAdaptiveSizePolicy -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:+DisableExplicitGC -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
    Running from: /usr/share/jenkins/jenkins.war
    webroot: EnvVars.masterEnvVars.get(“JENKINS_HOME”)
    Dec 20, 2019 2:45:42 AM org.eclipse.jetty.util.log.Log initialized
    INFO: Logging initialized @834ms to org.eclipse.jetty.util.log.JavaUtilLog
    Dec 20, 2019 2:45:42 AM winstone.Logger logInternal
    INFO: Beginning extraction from war file
    Dec 20, 2019 2:45:42 AM org.eclipse.jetty.server.handler.ContextHandler setContextPath
    WARNING: Empty contextPath
    Dec 20, 2019 2:45:42 AM org.eclipse.jetty.server.Server doStart
    INFO: jetty-9.4.z-SNAPSHOT; built: 2019-02-15T16:53:49.381Z; git: eb70b240169fcf1abbd86af36482d1c49826fa0b; jvm 1.8.0_212-b04
    Dec 20, 2019 2:45:44 AM org.eclipse.jetty.webapp.StandardDescriptorProcessor visitServlet
    INFO: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
    Dec 20, 2019 2:45:44 AM org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
    INFO: DefaultSessionIdManager workerName=node0
    Dec 20, 2019 2:45:44 AM org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
    INFO: No SessionScavenger set, using defaults
    Dec 20, 2019 2:45:44 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”)
    Dec 20, 2019 2:45:46 AM org.eclipse.jetty.server.handler.ContextHandler doStart
    INFO: Started w.@23941fb4{Jenkins v2.176.2,/,file:///var/jenkins_home/war/,AVAILABLE}{/var/jenkins_home/war}
    Dec 20, 2019 2:45:47 AM org.eclipse.jetty.server.AbstractConnector doStart
    INFO: Started ServerConnector@147e2ae7{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
    Dec 20, 2019 2:45:47 AM org.eclipse.jetty.server.Server doStart
    INFO: Started @5718ms
    Dec 20, 2019 2:45:47 AM winstone.Logger logInternal
    INFO: Winstone Servlet Engine v4.0 running: controlPort=disabled
    Dec 20, 2019 2:45:50 AM jenkins.InitReactorRunner$1 onAttained
    INFO: Started initialization
    Dec 20, 2019 2:45:57 AM jenkins.InitReactorRunner$1 onAttained
    INFO: Listed all plugins
    Dec 20, 2019 2:46:00 AM ruby.RubyRuntimePlugin start
    INFO: Injecting JRuby into XStream
    Dec 20, 2019 2:47:00 AM jenkins.InitReactorRunner$1 onAttained
    INFO: Prepared all plugins
    Dec 20, 2019 2:47:01 AM jenkins.InitReactorRunner$1 onAttained
    INFO: Started all plugins
    Dec 20, 2019 2:47:08 AM hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 error
    INFO: Failed to instantiate optional component hudson.plugins.build_timeout.operations.AbortAndRestartOperation$DescriptorImpl; skipping
    Dec 20, 2019 2:47:10 AM jenkins.InitReactorRunner$1 onAttained
    INFO: Augmented all extensions
    Dec 20, 2019 2:47:11 AM jenkins.model.Jenkins setBuildsAndWorkspacesDir
    INFO: Using non default workspaces directories: ${JENKINS_HOME}/workspace/${ITEM_FULLNAME}.
    Dec 20, 2019 2:47:28 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh
    INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@4aa72ad4: display name [Root WebApplicationContext]; startup date [Fri Dec 20 02:47:28 UTC 2019]; root of context hierarchy
    Dec 20, 2019 2:47:28 AM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
    INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@4aa72ad4]: org.springframework.beans.factory.support.DefaultListableBeanFactory@5b236dc2
    Dec 20, 2019 2:47:28 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
    INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5b236dc2: defining beans [ldapUserSearch,authenticationManager,bindAuthenticator,authoritiesPopulator,initialDirContextFactory]; root of factory hierarchy
    Dec 20, 2019 2:47:28 AM org.acegisecurity.ldap.DefaultInitialDirContextFactory setProviderUrl
    INFO: URL ‘ldap://openldap.kubesphere-system.svc:389/dc=kubesphere,dc=io’, root DN is ‘dc=kubesphere,dc=io’
    Dec 20, 2019 2:47:29 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh
    INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@6ca57384: display name [Root WebApplicationContext]; startup date [Fri Dec 20 02:47:29 UTC 2019]; root of context hierarchy
    Dec 20, 2019 2:47:29 AM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
    INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@6ca57384]: org.springframework.beans.factory.support.DefaultListableBeanFactory@76e7f638
    Dec 20, 2019 2:47:29 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
    INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@76e7f638: defining beans [filter,legacy]; root of factory hierarchy
    Dec 20, 2019 2:47:29 AM org.csanchez.jenkins.plugins.kubernetes.KubernetesClientProvider$SaveableListenerImpl onChange
    INFO: Invalidating Kubernetes client: kubernetes null
    Processing provided DSL script
    Dec 20, 2019 2:47:32 AM javaposse.jobdsl.plugin.JenkinsJobManagement createOrUpdateConfig
    INFO: createOrUpdateConfig for init-job
    Dec 20, 2019 2:47:45 AM jenkins.InitReactorRunner$1 onAttained
    INFO: Loaded all jobs
    Dec 20, 2019 2:47:45 AM jenkins.util.groovy.GroovyHookScript execute
    INFO: Executing /var/jenkins_home/init.groovy.d/initCasc.groovy
    –> reload casc config
    Dec 20, 2019 2:47:57 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh
    INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@51e92a74: display name [Root WebApplicationContext]; startup date [Fri Dec 20 02:47:57 UTC 2019]; root of context hierarchy
    Dec 20, 2019 2:47:57 AM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
    INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@51e92a74]: org.springframework.beans.factory.support.DefaultListableBeanFactory@137b6d05
    Dec 20, 2019 2:47:57 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
    INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@137b6d05: defining beans [ldapUserSearch,authenticationManager,bindAuthenticator,authoritiesPopulator,initialDirContextFactory]; root of factory hierarchy
    Dec 20, 2019 2:47:57 AM org.acegisecurity.ldap.DefaultInitialDirContextFactory setProviderUrl
    INFO: URL ‘ldap://openldap.kubesphere-system.svc:389/dc=kubesphere,dc=io’, root DN is ‘dc=kubesphere,dc=io’
    Dec 20, 2019 2:47:58 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh
    INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@1c98d641: display name [Root WebApplicationContext]; startup date [Fri Dec 20 02:47:58 UTC 2019]; root of context hierarchy
    Dec 20, 2019 2:47:58 AM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
    INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@1c98d641]: org.springframework.beans.factory.support.DefaultListableBeanFactory@3d4d531f
    Dec 20, 2019 2:47:58 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
    INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@3d4d531f: defining beans [filter,legacy]; root of factory hierarchy
    Dec 20, 2019 2:47:58 AM org.csanchez.jenkins.plugins.kubernetes.KubernetesClientProvider$SaveableListenerImpl onChange
    INFO: Invalidating Kubernetes client: kubernetes null
    Processing provided DSL script
    Dec 20, 2019 2:47:59 AM javaposse.jobdsl.plugin.JenkinsJobManagement createOrUpdateConfig
    INFO: createOrUpdateConfig for init-job
    Dec 20, 2019 2:48:09 AM jenkins.util.groovy.GroovyHookScript execute
    INFO: Executing /var/jenkins_home/init.groovy.d/initK8sCredentials.groovy
    Dec 20, 2019 2:48:10 AM jenkins.util.groovy.GroovyHookScript execute
    INFO: Executing /var/jenkins_home/init.groovy.d/initMailer.groovy
    Dec 20, 2019 2:48:12 AM jenkins.util.groovy.GroovyHookScript execute
    INFO: Executing /var/jenkins_home/init.groovy.d/initRBAC.groovy
    Role based authorisation already enabled.
    Exiting script…
    Dec 20, 2019 2:48:14 AM jenkins.util.groovy.GroovyHookScript execute
    INFO: Executing /var/jenkins_home/init.groovy.d/initSonarqube.groovy
    Found existing installation: sonar : 0
    –> Configuring SonarRunner
    Found existing installation: sonar
    Dec 20, 2019 2:48:15 AM org.csanchez.jenkins.plugins.kubernetes.KubernetesClientProvider$SaveableListenerImpl onChange
    INFO: Invalidating Kubernetes client: kubernetes null
    Dec 20, 2019 2:48:15 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh
    INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@4989c422: display name [Root WebApplicationContext]; startup date [Fri Dec 20 02:48:15 UTC 2019]; root of context hierarchy
    Dec 20, 2019 2:48:15 AM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
    INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@4989c422]: org.springframework.beans.factory.support.DefaultListableBeanFactory@2ee33f1c
    Dec 20, 2019 2:48:15 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
    INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@2ee33f1c: defining beans [filter,legacy]; root of factory hierarchy
    Dec 20, 2019 2:48:16 AM org.csanchez.jenkins.plugins.kubernetes.KubernetesClientProvider$SaveableListenerImpl onChange
    INFO: Invalidating Kubernetes client: kubernetes null
    Dec 20, 2019 2:48:16 AM hudson.model.AsyncPeriodicWork$1 run
    INFO: Started Download metadata
    Dec 20, 2019 2:48:16 AM hudson.model.AsyncPeriodicWork$1 run
    INFO: Finished Download metadata. 43 ms
    Dec 20, 2019 5:59:58 AM hudson.model.AsyncPeriodicWork$1 run
    INFO: Started Workspace clean-up
    Dec 20, 2019 5:59:58 AM hudson.model.AsyncPeriodicWork$1 run
    INFO: Finished Workspace clean-up. 51 ms
    Dec 20, 2019 1:45:52 PM hudson.model.AsyncPeriodicWork$1 run
    INFO: Started telemetry collection
    Dec 20, 2019 1:45:52 PM jenkins.telemetry.Telemetry$TelemetryReporter execute
    INFO: Collection of anonymous usage statistics is disabled, skipping telemetry collection and submission
    Dec 20, 2019 1:45:52 PM hudson.model.AsyncPeriodicWork$1 run
    INFO: Finished telemetry collection. 30 ms
    Dec 20, 2019 5:15:22 PM hudson.model.AsyncPeriodicWork$1 run
    INFO: Started Fingerprint cleanup
    Dec 20, 2019 5:15:22 PM hudson.model.AsyncPeriodicWork$1 run
    INFO: Finished Fingerprint cleanup. 32 ms
    Dec 21, 2019 1:43:21 AM hudson.model.AsyncPeriodicWork$1 run
    INFO: Started jobAnalytics
    Dec 21, 2019 1:43:21 AM hudson.model.AsyncPeriodicWork$1 run
    INFO: Finished jobAnalytics. 30 ms
    Dec 21, 2019 2:48:16 AM hudson.model.AsyncPeriodicWork$1 run
    INFO: Started Download metadata
    Dec 21, 2019 2:48:16 AM hudson.util.Retrier start
    INFO: Attempt #1 to do the action check updates server
    Dec 21, 2019 2:50:49 AM hudson.model.UpdateSite updateData
    INFO: Obtained the latest update center data file for UpdateSource default
    Dec 21, 2019 2:50:52 AM hudson.model.DownloadService$Downloadable load
    INFO: Obtained the updated data file for hudson.tasks.Maven.MavenInstaller
    Dec 21, 2019 2:50:53 AM hudson.model.DownloadService$Downloadable load
    INFO: Obtained the updated data file for hudson.tasks.Ant.AntInstaller
    Dec 21, 2019 2:50:54 AM hudson.model.DownloadService$Downloadable load
    INFO: Obtained the updated data file for hudson.plugins.sonar.MsBuildSonarQubeRunnerInstaller
    Dec 21, 2019 2:50:56 AM hudson.model.DownloadService$Downloadable load
    INFO: Obtained the updated data file for hudson.plugins.sonar.SonarRunnerInstaller
    Dec 21, 2019 2:51:28 AM hudson.model.DownloadService$Downloadable load
    INFO: Obtained the updated data file for hudson.tools.JDKInstaller
    Dec 21, 2019 2:51:28 AM hudson.util.Retrier start
    INFO: Performed the action check updates server successfully at the attempt #1
    Dec 21, 2019 2:51:28 AM hudson.model.AsyncPeriodicWork$1 run
    INFO: Finished Download metadata. 192,549 ms
    Dec 21, 2019 5:59:58 AM hudson.model.AsyncPeriodicWork$1 run
    INFO: Started Workspace clean-up
    Dec 21, 2019 5:59:58 AM hudson.model.AsyncPeriodicWork$1 run
    INFO: Finished Workspace clean-up. 28 ms
    Dec 21, 2019 1:45:52 PM hudson.model.AsyncPeriodicWork$1 run
    INFO: Started telemetry collection
    Dec 21, 2019 1:45:52 PM jenkins.telemetry.Telemetry$TelemetryReporter execute
    INFO: Collection of anonymous usage statistics is disabled, skipping telemetry collection and submission
    Dec 21, 2019 1:45:52 PM hudson.model.AsyncPeriodicWork$1 run
    INFO: Finished telemetry collection. 11 ms
    Dec 21, 2019 5:15:22 PM hudson.model.AsyncPeriodicWork$1 run
    INFO: Started Fingerprint cleanup
    Dec 21, 2019 5:15:22 PM hudson.model.AsyncPeriodicWork$1 run
    INFO: Finished Fingerprint cleanup. 12 ms
    Dec 22, 2019 1:43:21 AM hudson.model.AsyncPeriodicWork$1 run
    INFO: Started jobAnalytics
    Dec 22, 2019 1:43:21 AM hudson.model.AsyncPeriodicWork$1 run
    INFO: Finished jobAnalytics. 35 ms
    Dec 22, 2019 2:48:16 AM hudson.model.AsyncPeriodicWork$1 run
    INFO: Started Download metadata
    Dec 22, 2019 2:48:18 AM hudson.model.DownloadService$Downloadable load
    INFO: Obtained the updated data file for hudson.tasks.Maven.MavenInstaller
    Dec 22, 2019 2:48:19 AM hudson.model.DownloadService$Downloadable load
    INFO: Obtained the updated data file for hudson.tasks.Ant.AntInstaller
    Dec 22, 2019 2:48:20 AM hudson.model.DownloadService$Downloadable load
    INFO: Obtained the updated data file for hudson.plugins.sonar.MsBuildSonarQubeRunnerInstaller
    Dec 22, 2019 2:48:21 AM hudson.model.DownloadService$Downloadable load
    INFO: Obtained the updated data file for hudson.plugins.sonar.SonarRunnerInstaller
    Dec 22, 2019 2:48:51 AM hudson.model.DownloadService$Downloadable load
    INFO: Obtained the updated data file for hudson.tools.JDKInstaller
    Dec 22, 2019 2:48:51 AM hudson.model.AsyncPeriodicWork$1 run
    INFO: Finished Download metadata. 35,727 ms
    Dec 22, 2019 5:59:58 AM hudson.model.AsyncPeriodicWork$1 run
    INFO: Started Workspace clean-up
    Dec 22, 2019 5:59:58 AM hudson.model.AsyncPeriodicWork$1 run
    INFO: Finished Workspace clean-up. 12 ms
    Dec 22, 2019 1:45:52 PM hudson.model.AsyncPeriodicWork$1 run
    INFO: Started telemetry collection
    Dec 22, 2019 1:45:52 PM jenkins.telemetry.Telemetry$TelemetryReporter execute
    INFO: Collection of anonymous usage statistics is disabled, skipping telemetry collection and submission
    Dec 22, 2019 1:45:52 PM hudson.model.AsyncPeriodicWork$1 run
    INFO: Finished telemetry collection. 34 ms
    Dec 22, 2019 5:15:22 PM hudson.model.AsyncPeriodicWork$1 run
    INFO: Started Fingerprint cleanup
    Dec 22, 2019 5:15:22 PM hudson.model.AsyncPeriodicWork$1 run
    INFO: Finished Fingerprint cleanup. 36 ms
    Dec 23, 2019 1:43:21 AM hudson.model.AsyncPeriodicWork$1 run
    INFO: Started jobAnalytics
    Dec 23, 2019 1:43:21 AM hudson.model.AsyncPeriodicWork$1 run
    INFO: Finished jobAnalytics. 14 ms

      runzexia 这是 apiserver日志
      E1223 00:58:34.513621 1 devops.go:37] failed to connecto to jenkins role, GET http://ks-jenkins.kubesphere-devops-system.svc/api/json: 503


      
      <!DOCTYPE html><html lang="en"><head resURL="/static/04aa129e" data-rooturl="" data-resurl="/static/04aa129e"><title>Starting Jenkins</title><meta name="ROBOTS" content="NOFOLLOW" /><meta name="viewport" content="width=device-width, initial-scale=1" /><link rel="stylesheet" href="/static/04aa129e/css/simple-page.css" type="text/css" /><link rel="stylesheet" href="/static/04aa129e/css/simple-page.theme.css" type="text/css" /><link rel="stylesheet" href="/static/04aa129e/css/loading.css" type="text/css" /></head><body><div class="simple-page" role="main"><div class="modal signup"><div class="signupIntroDefault"><div class="logo"></div><h1 class="loading">
                              Please wait while Jenkins is getting ready to work
                              <span>.</span><span>.</span><span>.</span></h1><p>Your browser will reload automatically when Jenkins is ready.</p></div></div></div><script src="/static/04aa129e/scripts/loading.js" type="text/javascript"></script><script>safeRedirector(window.location.href);</script></body></html>

      LLLDDD 看 jenkins 的日志确实是没有显示初始化完毕捏。
      如果着急的话可以试下把 jenkins scale 到 0 再 scale 到 1 尝试一下。
      我们再分析一下日志

        runzexia 试了下,创建成功了,但是会提示图中的问题,不知道对后续使用会不会有影响

          4 个月 后

          runzexia ![您好,创建devops报同样错,apiserver日志请见附件,请看看怎么处理?

          8 个月 后

          我的也报错了Invalidating Kubernetes client: kubernetes null,请问这个jenkins需要设置什么么

          我的jenkins报错了Invalidating Kubernetes client: kubernetes null,该怎么解决

          2 年 后

          你好,我遇到类似的问题,也是创建devops工程报错:service unavaliable,我在安装devops时查看了日志,发现devops faild。我不知道怎么解决。