0.23.0版本应用流水线构建错误(no custom or default warehouse configuration exists)


`Running with gitlab-runner 11.11.4 (e828d3bc)
on gitlab-runner-5d9f4dc86b-lgfl4 6BIrnfqZ
Using Kubernetes namespace: c7n-system
Using Kubernetes executor with image registry.cn-shanghai.aliyuncs.com/c7n/cibase:0.9.1
Waiting for pod c7n-system/runner-6birnfqz-project-1-concurrent-0f6s8l to be running, status is Pending
Waiting for pod c7n-system/runner-6birnfqz-project-1-concurrent-0f6s8l to be running, status is Pending
Waiting for pod c7n-system/runner-6birnfqz-project-1-concurrent-0f6s8l to be running, status is Pending
Running on runner-6birnfqz-project-1-concurrent-0f6s8l via gitlab-runner-5d9f4dc86b-lgfl4…
Initialized empty Git repository in /builds/operation-glpt/questionnaire-host/.git/
Fetching changes…
Created fresh repository.
From http://gitlab.yntengyun.com/operation-glpt/questionnaire-host

  • [new branch] master -> origin/master
    Checking out 79baa1bc as master…

Skipping Git submodules setup
Checking cache for 79baa1bcd633f9e2f43db13e93ab11c5aef610d3…
No URL provided, cache will not be downloaded from shared cache server. Instead a local version of cache will be extracted.
Successfully extracted cache
$ http_status_code=curl -o .auto_devops.sh -s -m 10 --connect-timeout 10 -w %{http_code} "${CHOERODON_URL}/devops/ci?token=${Token}&type=microservice" # collapsed multi-line command
{“failed”:true,“code”:“no custom or default warehouse configuration exists”,“message”:"io.choerodon.devops.infra.exception.DevopsCiInvalidException: no custom or default warehouse configuration exists\n\tat io.choerodon.devops.app.service.impl.AppServiceServiceImpl.queryFile(AppServiceServiceImpl.java:1011)\n\tat io.choerodon.devops.app.service.impl.AppServiceServiceImpl$$FastClassBySpringCGLIB$$e2351bf.invoke()\n\tat org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)\n\tat org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684)\n\tat io.choerodon.devops.app.service.impl.AppServiceServiceImpl$$EnhancerBySpringCGLIB$$b8d82632.queryFile()\n\tat io.choerodon.devops.api.controller.v1.CiController.queryFile(CiController.java:69)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)\n\tat java.lang.reflect.Method.invoke(Unknown Source)\n\tat org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209)\n\tat org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)\n\tat org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)\n\tat org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:891)\n\tat org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)\n\tat org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n\tat org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)\n\tat org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)\n\tat org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)\n\tat org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:866)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:635)\n\tat org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:742)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n\tat org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n\tat org.hzero.mybatis.parser.autoconfigure.SqlParserInterceptorConfiguration$SqlParserAutoClearFilter.doFilter(SqlParserInterceptorConfiguration.java:52)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n\tat org.hzero.core.jackson.config.ObjectMapperConfiguration$SensitiveAutoCloseFilter.doFilter(ObjectMapperConfiguration.java:51)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n\tat org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:90)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n\tat org.hzero.starter.keyencrypt.mvc.EncryptHeaderContextFilter.doFilter(EncryptHeaderContextFilter.java:34)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)\n\tat org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)\n\tat org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\n\tat org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\n\tat org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\n\tat org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\n\tat org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\n\tat org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\n\tat org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\n\tat org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\n\tat org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\n\tat org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\n\tat org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)\n\tat org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)\n\tat org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)\n\tat org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n\tat org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n\tat org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n\tat org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n\tat org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:155)\n\tat org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:123)\n\tat org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:108)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n\tat org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n\tat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)\n\tat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\n\tat org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)\n\tat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)\n\tat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)\n\tat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)\n\tat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)\n\tat org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)\n\tat org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\n\tat org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)\n\tat org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)\n\tat org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)\n\tat org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n\tat java.lang.Thread.run(Unknown Source)\nCaused by: io.choerodon.core.exception.CommonException: no custom or default warehouse configuration exists\n\tat io.choerodon.devops.app.service.impl.HarborServiceImpl.queryRepoConfigToDevopsConfig(HarborServiceImpl.java:111)\n\tat io.choerodon.devops.app.service.impl.AppServiceServiceImpl.queryFile(AppServiceServiceImpl.java:982)\n\t… ERROR: Job failed: command terminated with exit code 1`

这个错误的提示是对应的应用服务没有关联harbor仓库的原因,看看制品库菜单下有没有仓库的配置。

你好,制品库下面有一个默认仓库。

在ci报错的应用服务下面,看看这个应用服务的Docker仓库配置是否关联了仓库

补充一张仓库的详情图片,显示有点奇怪

没有关联,显示无匹配结果

遇到同样的问题,同问,这个该怎么解决

如果是新建的项目出现这个问题就去平台层的事务管理,看看创建项目的事务抛了什么错,如果是升级上来的就看看任务管理的这几个任务执行情况,要全部正确执行后仓库才算迁移完毕

我是新部署的0.23.0 事务里面没有关于harbor的,其他都成功的

我这边也是同样的问题,请问怎么处理?

我这边也是同样的问题,希望优先处理

出现这个错误的原因是应用服务没有关联上默认的仓库,创建应用服务成功后,会自动的创建仓库并且关联上。没有关联上的原因可以去平台层事务管理看看创建项目的事务是否成功,仓库创建的事务是否成功.
image

其次如果是升级上来的旧项目出现这个问题,需要看看平台层的任务管理迁移仓库的任务是不是运行了,如果没有运行看看asgrd-service数据库的asgard-quartz_method表是否将自动任务扫进去了,在平台层的任务管理也可以看到.


并且运行的日志运行状态不能出现异常,如果出现异常,看看异常日志是不是数据库连接填错了等等之类的错误。

上边几步排查完成后如果还有问题再贴出错误。

大哥,大部分从V0.22好的功能,到v0.23 都出现问题了额,你说的任务根本就没有,麻烦查下,或者有回退方案吗?

典型问题:
1、项目中 创建应用服务 调用gitlab 失败
2、CI接口 /devops/ci?token=${Token}&type=microservice 报错
3、制品库 代码库 全部报错 ,还没测试完吧?

没有相关的任务记录说明你升级就还没有完成,可以尝试重启制品库,代码库相关的服务,重新扫入自动任务,必须确保任务正确执行完成,ci和相关制品库,代码库的功能才能使用。上面的排错步骤说的很清楚了。

你好~我们肯定是测试完了的
出现以上问题的原因是 迁移数据的定时任务没有刷进数据库,导致你们没有执行到对应的迁移逻辑
目前的解决方案是调用以下接口:
网关地址/hagd/v1/sagas/fresh?serviceName=prod-repo-service 手动刷新下:

  1. 请求方式:POST
  2. 参数:serviceName(服务名)(devops服务名+制品库服务名)

然后检查下平台层-》任务管理 0.23迁移相关的任务是否执行完成

{
“private_project_count”: 0,
“private_repo_count”: 0,
“public_project_count”: 1,
“public_repo_count”: 0,
“total_project_count”: 1,
“total_repo_count”: 0
}

2020-10-31 18:05:40.942 DEBUG 7 — [ool-10-thread-1] o.h.r.h.infra.util.HarborHttpClient : api:COUNT
2020-10-31 18:05:40.942 DEBUG 7 — [ool-10-thread-1] o.h.r.h.infra.util.HarborHttpClient : url:https://harbor.com//api/statistics
2020-10-31 18:05:40.942 DEBUG 7 — [ool-10-thread-1] o.h.r.h.infra.util.HarborHttpClient : body:null
2020-10-31 18:05:40.949 INFO 7 — [ool-10-thread-1] i.c.asgard.schedule.ScheduleConsumer : @JobTask method: initHarborDefaultRepo, id: 110439114314252288 invoke error
com.alibaba.fastjson.JSONException: syntax error, expect {, actual error, pos 1, fastjson-version 1.2.71
at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.deserialze(JavaBeanDeserializer.java:515) ~[fastjson-1.2.71.jar!/:na]
at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.parseRest(JavaBeanDeserializer.java:1599) ~[fastjson-1.2.71.jar!/:na]
at com.alibaba.fastjson.parser.deserializer.FastjsonASMDeserializer_13_HarborCountVo.deserialze(Unknown Source) ~[na:na]
at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.deserialze(JavaBeanDeserializer.java:296) ~[fastjson-1.2.71.jar!/:na]
at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:688) ~[fastjson-1.2.71.jar!/:na]
at com.alibaba.fastjson.JSON.parseObject(JSON.java:396) ~[fastjson-1.2.71.jar!/:na]
at com.alibaba.fastjson.JSON.parseObject(JSON.java:300) ~[fastjson-1.2.71.jar!/:na]
at com.alibaba.fastjson.JSON.parseObject(JSON.java:573) ~[fastjson-1.2.71.jar!/:na]
at org.hrds.rdupm.init.service.HarborInitServiceImpl.defaultRepoInit(HarborInitServiceImpl.java:111) ~[classes!/:0.23.5]
at org.hrds.rdupm.init.service.HarborInitServiceImpl$$FastClassBySpringCGLIB$$698feabb.invoke() ~[classes!/:0.23.5]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-5.0.10.RELEASE.jar!/:5.0.10.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684) ~[spring-aop-5.0.10.RELEASE.jar!/:5.0.10.RELEASE]
at org.hrds.rdupm.init.service.HarborInitServiceImpl$$EnhancerBySpringCGLIB$$7979eaf1.defaultRepoInit() ~[classes!/:0.23.5]
at org.hrds.rdupm.init.service.HarborInitDefaultRepoTask.initHarborDefaultRepo(HarborInitDefaultRepoTask.java:26) ~[classes!/:0.23.5]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_242]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_242]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_242]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_242]
at io.choerodon.asgard.schedule.ScheduleConsumer.invoke(ScheduleConsumer.java:83) [choerodon-starter-asgard-0.17.2.RELEASE.jar!/:0.17.2.RELEASE]
at io.choerodon.asgard.schedule.ScheduleConsumer.lambda$null$0(ScheduleConsumer.java:67) [choerodon-starter-asgard-0.17.2.RELEASE.jar!/:0.17.2.RELEASE]
at io.choerodon.asgard.schedule.ScheduleConsumer$$Lambda$897/0000000074893060.get(Unknown Source) [choerodon-starter-asgard-0.17.2.RELEASE.jar!/:0.17.2.RELEASE]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source) [na:1.8.0_242]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_242]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_242]
at java.lang.Thread.run(Unknown Source) [na:1.8.0_242]
2020-10-31 18:05:41.181 INFO 7 — [freshExecutor-0] com.netflix.discovery.DiscoveryClient : Disable delta property : true
2020-10-31 18:05:41.181 INFO 7 — [freshExecutor-0] com.netflix.discovery.DiscoveryClient : Single vip registry refresh property : null
2020-10-31 18:05:41.181 INFO 7 — [freshExecutor-0] com.netflix.discovery.DiscoveryClient : Force full registry fetch : false

服务名

prod-repo-service

超时策略
报错了。

任务程序

Harbor-关联默认仓

状态 实例ID 计划执行时间 实际执行时间
失败 prod-repo-service:10.244.3.85:prod-repo-service:7144 2020-10-30 17:34:15 2020-10-30 17:34:16

制品库关于harbro的url配置是“https://172.23.xx.xx:8080”,结尾不能加“/”