컨테이너 레지스트리 메타데이터 데이터베이스 문제 해결
컨테이너 레지스트리 메타데이터 데이터베이스 문제 해결.
오류: there are pending database migrations # 레지스트리가 업데이트되고 보류 중인 스키마 마이그레이션이 있는 경우, 레지스트리는 다음 오류 메시지와 함께 시작에 실패합니다: FATA[0000] configuring application: there are pending database migrations, use the 'registry database migrate' CLI command to check and apply them 이 문제를 해결하려면 데이터베이스 마이그레이션 적용 단계를 따르십시오. 18.3 이전 버전에서는 각 버전 업그레이드 시 수동으로 데이터베이스 마이그레이션을 적용해야 합니다. 오류: offline garbage collection is no longer possible # 레지스트리가 메타데이터 데이터베이스를 사용하는데 오프라인 가비지 컬렉션 을 실행하려고 하면, 레지스트리가 다음 오류 메시지와 함께 실패합니다: ERRO[0000] this filesystem is managed by the metadata database, and offline garbage collection is no longer possible, if you are not using the database anymore, remove the file at the lock_path in this log message lock_path=/docker/registry/lockfiles/database-in-use 다음 중 하나를 수행해야 합니다: 오프라인 가비지 컬렉션 사용을 중단합니다. 메타데이터 데이터베이스를 더 이상 사용하지 않는 경우, 오류 메시지에 표시된 lock_path 에 있는 잠금 파일을 삭제합니다. 예를 들어, /docker/registry/lockfiles/database-in-use 파일을 제거합니다. 오류: cannot execute in a read-only transaction # 레지스트리가 다음 오류 메시지와 함께 데이터베이스 마이그레이션 적용 에 실패할 수 있습니다: err="ERROR: cannot execute CREATE TABLE in a read-only transaction (SQLSTATE 25006)" 또한 온라인 가비지 컬렉션 을 실행하려고 하면 레지스트리가 다음 오류 메시지와 함께 실패할 수 있습니다: error="processing task: fetching next GC blob task: scanning GC blob task: ERROR: cannot execute SELECT FOR UPDATE in a read-only transaction (SQLSTATE 25006)" PostgreSQL 콘솔에서 default_transaction_read_only 및 transaction_read_only 값을 확인하여 읽기 전용 트랜잭션이 비활성화되어 있는지 확인해야 합니다. 예를 들어: # SHOW default_transaction_read_only; def
