harbor同步任务异常处理

harbor同步任务异常处理

部署方式:docker-compose部署harbor
1.连接harbor的pgsql数据库

docker exec -it harbor-db bash

2.进入pgsql仓库

psql -U postgres -d postgres -h 127.0.0.1 -p 5432

密码是默认密码:root123,可以从docker-compose.yaml等配置文件中找到

3.查看数据库

postgres=# \l
                                   List of databases
     Name     |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges   
--------------+----------+----------+-------------+-------------+-----------------------
 notaryserver | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres         +
              |          |          |             |             | postgres=CTc/postgres+
              |          |          |             |             | server=CTc/postgres
 notarysigner | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres         +
              |          |          |             |             | postgres=CTc/postgres+
              |          |          |             |             | signer=CTc/postgres
 postgres     | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 registry     | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 template0    | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
              |          |          |             |             | postgres=CTc/postgres
 template1    | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
              |          |          |             |             | postgres=CTc/postgres

可以查看到registry是harbor的使用仓库

4.切换到registry仓库

\c registry

5.查看表,可从英文判断replication_XXXXX的表和复制同步有关系。

正在执行复制任务的表为replication_execution

查看表结构\d replication_execution

select * from  replication_execution;

6.停止所有正在的任务

update replication_execution set status = 'Failed',total = '1',end_time = now() where status='InProgress';

完成后退出。

7.停止所有缓存任务。

docker exec -it redis bash
redis-cli
查看数据
keys *
清理缓存数据
flushdb
再次查看数据
keys *

解决完毕

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值