Resolving Issues on GoHarbor/Harbor (CNCF)

Error Picture:

  1. GC or Jobs are not executed either manual or automatically
  2. Jobs are staying pending
  3. You’ll find an error like this in the logs:
ERROR: worker.fetch - LOADING Redis is loading the dataset in memory

Solution:

$ docker ps |grep -i redis
$ docker exec -it <container_id_or_name> bash
redis-cli FLUSHDB
redis-cli -n DB_NUMBER FLUSHDB
redis-cli -n DB_NUMBER FLUSHDB ASYNC
redis-cli FLUSHALL
redis-cli FLUSHALL ASYNC

Error Picture:

  1. Replication can not be stopped/started and jobs are Pending
  2. The result is, you cant delete a failing replication job.
  3. You see “internal server error”

Solution:

\d replication_execution;
update replication_execution set status = 'Succeed',total = '1', end_time = now()

Error Picture:

  1. Your certificate needs to be replaced because it is about to expire.

Solution:

  1. Replace the certificiate + private key in your harbor installation folder
    In my case this was /opt/harbor/ssl/xyz.crt.pem and /opt/harbor/ssl/xyz.key.pem
  2. Replace both on the running instance of harbor (when installing it, it copies those files into another directory) so do the following:
# Copy the certificate
$ cp /opt/harbor/ssl/xyz.crt.pem /var/harbor/data/secret/cert/server.crt
# Copy the key
$ cp /opt/harbor/ssl/xyz.key.pem /var/harbor/data/secret/cert/server.key
$ docker ps  |grep goharbor  |grep "nginx -g" | awk '{print $1}'
c1498j072f44
27f4lg4db7a6
$ docker restart c1498j072f44 27f4lg4db7a6

Error Picture: (Update 2021–03–18)

  1. The logs show the following error
ERROR: dead_pool_reaper.reap - MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk.

Solution

$ redis-cli config 
127.0.0.1:6379> set stop-writes-on-bgsave-error no

Error Picture: (Update 2021–11–15)

  1. The Vulnurability database does not update
harbor.scanner-adapter/vulnerability-database-updated-at:05/7/20, 7:40 AM

Solution

trivy-adapter:
[...]
volumes:
- type: bind
read_only: true
source: /var/run/docker.sock
target: /var/run/docker.sock
[...]
$ docker exec -it trivy-adapter trivy image debian:10
2021-11-15T08:08:13.413Z INFO Need to update DB
2021-11-15T08:08:13.413Z INFO Downloading DB...24.71 MiB / 24.71 MiB [--------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 11.25 MiB p/s 3s2021-11-15T08:08:18.599Z INFO Detecting Debian vulnerabilities...
harbor.scanner-adapter/vulnerability-database-updated-at:11/15/21, 7:40 AM

Sources

--

--

--

Working as a IT-Operations engineer at NeXenio, a spin-off by Hasso-Plattner-Institute for products around a digitial workspace.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to create your basic working CRUD application using Node Mongo and exposing the services using…

APM-less SAP Commerce performance analysis

Useful Python Operators

Useful Python Operators

Run a $DERO Node/Daemon on Windows

Life is a journey of twists and turns, peaks and valleys, mountains to climb and oceans to explore.

How to join EddieHub

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
D. Heinrich

D. Heinrich

Working as a IT-Operations engineer at NeXenio, a spin-off by Hasso-Plattner-Institute for products around a digitial workspace.

More from Medium

GitHub: 2 branches on PR workflow

Org ID, Org Attach & Better Folder Names

Are Sitecore Containers optimized for disk space?

Practical Progressive Delivery with Argo Rollouts — Setup