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

Harbor Exporter unready #1835

Open
CiraciNicolo opened this issue Oct 10, 2024 · 2 comments
Open

Harbor Exporter unready #1835

CiraciNicolo opened this issue Oct 10, 2024 · 2 comments
Assignees

Comments

@CiraciNicolo
Copy link

Hi,

I deployed Harbor using the Helm contained in this repository, enabling metrics but the exporter container is always unready - both liveness and readiness probe are failing. This is the container logs:

Appending internal tls trust CA to ca-bundle ...
find: '/etc/harbor/ssl': No such file or directory
Internal tls trust CA appending is Done.
2024-10-10T10:36:52Z [INFO] [/common/dao/base.go:67]: Registering database: type-PostgreSQL host-harbor-db-rw.harbor-system.svc.cluster.local port-5432 database-harbor sslmode-"disable"
2024-10-10T10:36:52Z [INFO] [/common/dao/base.go:72]: Register database completed
2024-10-10T10:36:52Z [INFO] [/pkg/exporter/exporter.go:80]: collector HealthCollector registered ...
2024-10-10T10:36:52Z [INFO] [/pkg/exporter/exporter.go:80]: collector SystemInfoCollector registered ...
2024-10-10T10:36:52Z [INFO] [/pkg/exporter/exporter.go:80]: collector ProjectCollector registered ...
2024-10-10T10:36:52Z [INFO] [/pkg/exporter/exporter.go:80]: collector JobServiceCollector registered ...
2024-10-10T10:36:52Z [INFO] [/cmd/exporter/main.go:86]: Starting harbor_exporter with port=0 path=/metrics metrics=true max_request=0 tls=false cert= key= cache_time=23 clean_interval=14400

Any help?

@MinerYang
Copy link
Collaborator

exporter port should be 8001 by default. How do you set up your metrics config in values.yaml. Would you also check the full logs of exporter and describe the exporter pod?

@MinerYang MinerYang self-assigned this Oct 15, 2024
@CiraciNicolo
Copy link
Author

This is the helm values for the metrics part:

metrics:
  enabled: true
  serviceMonitor:
    enabled: true

Below you can find the logs and describe

➜ kubectl -n harbor-system logs harbor-exporter-7b4fc45fcd-zvqr4
Appending internal tls trust CA to ca-bundle ...
find: '/etc/harbor/ssl': No such file or directory
Internal tls trust CA appending is Done.
2024-10-25T14:03:22Z [INFO] [/common/dao/base.go:67]: Registering database: type-PostgreSQL host-harbor-db-rw.harbor-system.svc.cluster.local port-5432 database-harbor sslmode-"disable"
2024-10-25T14:03:22Z [INFO] [/common/dao/base.go:72]: Register database completed
2024-10-25T14:03:22Z [INFO] [/pkg/exporter/exporter.go:80]: collector HealthCollector registered ...
2024-10-25T14:03:22Z [INFO] [/pkg/exporter/exporter.go:80]: collector SystemInfoCollector registered ...
2024-10-25T14:03:22Z [INFO] [/pkg/exporter/exporter.go:80]: collector ProjectCollector registered ...
2024-10-25T14:03:22Z [INFO] [/pkg/exporter/exporter.go:80]: collector JobServiceCollector registered ...
2024-10-25T14:03:22Z [INFO] [/cmd/exporter/main.go:86]: Starting harbor_exporter with port=0 path=/metrics metrics=true max_request=0 tls=false cert= key= cache_time=23 clean_interval=14400
Name:             harbor-exporter-7b4fc45fcd-zvqr4
Namespace:        harbor-system
Priority:         0
Service Account:  default
Node:             <redacted>
Start Time:       Thu, 10 Oct 2024 09:24:21 +0200
Labels:           app=harbor
                  app.kubernetes.io/component=exporter
                  app.kubernetes.io/instance=harbor
                  app.kubernetes.io/managed-by=Helm
                  app.kubernetes.io/name=harbor
                  app.kubernetes.io/part-of=harbor
                  app.kubernetes.io/version=2.11.1
                  chart=harbor
                  component=exporter
                  heritage=Helm
                  pod-template-hash=7b4fc45fcd
                  release=harbor
Annotations:      checksum/configmap: 3671b0bd0e0de7f1bffc650b09d00886dc647c5e34e88d398a6a8d1d2cdb4d03
                  checksum/secret: be1b09e9e24f666fd357cca51bb49abd966708df0bd2e97078bf88db7ffddf85
                  kubectl.kubernetes.io/restartedAt: 2024-09-30T10:00:58+02:00
Status:           Running
IP:               10.99.44.230
IPs:
  IP:           10.99.44.230
Controlled By:  ReplicaSet/harbor-exporter-7b4fc45fcd
Containers:
  exporter:
    Container ID:    cri-o://aa77f61dedfd9e08a060d946c3266cfbcd6b858261dd4097c6155feb0a18c819
    Image:           goharbor/harbor-exporter:v2.11.1
    Image ID:        docker.io/goharbor/harbor-exporter@sha256:22caf9ff7131a278674bff2ed2494d7a47ee49ee6a8c6ed859740000d0322bca
    Port:            8001/TCP
    Host Port:       0/TCP
    SeccompProfile:  RuntimeDefault
    Args:
      -log-level
      info
    State:          Running
      Started:      Fri, 25 Oct 2024 16:03:22 +0200
    Last State:     Terminated
      Reason:       Error
      Exit Code:    2
      Started:      Fri, 25 Oct 2024 15:57:52 +0200
      Finished:     Fri, 25 Oct 2024 16:03:21 +0200
    Ready:          False
    Restart Count:  4000
    Liveness:       http-get http://:8001/ delay=300s timeout=1s period=10s #success=1 #failure=3
    Readiness:      http-get http://:8001/ delay=30s timeout=1s period=10s #success=1 #failure=3
    Environment Variables from:
      harbor-exporter-env  ConfigMap  Optional: false
      harbor-exporter      Secret     Optional: false
    Environment:
      HARBOR_DATABASE_PASSWORD:  <set to the key 'password' in secret 'harbor-db-credentials'>  Optional: false
    Mounts:                      <none>
Conditions:
  Type                        Status
  PodReadyToStartContainers   True
  Initialized                 True
  Ready                       False
  ContainersReady             False
  PodScheduled                True
Volumes:
  config:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  harbor-exporter
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                 node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason     Age                     From     Message
  ----     ------     ----                    ----     -------
  Warning  Unhealthy  82s (x142692 over 15d)  kubelet  Readiness probe failed: Get "http://10.99.44.230:8001/": EOF

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

2 participants