K-PaaS 로고

SUPPORT

  1. SUPPORT
    • 가이드
    • 다운로드
    • 문의하기
    • 기술지원 신청
    • 인증서비스

묻고 답하기

기술지원harbor 설치 오류2
코* 2024-09-26 15:25:12
  • hits81

안녕하세요.

결과 보내드립니다.

 

appservice@master02:~$ kubectl get pod -n harbor -o wide
NAME                                       READY   STATUS             RESTARTS      AGE   IP              NODE       NOMINATED NODE   READINESS GATES
cp-harbor-chartmuseum-dbd456764-nnbj7      1/1     Running            0             64s   10.233.94.91    worker02   <none>           <none>
cp-harbor-core-f67bbc5d8-p7qmc             1/1     Running            0             64s   10.233.94.83    worker02   <none>           <none>
cp-harbor-database-0                       1/1     Running            0             64s   10.233.94.108   worker02   <none>           <none>
cp-harbor-jobservice-695c5b9f56-wr7ww      0/1     CrashLoopBackOff   1 (41s ago)   64s   10.233.94.100   worker02   <none>           <none>
cp-harbor-notary-server-658477db7f-7vm6z   0/1     Error              0             64s   10.233.94.84    worker02   <none>           <none>
cp-harbor-notary-signer-786f858957-gtp8h   1/1     Running            1 (31s ago)   64s   10.233.94.86    worker02   <none>           <none>
cp-harbor-portal-776646487f-fkcd5          1/1     Running            0             64s   10.233.94.85    worker02   <none>           <none>
cp-harbor-redis-0                          1/1     Running            0             64s   10.233.94.121   worker02   <none>           <none>
cp-harbor-registry-76d796f96d-cqz9b        2/2     Running            0             64s   10.233.94.71    worker02   <none>           <none>
cp-harbor-trivy-0                          1/1     Running            0             64s   10.233.94.124   worker02   <none>           <none>
appservice@master02:~$ kubectl describe pod cp-harbor-database-0 -n harbor
Name:             cp-harbor-database-0
Namespace:        harbor
Priority:         0
Service Account:  default
Node:             worker02/192.168.15.15
Start Time:       Thu, 26 Sep 2024 15:22:48 +0900
Labels:           app=harbor
                  apps.kubernetes.io/pod-index=0
                  chart=harbor
                  component=database
                  controller-revision-hash=cp-harbor-database-676b7cd65b
                  heritage=Helm
                  release=cp-harbor
                  statefulset.kubernetes.io/pod-name=cp-harbor-database-0
Annotations:      checksum/secret: 2c8120be9be143d2bacfbac4d634d7d8983e3184ffd9e7eb5b51ea3ae038f44b
                  cni.projectcalico.org/containerID: 441ed46a2b23caaa58aa377b6cf9ecb3aa976efa78b9a03c73518709ffb61422
                  cni.projectcalico.org/podIP: 10.233.94.108/32
                  cni.projectcalico.org/podIPs: 10.233.94.108/32
Status:           Running
IP:               10.233.94.108
IPs:
  IP:           10.233.94.108
Controlled By:  StatefulSet/cp-harbor-database
Init Containers:
  data-migrator:
    Container ID:    cri-o://d118a23893f564c3cb5fdcd10f795fd264b4e00666f037a9431d357bb216c04c
    Image:           goharbor/harbor-db:v2.6.0
    Image ID:        4892019f0afcf4fd8cb86d1021529b942794d9cec4e11761a303569018dbaa54
    Port:            <none>
    Host Port:       <none>
    SeccompProfile:  RuntimeDefault
    Command:
      /bin/sh
    Args:
      -c
      [ -e /var/lib/postgresql/data/postgresql.conf ] && [ ! -d /var/lib/postgresql/data/pgdata ] && mkdir -m 0700 /var/lib/postgresql/data/pgdata && mv /var/lib/postgresql/data/* /var/lib/postgresql/data/pgdata/ || true
    State:          Terminated
      Reason:       Completed
      Exit Code:    0
      Started:      Thu, 26 Sep 2024 15:23:01 +0900
      Finished:     Thu, 26 Sep 2024 15:23:01 +0900
    Ready:          True
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /var/lib/postgresql/data from database-data (rw)
  data-permissions-ensurer:
    Container ID:    cri-o://108624ae5f693e672c426bad9f040697534971ea4dace4549440d169cfa9aaba
    Image:           goharbor/harbor-db:v2.6.0
    Image ID:        4892019f0afcf4fd8cb86d1021529b942794d9cec4e11761a303569018dbaa54
    Port:            <none>
    Host Port:       <none>
    SeccompProfile:  RuntimeDefault
    Command:
      /bin/sh
    Args:
      -c
      chmod -R 700 /var/lib/postgresql/data/pgdata || true
    State:          Terminated
      Reason:       Completed
      Exit Code:    0
      Started:      Thu, 26 Sep 2024 15:23:11 +0900
      Finished:     Thu, 26 Sep 2024 15:23:11 +0900
    Ready:          True
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /var/lib/postgresql/data from database-data (rw)
Containers:
  database:
    Container ID:    cri-o://b0a88a84304f5e2a59e2092096272e26d66c28d86598e41b3044aa201f414e95
    Image:           goharbor/harbor-db:v2.6.0
    Image ID:        4892019f0afcf4fd8cb86d1021529b942794d9cec4e11761a303569018dbaa54
    Port:            <none>
    Host Port:       <none>
    SeccompProfile:  RuntimeDefault
    State:           Running
      Started:       Thu, 26 Sep 2024 15:23:14 +0900
    Ready:           True
    Restart Count:   0
    Liveness:        exec [/docker-healthcheck.sh] delay=300s timeout=1s period=10s #success=1 #failure=3
    Readiness:       exec [/docker-healthcheck.sh] delay=1s timeout=1s period=10s #success=1 #failure=3
    Environment Variables from:
      cp-harbor-database  Secret  Optional: false
    Environment:
      PGDATA:  /var/lib/postgresql/data/pgdata
    Mounts:
      /dev/shm from shm-volume (rw)
      /var/lib/postgresql/data from database-data (rw)
Conditions:
  Type              Status
  Initialized       True
  Ready             True
  ContainersReady   True
  PodScheduled      True
Volumes:
  database-data:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  database-data-cp-harbor-database-0
    ReadOnly:   false
  shm-volume:
    Type:        EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:      Memory
    SizeLimit:   512Mi
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  FailedScheduling  68s                default-scheduler  0/5 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/5 nodes are available: 5 Preemption is not helpful for scheduling..
  Warning  FailedScheduling  67s                default-scheduler  0/5 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/5 nodes are available: 5 Preemption is not helpful for scheduling..
  Normal   Scheduled         65s                default-scheduler  Successfully assigned harbor/cp-harbor-database-0 to worker02
  Normal   Pulling           65s                kubelet            Pulling image "goharbor/harbor-db:v2.6.0"
  Normal   Pulled            53s                kubelet            Successfully pulled image "goharbor/harbor-db:v2.6.0" in 2.027s (12.273s including waiting)
  Normal   Created           53s                kubelet            Created container data-migrator
  Normal   Started           53s                kubelet            Started container data-migrator
  Normal   Pulling           52s                kubelet            Pulling image "goharbor/harbor-db:v2.6.0"
  Normal   Pulled            43s                kubelet            Successfully pulled image "goharbor/harbor-db:v2.6.0" in 1.9s (9.171s including waiting)
  Normal   Created           43s                kubelet            Created container data-permissions-ensurer
  Normal   Started           43s                kubelet            Started container data-permissions-ensurer
  Normal   Pulling           42s                kubelet            Pulling image "goharbor/harbor-db:v2.6.0"
  Normal   Pulled            40s                kubelet            Successfully pulled image "goharbor/harbor-db:v2.6.0" in 1.915s (1.915s including waiting)
  Normal   Created           40s                kubelet            Created container database
  Normal   Started           40s                kubelet            Started container database
  Warning  Unhealthy         35s (x3 over 39s)  kubelet            Readiness probe failed: psql: error: could not connect to server: Connection refused
           Is the server running on host "localhost" (127.0.0.1) and accepting
           TCP/IP connections on port 5432?
appservice@master02:~$ kubectl logs cp-harbor-database-0 -n harbor
Defaulted container "database" out of: database, data-migrator (init), data-permissions-ensurer (init)
ls: cannot access '/var/lib/postgresql/data/pgdata': No such file or directory
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locales
  COLLATE:  en_US.UTF-8
  CTYPE:    en_US.UTF-8
  MESSAGES: C
  MONETARY: C
  NUMERIC:  C
  TIME:     C
The default text search configuration will be set to "english".

Data page checksums are disabled.

creating directory /var/lib/postgresql/data/pgdata/pg13 ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok


Success. You can now start the database server using:

    pg_ctl -D /var/lib/postgresql/data/pgdata/pg13 -l logfile start

initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
−−auth-local and −−auth-host, the next time you run initdb.
postgres
waiting for server to start....2024-09-26 06:23:20.439 UTC [48] LOG:  starting PostgreSQL 13.8 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 10.2.0, 64-bit
2024-09-26 06:23:20.439 UTC [48] LOG:  listening on Unix socket "/run/postgresql/.s.PGSQL.5432"
2024-09-26 06:23:20.448 UTC [49] LOG:  database system was shut down at 2024-09-26 06:23:19 UTC
2024-09-26 06:23:20.458 UTC [48] LOG:  database system is ready to accept connections
 done
server started
ALTER ROLE


/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/initial-notaryserver.sql
CREATE DATABASE
CREATE ROLE
ALTER ROLE
GRANT


/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/initial-notarysigner.sql
CREATE DATABASE
CREATE ROLE
ALTER ROLE
GRANT


/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/initial-registry.sql
CREATE DATABASE
You are now connected to database "registry" as user "postgres".
CREATE TABLE


waiting for server to shut down...2024-09-26 06:23:22.642 UTC [48] LOG:  received fast shutdown request
.2024-09-26 06:23:22.643 UTC [48] LOG:  aborting any active transactions
2024-09-26 06:23:22.645 UTC [48] LOG:  background worker "logical replication launcher" (PID 55) exited with exit code 1
2024-09-26 06:23:22.647 UTC [50] LOG:  shutting down
2024-09-26 06:23:22.693 UTC [48] LOG:  database system is shut down
 done
server stopped

PostgreSQL init process complete; ready for start up.

2024-09-26 06:23:22.833 UTC [1] LOG:  starting PostgreSQL 13.8 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 10.2.0, 64-bit
2024-09-26 06:23:22.834 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-09-26 06:23:22.834 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2024-09-26 06:23:22.835 UTC [1] LOG:  listening on Unix socket "/run/postgresql/.s.PGSQL.5432"
2024-09-26 06:23:22.848 UTC [66] LOG:  database system was shut down at 2024-09-26 06:23:22 UTC
2024-09-26 06:23:22.862 UTC [1] LOG:  database system is ready to accept connections
 

감사합니다.

안녕하세요 개방형 클라우드 플랫폼 센터입니다.

현재 보내주신 로그만으로는 정확한 원인 파악이 어렵습니다. 

앞 전에 보내드린 답변의 명령어를 참고하셔서 ImagePullBackOff, Error, ErrImagePull 상태인 모든 파드들에 대한 이벤트와 PV에 대한 리소스 바인딩 상태, provisioner 상태도 조회하여 보내주시기 바랍니다. 

https://k-paas.or.kr/notice/qnaView/2699?query=&query_type=all&query_type1=all&query_type2=all&start=1

로그 보내주실 때 텍스트 파일에 전체 로그를 입력하여 첨부 부탁드립니다.

감사합니다.

 

알 림

필수입력 값 모달창