Closed harshguptaserver closed 2 weeks ago
Add the issue is strange because even after editing the nginx.conf, nginx container and ui works, since core is crashing login fails and everything is down:
root@server:/home/pi/harbour/harbor# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
82459a7b7189 goharbor/nginx-photon:v1.10.19 "nginx -g 'daemon of…" 7 minutes ago Up About a minute (healthy) 0.0.0.0:80->8080/tcp, [::]:80->8080/tcp, 0.0.0.0:443->8443/tcp, [::]:443->8443/tcp nginx
39d82f220b2e goharbor/harbor-jobservice:v1.10.19 "/harbor/harbor_jobs…" 7 minutes ago Up 11 seconds (health: starting) harbor-jobservice
b57cffb54008 goharbor/harbor-core:v1.10.19 "/harbor/harbor_core" 7 minutes ago Restarting (1) 25 seconds ago harbor-core
246fc8051956 goharbor/harbor-portal:v1.10.19 "nginx -g 'daemon of…" 7 minutes ago Up About a minute (healthy) 8080/tcp harbor-portal
dc117ad9e316 goharbor/harbor-registryctl:v1.10.19 "/home/harbor/start.…" 7 minutes ago Up About a minute (healthy) registryctl
8184e5413183 goharbor/registry-photon:v1.10.19 "/home/harbor/entryp…" 7 minutes ago Up About a minute (healthy) 5000/tcp registry
8e48cc538cc8 goharbor/harbor-db:v1.10.19 "/docker-entrypoint.…" 7 minutes ago Up About a minute (health: starting) 5432/tcp harbor-db
4337c0912136 goharbor/redis-photon:v1.10.19 "redis-server /etc/r…" 7 minutes ago Up About a minute (healthy) 6379/tcp redis
de1c34bd741c goharbor/harbor-log:v1.10.19 "/bin/sh -c /usr/loc…" 7 minutes ago Up About a minute (healthy) 127.0.0.1:1514->10514/tcp harbor-log
root@server:/home/pi/harbour/harbor# curl https://container-registry.example.com -k
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Harbor</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico?v=2">
<link rel="stylesheet" href="styles.701dc5ee3007bd83bfa4.css"></head>
<body>
<harbor-app>
<div class="spinner spinner-lg app-loading">
Loading...
</div>
</harbor-app>
<script src="runtime.9ad22a88fcc70a015907.js" defer></script><script src="polyfills-es5.d01e8ad6bc0c07b49ab6.js" nomodule defer></script><script src="scripts.7fa3fa51e1a86dfba2c8.js" defer></script><script src="main.7d1007223a0d5be240a8.js" defer></script></body>
hi, please try your scenario with latest harbor release v2.11.1.
Hi @harshguptaserver ,
# SSL
ssl_certificate /etc/cert/server.crt;
ssl_certificate_key /etc/cert/server.key;
Solved,
Amazing @wy65701436 thank you :-) i mistakenly was trying the older version.
ssl_stapling on;
ssl_stapling_verify on;
resolver 1.1.1.1 1.0.0.1 [2606:4700:4700::1111] [2606:4700:4700::1001] valid=300s;
resolver_timeout 10s;
ssl_trusted_certificate /etc/cert/server.crt;
and everything is working.
Thank you once again @MinerYang / @wy65701436 for the quick responses and helping figure this out.
ask: edit nginx.conf file to add oscp support
I am using letsencrypt signed certificate in harbor.yml , the certificate works fine in google chrome browser but for firefox and others i get TLS warning ( it seems something to do with ocsp stapling )
if i do docker compose down and docker compose up without editing nginx file , it all works fine.
issue
On checking the harbor core container logs it seems to have password issues, which makes no sense as i only added 1 line in nginx and restarted ( docker compose down ; edit nginx ; docker compose up)
Please help clarify how to edit nginx.conf safely and avoid harbor-core crashing