Tag Archives: Harbor

[Solved] Harbor image replicate Error: Fetchartifacts error when collect tags for repos

Solution:

https://github.com/goharbor/harbor/issues/12003

postgresql.conf:
sudo sed 's/max_connections =.*/max_connections=999/g'

This issue is because the postgres database connection exceeded.
The default max connection is 100.
However ever it's still not working even set database.max_open_conns in harbor.yaml.
You have to also manually edit postgresql.conf like
sudo sed 's/max_connections =.*/max_connections=999/g' /data/database/postgresql.conf
and restart harbor-db

track db issue with #12124

Solve the problem that Gabor can’t start itself after the server is restarted

Questions

When the server deployed with Gabor restarts, it may appear that Gabor can’t follow the system to start itself

Solution

Now assume that the location of the installation directory of Gabor is/usr/local/Gabor. After the installation of Gabor, the docker-compose.yml configuration file will be generated in this directory. You can use docker compose to operate this file to control the startup and shutdown of Gabor.

Next, write a system D service that starts from Gabor, named Gabor. Service (placed in the/etc/system/system directory)

[Unit]
Description=harbor
After=docker.service systemd-networkd.service systemd-resolved.service
Requires=docker.service
Documentation=http://github.com/vmware/harbor

[Service]
Type=simple
Restart=on-failure
RestartSec=5
ExecStart=/usr/local/bin/docker-compose -f  /usr/local/harbor/docker-compose.yml up
ExecStop=/usr/local/bin/docker-compose -f  /usr/local/harbor/docker-compose.yml down

[Install]
WantedBy=multi-user.target

After writing, use systemctl enable harbor.service to set the boot time. Then restart the server for testing.