Troubleshooting Harbor Installation

The following sections help you to solve problems when installing Harbor.

Access Harbor Logs

By default, registry data is persisted in the host’s /data/ directory. This data remains unchanged even when Harbor’s containers are removed and/or recreated, you can edit the data_volume in harbor.yml file to change this directory.

In addition, Harbor uses rsyslog to collect the logs of each container. By default, these log files are stored in the directory /var/log/harbor/ on the target host for troubleshooting, also you can change the log directory in harbor.yml.

Harbor Does Not Start or Functions Incorrectly

If Harbor does not start or functions incorrectly, run the following command to check whether all of Harbor’s containers are in the Up state.

sudo docker-compose ps
        Name                     Command               State                    Ports
  harbor-core         /harbor/                 Up
  harbor-db           / postgres          Up      5432/tcp
  harbor-jobservice   /harbor/                 Up
  harbor-log          /bin/sh -c /usr/local/bin/ ...   Up>10514/tcp
  harbor-portal       nginx -g daemon off;             Up      80/tcp
  nginx               nginx -g daemon off;             Up>443/tcp,>4443/tcp,>80/tcp
  redis      redis ...   Up      6379/tcp
  registry            / /etc/regist ...   Up      5000/tcp
  registryctl         /harbor/                 Up

If a container is not in the Up state, check the log file for that container in /var/log/harbor. For example, if the harbor-core container is not running, look at the core.log log file.

Using nginx or Load Balancing

If Harbor is running behind an nginx proxy or elastic load balancing, open the file common/config/nginx/nginx.conf and search for the following line.

proxy_set_header X-Forwarded-Proto $scheme;

If the proxy already has similar settings, remove it from the sections location /, location /v2/ and location /service/ and redeploy Harbor. For instructions about how to redeploy Harbor, see Reconfigure Harbor and Manage the Harbor Lifecycle.

Troubleshoot HTTPS Connections

If you use an intermediate certificate from a certificate issuer, merge the intermediate certificate with your own certificate to create a certificate bundle. Run the following command.

cat intermediate-certificate.pem >>

When the Docker daemon runs on certain operating systems, you might need to trust the certificate at the OS level. For example, run the following commands.

  • Ubuntu:

    cp /usr/local/share/ca-certificates/ 
  • Red Hat (CentOS etc):

    cp /etc/pki/ca-trust/source/anchors/