0.23版猪齿鱼,rdupm-docker-robot-create事务出错

创建项目成功,之后创建harbor失败,使用默认的admin账户创建的这个项目。
image

重新执行该事务
在prod-repo-service中查看到报错信息如下


请参考:事务任务运行失败 rdupm-docker-robot-create

制品库服务部署之后,saga任务没有完全刷新进来
1.使用postman执行接口刷新任务 post请求
hagd/v1/sagas/fresh?serviceName=prod-repo-service

2.清理脏数据,hrds_prod_repo数据库
delete from rdupm_harbor_repository where harbor_id = -1;

saga事务刷新之后,如果使用admin用户创建会报错
io.choerodon.core.exception.CommonException: User need to log in first. or User has no permission to the source project or destination project.

错误原因:
如果admin用户创建项目,数据库会新增admin用户,但是harbor中已经存在了admin用户,不会新增也不会修改密码。导致两边密码不一致。这个是0.23.0的bug,之后制品库会升级版本。

解决方案:
1)更新数据库中admin的密码,如果数据库不存在admin用户,可以手动新增一条
update rdupm_prod_user set password = ‘XXXX’ , pwd_update_flag = 0 where login_name = ‘admin’;

2)升级制品库版本到0.23.6

制品库已升级到0.23.6,目前看,执行“rdupm-docker-robot-create”这个事务还是会失败。

报什么错,能截图吗,平台管理—事务实例可以看到错误详情的哈

事务里的异常信息

java.lang.NullPointerException
at org.hrds.rdupm.harbor.app.service.impl.HarborRobotServiceImpl.createRobot(HarborRobotServiceImpl.java:83)
at org.hrds.rdupm.harbor.app.service.impl.HarborRobotServiceImpl.generateRobot(HarborRobotServiceImpl.java:146)
at org.hrds.rdupm.harbor.app.service.impl.HarborRobotServiceImpl$$FastClassBySpringCGLIB$$125d5cb6.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684)
at org.hrds.rdupm.harbor.app.service.impl.HarborRobotServiceImpl$$EnhancerBySpringCGLIB$$ccd8d31.generateRobot()
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at io.choerodon.asgard.saga.consumer.SagaConsumer.invoke(SagaConsumer.java:85)
at io.choerodon.asgard.saga.consumer.SagaConsumer.lambda$null$0(SagaConsumer.java:57)
at io.choerodon.asgard.saga.consumer.SagaConsumer$$Lambda$845/000000006477D940.get(Unknown Source)
at java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

另外在harbor-core中看到创建robot时,有这两个报错