Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devops-controller 启动不了,报:invalid memory address or nil pointer dereference, 流水线全部跑不起来 #2257

Open
calfgz opened this issue Nov 9, 2023 · 0 comments

Comments

@calfgz
Copy link

calfgz commented Nov 9, 2023

V3.4.0版本

W1109 01:03:10.459969 1 client_config.go:617] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.

I1109 01:03:10.460616 1 server.go:169] setting up manager

I1109 01:03:10.502309 1 logr.go:249] controller-runtime/metrics "msg"="Metrics server is starting to listen" "addr"=":8080"

I1109 01:03:10.503910 1 server.go:197] Starting cache resource from apiserver...

I1109 01:03:10.503940 1 server.go:200] Starting the controllers.

I1109 01:03:10.504530 1 internal.go:362] "msg"="Starting server" "addr"={"IP":"::","Port":8080,"Zone":""} "kind"="metrics" "path"="/metrics"

I1109 01:03:10.804739 1 devopscredential_controller.go:191] starting devopscredential controller

I1109 01:03:10.804748 1 pipeline_controller.go:187] starting pipeline controller

I1109 01:03:10.804789 1 devopsproject_controller.go:186] starting devops project controller

I1109 01:03:10.804935 1 controller.go:185] "msg"="Starting EventSource" "controller"="configmap" "controllerGroup"="" "controllerKind"="ConfigMap" "source"="kind source: *v1.ConfigMap"

I1109 01:03:10.804964 1 controller.go:193] "msg"="Starting Controller" "controller"="configmap" "controllerGroup"="" "controllerKind"="ConfigMap"

I1109 01:03:10.804984 1 controller.go:185] "msg"="Starting EventSource" "controller"="pipelinerun" "controllerGroup"="devops.kubesphere.io" "controllerKind"="PipelineRun" "source"="kind source: *v1alpha3.PipelineRun"

I1109 01:03:10.805008 1 controller.go:193] "msg"="Starting Controller" "controller"="pipelinerun" "controllerGroup"="devops.kubesphere.io" "controllerKind"="PipelineRun"

I1109 01:03:10.805013 1 controller.go:185] "msg"="Starting EventSource" "controller"="devopsproject" "controllerGroup"="devops.kubesphere.io" "controllerKind"="DevOpsProject" "source"="kind source: *v1alpha3.DevOpsProject"

I1109 01:03:10.805035 1 controller.go:193] "msg"="Starting Controller" "controller"="devopsproject" "controllerGroup"="devops.kubesphere.io" "controllerKind"="DevOpsProject"

I1109 01:03:10.805048 1 controller.go:185] "msg"="Starting EventSource" "controller"="pipelinerun" "controllerGroup"="devops.kubesphere.io" "controllerKind"="PipelineRun" "source"="kind source: *v1alpha3.PipelineRun"

I1109 01:03:10.805005 1 controller.go:185] "msg"="Starting EventSource" "controller"="pipeline" "controllerGroup"="devops.kubesphere.io" "controllerKind"="Pipeline" "source"="kind source: *v1alpha3.Pipeline"

I1109 01:03:10.805073 1 controller.go:193] "msg"="Starting Controller" "controller"="pipelinerun" "controllerGroup"="devops.kubesphere.io" "controllerKind"="PipelineRun"

I1109 01:03:10.805076 1 controller.go:193] "msg"="Starting Controller" "controller"="pipeline" "controllerGroup"="devops.kubesphere.io" "controllerKind"="Pipeline"

I1109 01:03:10.805091 1 controller.go:185] "msg"="Starting EventSource" "controller"="gitrepository" "controllerGroup"="devops.kubesphere.io" "controllerKind"="GitRepository" "source"="kind source: *v1alpha3.GitRepository"

I1109 01:03:10.805111 1 controller.go:185] "msg"="Starting EventSource" "controller"="pipeline" "controllerGroup"="devops.kubesphere.io" "controllerKind"="Pipeline" "source"="kind source: *v1alpha3.Pipeline"

I1109 01:03:10.805114 1 controller.go:185] "msg"="Starting EventSource" "controller"="gitrepository" "controllerGroup"="devops.kubesphere.io" "controllerKind"="GitRepository" "source"="kind source: *v1alpha3.GitRepository"

I1109 01:03:10.805123 1 controller.go:193] "msg"="Starting Controller" "controller"="pipeline" "controllerGroup"="devops.kubesphere.io" "controllerKind"="Pipeline"

I1109 01:03:10.805124 1 controller.go:193] "msg"="Starting Controller" "controller"="gitrepository" "controllerGroup"="devops.kubesphere.io" "controllerKind"="GitRepository"

I1109 01:03:10.805131 1 controller.go:193] "msg"="Starting Controller" "controller"="gitrepository" "controllerGroup"="devops.kubesphere.io" "controllerKind"="GitRepository"

I1109 01:03:10.805141 1 controller.go:185] "msg"="Starting EventSource" "controller"="pipeline" "controllerGroup"="devops.kubesphere.io" "controllerKind"="Pipeline" "source"="kind source: *v1alpha3.Pipeline"

I1109 01:03:10.805156 1 controller.go:193] "msg"="Starting Controller" "controller"="pipeline" "controllerGroup"="devops.kubesphere.io" "controllerKind"="Pipeline"

I1109 01:03:10.805199 1 jenkinsconfig_controller.go:143] starting Jenkins config controller

I1109 01:03:10.805250 1 jenkinsconfig_controller.go:320] syncing key:kubesphere-devops-system/jenkins-casc-config

I1109 01:03:10.805253 1 controller.go:185] "msg"="Starting EventSource" "controller"="podtemplate" "controllerGroup"="" "controllerKind"="PodTemplate" "source"="kind source: *v1.PodTemplate"

I1109 01:03:10.805275 1 controller.go:193] "msg"="Starting Controller" "controller"="podtemplate" "controllerGroup"="" "controllerKind"="PodTemplate"

I1109 01:03:10.805361 1 controller.go:185] "msg"="Starting EventSource" "controller"="application" "controllerGroup"="gitops.kubesphere.io" "controllerKind"="Application" "source"="kind source: *v1alpha1.Application"

I1109 01:03:10.805378 1 controller.go:193] "msg"="Starting Controller" "controller"="application" "controllerGroup"="gitops.kubesphere.io" "controllerKind"="Application"

I1109 01:03:10.805433 1 controller.go:185] "msg"="Starting EventSource" "controller"="cluster" "controllerGroup"="cluster.kubesphere.io" "controllerKind"="Cluster" "source"="kind source: *unstructured.Unstructured"

I1109 01:03:10.805455 1 controller.go:193] "msg"="Starting Controller" "controller"="cluster" "controllerGroup"="cluster.kubesphere.io" "controllerKind"="Cluster"

I1109 01:03:10.805434 1 controller.go:185] "msg"="Starting EventSource" "controller"="application" "controllerGroup"="argoproj.io" "controllerKind"="Application" "source"="kind source: *unstructured.Unstructured"

I1109 01:03:10.805644 1 controller.go:193] "msg"="Starting Controller" "controller"="application" "controllerGroup"="argoproj.io" "controllerKind"="Application"

E1109 01:03:10.863364 1 runtime.go:79] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)

goroutine 311 [running]:

k8s.io/apimachinery/pkg/util/runtime.logPanic({0x1bff380, 0x3214890})

/go/pkg/mod/k8s.io/[email protected]/pkg/util/runtime/runtime.go:75 +0x85

k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0xc000b1bc80})

/go/pkg/mod/k8s.io/[email protected]/pkg/util/runtime/runtime.go:49 +0x75

panic({0x1bff380, 0x3214890})

/usr/local/go/src/runtime/panic.go:1038 +0x215

github.com/beevik/etree.(*Element).Text(0xc002df6ba0)

/go/pkg/mod/github.com/beevik/[email protected]/etree.go:426 +0x18

kubesphere.io/devops/pkg/client/devops/jenkins/internal.GetGitSourcefromEtree(0xc002df6840)

/workspace/pkg/client/devops/jenkins/internal/git.go:104 +0x2e5

kubesphere.io/devops/pkg/client/devops/jenkins.parseMultiBranchPipelineConfigXml({0xc000fca000, 0xfdd})

/workspace/pkg/client/devops/jenkins/pipeline_internal.go:563 +0x557

kubesphere.io/devops/pkg/client/devops/jenkins.(*Jenkins).GetProjectPipelineConfig(0x1, {0xc0007d4c30, 0xc00131d478}, {0xc000b928e0, 0xc00139d160})

/workspace/pkg/client/devops/jenkins/project_pipeline.go:174 +0x22e

kubesphere.io/devops/pkg/client/devops/jclient.(*JenkinsClient).GetProjectPipelineConfig(0xc00139d160, {0xc0007d4c30, 0x1f0f303}, {0xc000b928e0, 0x21})

/workspace/pkg/client/devops/jclient/projectPipeline.go:91 +0x2a

kubesphere.io/devops/controllers/jenkins/pipeline.(*Controller).syncHandler(0xc00028bae0, {0xc0007d4c30, 0x26})

/workspace/controllers/jenkins/pipeline/pipeline_controller.go:263 +0x693

kubesphere.io/devops/controllers/jenkins/pipeline.(*Controller).processNextWorkItem.func1(0xc00028bae0, {0x1b1cce0, 0xc000b1bc80})

/workspace/controllers/jenkins/pipeline/pipeline_controller.go:155 +0x11d

kubesphere.io/devops/controllers/jenkins/pipeline.(*Controller).processNextWorkItem(0xc00028bae0)

/workspace/controllers/jenkins/pipeline/pipeline_controller.go:162 +0x3e

kubesphere.io/devops/controllers/jenkins/pipeline.(*Controller).worker(...)

/workspace/controllers/jenkins/pipeline/pipeline_controller.go:173

k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0x7fd16f693080)

/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:155 +0x67

k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0xc00062a288, {0x220a020, 0xc0006ca840}, 0x1, 0xc00082a540)

/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:156 +0xb6

k8s.io/apimachinery/pkg/util/wait.JitterUntil(0x100000000, 0x3b9aca00, 0x0, 0xbc, 0x43f8c5)

/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:133 +0x89

k8s.io/apimachinery/pkg/util/wait.Until(0x0, 0x0, 0x0)

/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:90 +0x25

created by kubesphere.io/devops/controllers/jenkins/pipeline.(*Controller).Run

/workspace/controllers/jenkins/pipeline/pipeline_controller.go:195 +0x26e

panic: runtime error: invalid memory address or nil pointer dereference [recovered]

panic: runtime error: invalid memory address or nil pointer dereference

[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x17da318]

goroutine 311 [running]:

k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0xc000b1bc80})

/go/pkg/mod/k8s.io/[email protected]/pkg/util/runtime/runtime.go:56 +0xd8

panic({0x1bff380, 0x3214890})

/usr/local/go/src/runtime/panic.go:1038 +0x215

github.com/beevik/etree.(*Element).Text(0xc002df6ba0)

/go/pkg/mod/github.com/beevik/[email protected]/etree.go:426 +0x18

kubesphere.io/devops/pkg/client/devops/jenkins/internal.GetGitSourcefromEtree(0xc002df6840)

/workspace/pkg/client/devops/jenkins/internal/git.go:104 +0x2e5

kubesphere.io/devops/pkg/client/devops/jenkins.parseMultiBranchPipelineConfigXml({0xc000fca000, 0xfdd})

/workspace/pkg/client/devops/jenkins/pipeline_internal.go:563 +0x557

kubesphere.io/devops/pkg/client/devops/jenkins.(*Jenkins).GetProjectPipelineConfig(0x1, {0xc0007d4c30, 0xc00131d478}, {0xc000b928e0, 0xc00139d160})

/workspace/pkg/client/devops/jenkins/project_pipeline.go:174 +0x22e

kubesphere.io/devops/pkg/client/devops/jclient.(*JenkinsClient).GetProjectPipelineConfig(0xc00139d160, {0xc0007d4c30, 0x1f0f303}, {0xc000b928e0, 0x21})

/workspace/pkg/client/devops/jclient/projectPipeline.go:91 +0x2a

kubesphere.io/devops/controllers/jenkins/pipeline.(*Controller).syncHandler(0xc00028bae0, {0xc0007d4c30, 0x26})

/workspace/controllers/jenkins/pipeline/pipeline_controller.go:263 +0x693

kubesphere.io/devops/controllers/jenkins/pipeline.(*Controller).processNextWorkItem.func1(0xc00028bae0, {0x1b1cce0, 0xc000b1bc80})

/workspace/controllers/jenkins/pipeline/pipeline_controller.go:155 +0x11d

kubesphere.io/devops/controllers/jenkins/pipeline.(*Controller).processNextWorkItem(0xc00028bae0)

/workspace/controllers/jenkins/pipeline/pipeline_controller.go:162 +0x3e

kubesphere.io/devops/controllers/jenkins/pipeline.(*Controller).worker(...)

/workspace/controllers/jenkins/pipeline/pipeline_controller.go:173

k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0x7fd16f693080)

/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:155 +0x67

k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0xc00062a288, {0x220a020, 0xc0006ca840}, 0x1, 0xc00082a540)

/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:156 +0xb6

k8s.io/apimachinery/pkg/util/wait.JitterUntil(0x100000000, 0x3b9aca00, 0x0, 0xbc, 0x43f8c5)

/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:133 +0x89

k8s.io/apimachinery/pkg/util/wait.Until(0x0, 0x0, 0x0)

/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:90 +0x25

created by kubesphere.io/devops/controllers/jenkins/pipeline.(*Controller).Run

/workspace/controllers/jenkins/pipeline/pipeline_controller.go:195 +0x26e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant