创建分支的时候提示:‘error.tag.get’

  • Choerodon平台版本:0.18

  • 运行环境(如localhost或k8s):localhost

  • 问题描述:

创建分支的时候提示如下错误:

2019-09-14 21:50:38.155 WARN 7 — [nio-8060-exec-8] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [io.choerodon.core.exception.CommonException: error.tags.get]
2019-09-14 21:50:42.586 DEBUG 7 — [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Pool stats (total=15, active=0, idle=15, waiting=0)
2019-09-14 21:50:45.527 INFO 7 — [io-8060-exec-10] i.c.r.h.ControllerExceptionHandler : exception info io.choerodon.core.exception.CommonException: error.tags.get
at io.choerodon.devops.infra.persistence.impl.DevopsGitRepositoryImpl.getGitLabTags(DevopsGitRepositoryImpl.java:344)
at io.choerodon.devops.infra.persistence.impl.DevopsGitRepositoryImpl.getTags(DevopsGitRepositoryImpl.java:228)
at io.choerodon.devops.app.service.impl.DevopsGitServiceImpl.getTags(DevopsGitServiceImpl.java:336)
at io.choerodon.devops.app.service.impl.DevopsGitServiceImpl$$FastClassBySpringCGLIB$$3502622.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684)
at io.choerodon.devops.app.service.impl.DevopsGitServiceImpl$$EnhancerBySpringCGLIB$$57911ca7.getTags()
at io.choerodon.devops.api.controller.v1.DevopsGitController.getTagByPage(DevopsGitController.java:143)
at sun.reflect.GeneratedMethodAccessor880.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:891)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:877)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at io.choerodon.resource.filter.JwtTokenFilter.doFilter(JwtTokenFilter.java:90)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:90)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:209)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:155)
at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:123)
at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:108)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:813)
Caused by: feign.FeignException: status 500 reading GitlabServiceClient#getTags(Integer,Integer); content:
{“failed”:true,“code”:“error.tag.get”,“message”:“error.tag.get”}
at feign.FeignException.errorStatus(FeignException.java:60)
at feign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:89)
at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:143)
at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:77)
at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:102)
at com.sun.proxy.$Proxy171.getTags(Unknown Source)
at io.choerodon.devops.infra.persistence.impl.DevopsGitRepositoryImpl.getGitLabTags(DevopsGitRepositoryImpl.java:342)
… 79 more

2019-09-14 21:50:45.528 WARN 7 — [io-8060-exec-10] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [io.choerodon.core.exception.CommonException: error.tags.get]
2019-09-14 21:50:47.383 INFO 7 — [nio-8061-exec-7] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://register-server:8000
2019-09-14 21:50:47.395 INFO 7 — [nio-8061-exec-7] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=devops-service, profiles=[default], label=, version=0.18.0, state=

你好~请参考下这个问题,升级下devops-service和iam-service
https://forum.choerodon.io/t/topic/2382
如果升级后还有问题,请告知

helm upgrade iam-service c7n/iam-service \ -f <(helm get values iam-service) \ --version 0.18.4

helm upgrade devops-service c7n/devops-service \ --set env.open.TEMPLATE_VERSION="0.17.0" \ --set env.open.AGENT_VERSION="0.18.0" \ --set service.enabled=true \ --set ingress.enabled=true \ -f <(helm get values devops-service) \ --version 0.18.6

执行了,发现只有job 跑了,pod没有升级。

你可以helm list 看下服务当前部署的版本

[root@k8s-deploy ~]# helm list
NAME                  	REVISION	UPDATED                 	STATUS  	CHART                       	APP VERSION   	NAMESPACE
agile-service         	1       	Sat Aug 10 23:46:33 2019	DEPLOYED	agile-service-0.18.4        	0.18.4        	c7n-system
api-gateway           	1       	Sat Aug 10 23:38:25 2019	DEPLOYED	api-gateway-0.18.0          	0.18.0        	c7n-system
asgard-service        	1       	Sat Aug 10 23:34:31 2019	DEPLOYED	asgard-service-0.18.0       	0.18.0        	c7n-system
chartmuseum           	1       	Sat Aug 10 23:34:01 2019	DEPLOYED	chartmuseum-1.6.1           	1.6.1         	c7n-system
choerodon-front       	1       	Sat Aug 10 23:46:24 2019	DEPLOYED	choerodon-front-0.18.0      	0.18.0        	c7n-system
devops-service        	4       	Mon Sep 16 17:00:52 2019	DEPLOYED	devops-service-0.18.0       	0.18.0        	c7n-system
file-service          	1       	Sat Aug 10 23:39:22 2019	DEPLOYED	file-service-0.18.0         	0.18.0        	c7n-system
foundation-service    	1       	Sat Aug 10 23:48:56 2019	DEPLOYED	foundation-service-0.18.0   	0.18.0        	c7n-system
gitlab                	1       	Sat Aug 10 23:33:12 2019	DEPLOYED	gitlab-0.4.2                	0.4.2         	c7n-system
gitlab-service        	1       	Sat Aug 10 23:40:49 2019	DEPLOYED	gitlab-service-0.18.0       	0.18.0        	c7n-system
harbor                	1       	Sat Aug 10 23:33:49 2019	DEPLOYED	harbor-1.0.1                	1.0.1         	c7n-system
iam-service           	4       	Mon Sep 16 16:57:32 2019	DEPLOYED	iam-service-0.18.1          	0.18.1        	c7n-system
issue-service         	1       	Sat Aug 10 23:48:12 2019	DEPLOYED	issue-service-0.18.0        	0.18.0        	c7n-system
knowledgebase-service 	1       	Sat Aug 10 23:50:28 2019	DEPLOYED	knowledgebase-service-0.18.0	0.18.0        	c7n-system
manager-service       	1       	Sat Aug 10 23:35:56 2019	DEPLOYED	manager-service-0.18.0      	0.18.0        	c7n-system
minio                 	1       	Sat Aug 10 23:33:29 2019	DEPLOYED	minio-0.1.0                 	0.1.0         	c7n-system
mysql                 	1       	Sat Aug 10 23:32:37 2019	DEPLOYED	mysql-0.1.0                 	0.1.0         	c7n-system
nfs-client-provisioner	1       	Thu Aug  8 14:34:06 2019	DEPLOYED	nfs-client-provisioner-0.1.0	v3.1.0-k8s1.11	kube-system
notify-service        	1       	Sat Aug 10 23:36:52 2019	DEPLOYED	notify-service-0.18.0       	0.18.0        	c7n-system
oauth-server          	1       	Sat Aug 10 23:39:02 2019	DEPLOYED	oauth-server-0.18.0         	0.18.0        	c7n-system
postgresql            	1       	Sat Aug 10 23:32:26 2019	DEPLOYED	postgresql-3.18.4           	10.7.0        	c7n-system
redis                 	1       	Sat Aug 10 23:32:41 2019	DEPLOYED	redis-0.1.0                 	0.1.0         	c7n-system
register-server       	1       	Sat Aug 10 23:34:04 2019	DEPLOYED	go-register-server-0.18.0   	0.18.0        	c7n-system
state-machine-service 	1       	Sat Aug 10 23:47:28 2019	DEPLOYED	state-machine-service-0.18.0	0.18.0        	c7n-system
test-manager-service  	1       	Sat Aug 10 23:49:39 2019	DEPLOYED	test-manager-service-0.18.1 	0.18.1        	c7n-system
workflow-service      	1       	Sat Aug 10 23:46:01 2019	DEPLOYED	workflow-service-0.18.0     	0.18.0        	c7n-system

应该是job报错了,你截图下job的日志

2019-09-16 16:58:12.440  INFO 6 --- [           main] i.c.config.ConfigToolApplication         : Started ConfigToolApplication in 6.107 seconds (JVM running for 7.775)
2019-09-16 16:58:12.446  INFO 6 --- [           main] io.choerodon.config.utils.FileUtil       : jar拆解
2019-09-16 16:58:12.869  INFO 6 --- [           main] io.choerodon.config.utils.FileUtil       : jar拆解完成
2019-09-16 16:58:12.870  INFO 6 --- [           main] io.choerodon.config.ConfigToolExecute    : 根据指定文件进行配置初始化: iam-service
2019-09-16 16:58:12.880  INFO 6 --- [           main] io.choerodon.config.utils.FileUtil       : 文件路径获取:temp/BOOT-INF/classes/application.yml
2019-09-16 16:58:13.014  WARN 6 --- [           main] i.c.c.execute.RegisterServerExecutor     :
2019-09-16 16:58:13.014  INFO 6 --- [           main] i.c.c.execute.RegisterServerExecutor     : 配置初始化完成
2019-09-16 16:58:13.015  INFO 6 --- [       Thread-7] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@e4030bda: startup date [Mon Sep 16 16:58:08 CST 2019]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@d612c0ac
2019-09-16 16:58:13.019  INFO 6 --- [       Thread-7] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown
2019-09-16 16:58:13.020  INFO 6 --- [       Thread-7] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans
2019-09-16 16:58:01.140  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : ---- round 1 summary ----
2019-09-16 16:58:01.141  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : FD_ORGANIZATION         total:1     process:1     insert:0     complete
2019-09-16 16:58:01.142  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : IAM_LABEL               total:11    process:11    insert:0     complete
2019-09-16 16:58:01.142  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : IAM_USER                total:1     process:1     insert:0     complete
2019-09-16 16:58:01.142  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : IAM_ROLE                total:9     process:9     insert:0     complete
2019-09-16 16:58:01.143  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : IAM_MENU_B              total:4     process:4     insert:0     complete
2019-09-16 16:58:01.143  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : IAM_ROLE_LABEL          total:10    process:10    insert:0     complete
2019-09-16 16:58:01.144  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : FD_PROJECT_TYPE         total:9     process:9     insert:0     complete
2019-09-16 16:58:01.144  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : OAUTH_CLIENT            total:2     process:2     insert:0     complete
2019-09-16 16:58:01.144  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : IAM_MEMBER_ROLE         total:3     process:3     insert:0     complete
2019-09-16 16:58:01.145  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : FD_LANGUAGE             total:2     process:2     insert:0     complete
2019-09-16 16:58:01.145  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : FD_LOOKUP               total:1     process:1     insert:0     complete
2019-09-16 16:58:01.146  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : FD_LOOKUP_VALUE         total:2     process:2     insert:0     complete
2019-09-16 16:58:01.146  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : OAUTH_LDAP              total:1     process:1     insert:0     complete
2019-09-16 16:58:01.147  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : OAUTH_PASSWORD_POLICY   total:1     process:1     insert:0     complete
2019-09-16 16:58:01.147  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : ---- total process 57,time:274ms ----
2019-09-16 16:58:01.147  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : begin update exists datas...
2019-09-16 16:58:01.149  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : skip update table : FD_ORGANIZATION column: NAME
2019-09-16 16:58:01.159  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : skip update table : IAM_USER column: HASH_PASSWORD
2019-09-16 16:58:01.181  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : skip update table : IAM_ROLE column: IS_ENABLED
2019-09-16 16:58:01.200  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : skip update table : OAUTH_CLIENT column: WEB_SERVER_REDIRECT_URI
2019-09-16 16:58:01.214  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : skip update table : OAUTH_LDAP column: SERVER_ADDRESS
2019-09-16 16:58:01.215  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : skip update table : OAUTH_LDAP column: OBJECT_CLASS
2019-09-16 16:58:01.216  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : update complete, update row:80 (include tl)
2019-09-16 16:58:01.216  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : SUCCESS
2019-09-16 16:58:01.216  INFO 6 --- [           main] i.c.liquibase.excel.ExcelDataLoader      : data process finish, time: 343 ms
2019-09-16 16:58:01.218  INFO 6 --- [           main] i.choerodon.liquibase.LiquibaseExecutor  : 数据库初始化任务完成
2019-09-16 16:58:01.220  INFO 6 --- [       Thread-7] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@27ad6387: startup date [Mon Sep 16 16:57:41 CST 2019]; root of context hierarchy
2019-09-16 16:58:01.225  INFO 6 --- [       Thread-7] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown
2019-09-16 16:58:01.226  INFO 6 --- [       Thread-7] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans
2019-09-16 16:58:01.228  INFO 6 --- [       Thread-7] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
2019-09-16 16:58:01.234  INFO 6 --- [       Thread-7] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.

我看helm release的版本都是旧的 ,执行了helm upgrade没有升级成功吗,重新执行下helm upgrade,
然后执行下面的命令,看下version是多少

helm get iam-service

好像upgrade没有生效

升级提示成功 查看deploy版本没有变化