流水线创建环境失败

  • Choerodon平台版本:0.16.0

  • 运行环境:自主搭建

  • 问题描述:

    请尽量详细的描述您遇到的问题,以便我们能更快速的提供解决办法。

    如:在集群管理创建了一个集群是成功的,然后在流水线管理创建一个开发环境,失败了。

  • 执行的操作:
    如:之前系统完整的部署过一次choerodon 0.16版本,gitlab的数据是恢复的,导致出现各种问题,webhook一直存在问题,今天删除了c7n-system这个namespace,然后重新部署了choerodon 0.16版本。第一次添加环境是提示出错,我突然想起来之前的时候在kubernetes中创建过agent,删除之前的agent后重新创建环境还是出错。
[root@dongfang ~]# kubectl get deployments -n choerodon
NAME                                       READY   UP-TO-DATE   AVAILABLE   AGE
choerodon-cluster-agent-dongfang-develop   1/1     1            1           6m46s
choerodon-cluster-agent-uat01              1/1     1            1           4d6h
[root@dongfang-his ~]# kubectl delete deployments -n choerodon choerodon-cluster-agent-uat01 
deployment.extensions "choerodon-cluster-agent-uat01" deleted


  • 报错信息(请尽量使用代码块的形式展现):
2019-05-18 16:35:45.556  INFO 7 --- [nio-8060-exec-4] i.c.websocket.websocket.SocketHandler    : receive resource_sync msg of env:choerodon-test,
2019-05-18 16:35:45.558  INFO 7 --- [nio-8060-exec-4] i.c.d.a.s.i.DeployMsgHandlerServiceImpl  : env not exists: choerodon-test
2019-05-18 16:35:45.559  INFO 7 --- [nio-8060-exec-4] i.c.websocket.websocket.SocketHandler    : receive resource_sync msg of env:dongfang-develop1,
2019-05-18 16:35:45.561  INFO 7 --- [nio-8060-exec-4] i.c.websocket.websocket.SocketHandler    : receive resource_sync msg of env:choerodon-test,
2019-05-18 16:35:45.562  INFO 7 --- [nio-8060-exec-4] i.c.d.a.s.i.DeployMsgHandlerServiceImpl  : env not exists: choerodon-test
2019-05-18 16:35:45.563  INFO 7 --- [nio-8060-exec-4] i.c.websocket.websocket.SocketHandler    : receive resource_sync msg of env:dongfang-develop1,
2019-05-18 16:35:45.564  INFO 7 --- [nio-8060-exec-4] i.c.websocket.websocket.SocketHandler    : receive resource_sync msg of env:choerodon-test,
2019-05-18 16:35:45.566  INFO 7 --- [nio-8060-exec-4] i.c.d.a.s.i.DeployMsgHandlerServiceImpl  : env not exists: choerodon-test
2019-05-18 16:35:45.566  INFO 7 --- [nio-8060-exec-4] i.c.websocket.websocket.SocketHandler    : receive resource_sync msg of env:choerodon-test,
2019-05-18 16:35:45.567  INFO 7 --- [nio-8060-exec-4] i.c.d.a.s.i.DeployMsgHandlerServiceImpl  : env not exists: choerodon-test
2019-05-18 16:35:45.567  INFO 7 --- [nio-8060-exec-4] i.c.websocket.websocket.SocketHandler    : receive resource_sync msg of env:dongfang-develop1,
2019-05-18 16:35:45.569  INFO 7 --- [nio-8060-exec-4] i.c.websocket.websocket.SocketHandler    : receive resource_sync msg of env:dongfang-develop1,
2019-05-18 16:35:45.571  INFO 7 --- [nio-8060-exec-4] i.c.websocket.websocket.SocketHandler    : receive resource_sync msg of env:choerodon-test,
2019-05-18 16:35:45.571  INFO 7 --- [nio-8060-exec-4] i.c.d.a.s.i.DeployMsgHandlerServiceImpl  : env not exists: choerodon-test
2019-05-18 16:35:45.572  INFO 7 --- [nio-8060-exec-4] i.c.websocket.websocket.SocketHandler    : receive resource_sync msg of env:choerodon-test,
2019-05-18 16:35:45.572  INFO 7 --- [nio-8060-exec-4] i.c.d.a.s.i.DeployMsgHandlerServiceImpl  : env not exists: choerodon-test
2019-05-18 16:35:45.573  INFO 7 --- [nio-8060-exec-4] i.c.websocket.websocket.SocketHandler    : receive resource_sync msg of env:dongfang-develop1,
2019-05-18 16:35:45.574  INFO 7 --- [nio-8060-exec-4] i.c.websocket.websocket.SocketHandler    : receive resource_sync msg of env:dongfang-develop1,
2019-05-18 16:35:45.575  INFO 7 --- [nio-8060-exec-4] i.c.websocket.websocket.SocketHandler    : receive resource_sync msg of env:choerodon-test,
2019-05-18 16:35:45.576  INFO 7 --- [nio-8060-exec-4] i.c.d.a.s.i.DeployMsgHandlerServiceImpl  : env not exists: choerodon-test
2019-05-18 16:35:45.576  INFO 7 --- [nio-8060-exec-4] i.c.websocket.websocket.SocketHandler    : receive resource_sync msg of env:dongfang-develop1,
2019-05-18 16:35:47.564  INFO 7 --- [pool-5-thread-5] i.c.asgard.saga.consumer.SagaConsumer    : @SagaTask method code: devopsCreateEnv, id: 365 invoke error

io.choerodon.core.exception.CommonException: error.member.add
	at io.choerodon.devops.infra.persistence.impl.GitlabRepositoryImpl.addMemberIntoProject(GitlabRepositoryImpl.java:282)
	at io.choerodon.devops.app.service.impl.DevopsEnvironmentServiceImpl.lambda$initUserPermissionWhenCreatingEnv$26(DevopsEnvironmentServiceImpl.java:531)
	at io.choerodon.devops.app.service.impl.DevopsEnvironmentServiceImpl$$Lambda$1070.00000000F801B7F0.accept(Unknown Source)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:496)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:486)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:241)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
	at io.choerodon.devops.app.service.impl.DevopsEnvironmentServiceImpl.initUserPermissionWhenCreatingEnv(DevopsEnvironmentServiceImpl.java:520)
	at io.choerodon.devops.app.service.impl.DevopsEnvironmentServiceImpl.handleCreateEnvSaga(DevopsEnvironmentServiceImpl.java:506)
	at io.choerodon.devops.app.service.impl.DevopsEnvironmentServiceImpl$$FastClassBySpringCGLIB$$2e44f241.invoke(<generated>)
	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.DevopsEnvironmentServiceImpl$$EnhancerBySpringCGLIB$$dc182603.handleCreateEnvSaga(<generated>)
	at io.choerodon.devops.api.eventhandler.DevopsSagaHandler.devopsCreateEnv(DevopsSagaHandler.java:135)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at io.choerodon.asgard.saga.consumer.SagaConsumer.invoke(SagaConsumer.java:84)
	at io.choerodon.asgard.saga.consumer.SagaConsumer.lambda$null$0(SagaConsumer.java:56)
	at io.choerodon.asgard.saga.consumer.SagaConsumer$$Lambda$884.000000003C02D420.get(Unknown Source)
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:813)
Caused by: feign.FeignException: status 500 reading GitlabServiceClient#addMemberIntoProject(Integer,MemberDTO); content:
{"failed":true,"code":"Bad Request","message":"Bad Request"}
	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.$Proxy197.addMemberIntoProject(Unknown Source)
	at io.choerodon.devops.infra.persistence.impl.GitlabRepositoryImpl.addMemberIntoProject(GitlabRepositoryImpl.java:280)
	... 29 common frames omitted

2019-05-18 16:35:48.307  INFO 7 --- [nio-8060-exec-9] i.c.d.a.s.impl.DevopsGitServiceImpl      : ````````````````````````````` c5c23ca411b8b0901d25c0a119085cd2c9293ff3
2019-05-18 16:35:48.318  INFO 7 --- [nio-8060-exec-9] i.c.d.a.s.impl.DevopsGitServiceImpl      : update devopsCommit successfully: c5c23ca411b8b0901d25c0a119085cd2c9293ff3
2019-05-18 16:35:48.635  INFO 7 --- [pool-5-thread-1] i.c.asgard.saga.consumer.SagaConsumer    : @SagaTask method code: devopsCreateEnv, id: 365 invoke error

io.choerodon.core.exception.CommonException: error.member.add
	at io.choerodon.devops.infra.persistence.impl.GitlabRepositoryImpl.addMemberIntoProject(GitlabRepositoryImpl.java:282)
	at io.choerodon.devops.app.service.impl.DevopsEnvironmentServiceImpl.lambda$initUserPermissionWhenCreatingEnv$26(DevopsEnvironmentServiceImpl.java:531)
	at io.choerodon.devops.app.service.impl.DevopsEnvironmentServiceImpl$$Lambda$1070.00000000F801B7F0.accept(Unknown Source)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:496)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:486)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:241)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
	at io.choerodon.devops.app.service.impl.DevopsEnvironmentServiceImpl.initUserPermissionWhenCreatingEnv(DevopsEnvironmentServiceImpl.java:520)
	at io.choerodon.devops.app.service.impl.DevopsEnvironmentServiceImpl.handleCreateEnvSaga(DevopsEnvironmentServiceImpl.java:506)
	at io.choerodon.devops.app.service.impl.DevopsEnvironmentServiceImpl$$FastClassBySpringCGLIB$$2e44f241.invoke(<generated>)
	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.DevopsEnvironmentServiceImpl$$EnhancerBySpringCGLIB$$dc182603.handleCreateEnvSaga(<generated>)
	at io.choerodon.devops.api.eventhandler.DevopsSagaHandler.devopsCreateEnv(DevopsSagaHandler.java:135)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at io.choerodon.asgard.saga.consumer.SagaConsumer.invoke(SagaConsumer.java:84)
	at io.choerodon.asgard.saga.consumer.SagaConsumer.lambda$null$0(SagaConsumer.java:56)
	at io.choerodon.asgard.saga.consumer.SagaConsumer$$Lambda$884.000000003C02D420.get(Unknown Source)
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:813)
Caused by: feign.FeignException: status 500 reading GitlabServiceClient#addMemberIntoProject(Integer,MemberDTO); content:
{"failed":true,"code":"Bad Request","message":"Bad Request"}
	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.$Proxy197.addMemberIntoProject(Unknown Source)
	at io.choerodon.devops.infra.persistence.impl.GitlabRepositoryImpl.addMemberIntoProject(GitlabRepositoryImpl.java:280)
	... 29 common frames omitted

2019-05-18 16:35:48.793  INFO 7 --- [pool-5-thread-4] i.c.d.a.s.impl.DevopsGitServiceImpl      : The gitOps Repository ssh url: ssh://git@gitlab.dongfang.cn:2289/operation-dongfang-gitops/dongfang-develop1.git
2019-05-18 16:35:49.283  INFO 7 --- [pool-5-thread-2] i.c.asgard.saga.consumer.SagaConsumer    : @SagaTask method code: devopsCreateEnv, id: 365 invoke error

io.choerodon.core.exception.CommonException: error.member.add
	at io.choerodon.devops.infra.persistence.impl.GitlabRepositoryImpl.addMemberIntoProject(GitlabRepositoryImpl.java:282)
	at io.choerodon.devops.app.service.impl.DevopsEnvironmentServiceImpl.lambda$initUserPermissionWhenCreatingEnv$26(DevopsEnvironmentServiceImpl.java:531)
	at io.choerodon.devops.app.service.impl.DevopsEnvironmentServiceImpl$$Lambda$1070.00000000F801B7F0.accept(Unknown Source)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:496)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:486)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:241)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
	at io.choerodon.devops.app.service.impl.DevopsEnvironmentServiceImpl.initUserPermissionWhenCreatingEnv(DevopsEnvironmentServiceImpl.java:520)
	at io.choerodon.devops.app.service.impl.DevopsEnvironmentServiceImpl.handleCreateEnvSaga(DevopsEnvironmentServiceImpl.java:506)
	at io.choerodon.devops.app.service.impl.DevopsEnvironmentServiceImpl$$FastClassBySpringCGLIB$$2e44f241.invoke(<generated>)
	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.DevopsEnvironmentServiceImpl$$EnhancerBySpringCGLIB$$dc182603.handleCreateEnvSaga(<generated>)
	at io.choerodon.devops.api.eventhandler.DevopsSagaHandler.devopsCreateEnv(DevopsSagaHandler.java:135)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at io.choerodon.asgard.saga.consumer.SagaConsumer.invoke(SagaConsumer.java:84)
	at io.choerodon.asgard.saga.consumer.SagaConsumer.lambda$null$0(SagaConsumer.java:56)
	at io.choerodon.asgard.saga.consumer.SagaConsumer$$Lambda$884.000000003C02D420.get(Unknown Source)
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:813)
Caused by: feign.FeignException: status 500 reading GitlabServiceClient#addMemberIntoProject(Integer,MemberDTO); content:
{"failed":true,"code":"Bad Request","message":"Bad Request"}
	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.$Proxy197.addMemberIntoProject(Unknown Source)
	at io.choerodon.devops.infra.persistence.impl.GitlabRepositoryImpl.addMemberIntoProject(GitlabRepositoryImpl.java:280)
	... 29 common frames omitted

2019-05-18 16:35:49.487  INFO 7 --- [pool-5-thread-4] i.c.d.a.s.impl.DevopsGitServiceImpl      : 更新gitops库成功
2019-05-18 16:35:49.557  INFO 7 --- [pool-5-thread-4] i.c.d.a.s.impl.DevopsGitServiceImpl      : 序列化k8s对象成功!
2019-05-18 16:35:49.558  INFO 7 --- [pool-5-thread-4] i.c.d.a.s.impl.DevopsGitServiceImpl      : k8s对象转换平台对象成功!
2019-05-18 16:35:49.989  INFO 7 --- [pool-5-thread-4] i.c.d.a.s.impl.DevopsGitServiceImpl      : 发送gitops同步成功指令成功
2019-05-18 16:35:49.990  INFO 7 --- [nio-8060-exec-7] i.c.websocket.websocket.SocketHandler    : receive git_ops_sync_failed msg of cluster:1.env:dongfang-develop1.envId:2,
2019-05-18 16:35:50.325  INFO 7 --- [pool-5-thread-1] i.c.asgard.saga.consumer.SagaConsumer    : @SagaTask method code: devopsCreateEnv, id: 365 invoke error

io.choerodon.core.exception.CommonException: error.member.add
	at io.choerodon.devops.infra.persistence.impl.GitlabRepositoryImpl.addMemberIntoProject(GitlabRepositoryImpl.java:282)
	at io.choerodon.devops.app.service.impl.DevopsEnvironmentServiceImpl.lambda$initUserPermissionWhenCreatingEnv$26(DevopsEnvironmentServiceImpl.java:531)
	at io.choerodon.devops.app.service.impl.DevopsEnvironmentServiceImpl$$Lambda$1070.00000000F801B7F0.accept(Unknown Source)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:496)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:486)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:241)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
	at io.choerodon.devops.app.service.impl.DevopsEnvironmentServiceImpl.initUserPermissionWhenCreatingEnv(DevopsEnvironmentServiceImpl.java:520)
	at io.choerodon.devops.app.service.impl.DevopsEnvironmentServiceImpl.handleCreateEnvSaga(DevopsEnvironmentServiceImpl.java:506)
	at io.choerodon.devops.app.service.impl.DevopsEnvironmentServiceImpl$$FastClassBySpringCGLIB$$2e44f241.invoke(<generated>)
	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.DevopsEnvironmentServiceImpl$$EnhancerBySpringCGLIB$$dc182603.handleCreateEnvSaga(<generated>)
	at io.choerodon.devops.api.eventhandler.DevopsSagaHandler.devopsCreateEnv(DevopsSagaHandler.java:135)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at io.choerodon.asgard.saga.consumer.SagaConsumer.invoke(SagaConsumer.java:84)
	at io.choerodon.asgard.saga.consumer.SagaConsumer.lambda$null$0(SagaConsumer.java:56)
	at io.choerodon.asgard.saga.consumer.SagaConsumer$$Lambda$884.000000003C02D420.get(Unknown Source)
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:813)
Caused by: feign.FeignException: status 500 reading GitlabServiceClient#addMemberIntoProject(Integer,MemberDTO); content:
{"failed":true,"code":"Bad Request","message":"Bad Request"}
	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.$Proxy197.addMemberIntoProject(Unknown Source)
	at io.choerodon.devops.infra.persistence.impl.GitlabRepositoryImpl.addMemberIntoProject(GitlabRepositoryImpl.java:280)
	... 29 common frames omitted

2019-05-18 16:35:51.560  INFO 7 --- [nio-8060-exec-4] i.c.websocket.websocket.SocketHandler    : receive namespace_update msg of none:none,
2019-05-18 16:35:55.457  INFO 7 --- [nio-8060-exec-5] i.c.websocket.websocket.SocketHandler    : receive env_create_succeed msg of cluster:1,
2019-05-18 16:35:57.588  INFO 7 --- [nio-8060-exec-4] i.c.websocket.websocket.SocketHandler    : receive git_ops_sync_event msg of env:dongfang-develop1,
2019-05-18 16:35:57.591  INFO 7 --- [nio-8060-exec-4] i.c.d.a.s.i.DeployMsgHandlerServiceImpl  : env 2 receive git ops msg :
{"id":0,"resourceIDs":[],"type":"sync","startedAt":"2019-05-18T08:35:57.536466613Z","endedAt":"2019-05-18T08:35:57.536466613Z","metadata":{"commit":"c5c23ca411b8b0901d25c0a119085cd2c9293ff3"}}

  • 建议:

    提出您认为不合理的地方,帮助我们优化用户操作

这个地方也没有删除的按钮,数据添加了页面没有地方删除。

去c7n-mysql中的devops_service这个数据库中,猜到应该是如下2张表

mysql> select * from devops_env;
+----+------------+------------+-----------------------+------------+-----------+---------+------------------+--------------------+-------------------+---------------------+--------+----------+-------------------+--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-----------+-----------------------+------------+---------------------+-----------------+---------------------+
| id | project_id | cluster_id | gitlab_env_project_id | is_synchro | is_failed | hook_id | saga_sync_commit | devops_sync_commit | agent_sync_commit | devops_env_group_id | name   | sequence | code              | token                                | env_id_rsa                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | env_id_rsa_pub                                                                                                                                                                                                                                             | description | is_active | object_version_number | created_by | creation_date       | last_updated_by | last_update_date    |
+----+------------+------------+-----------------------+------------+-----------+---------+------------------+--------------------+-------------------+---------------------+--------+----------+-------------------+--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-----------+-----------------------+------------+---------------------+-----------------+---------------------+
|  2 |          1 |          1 |                  NULL |          0 |         1 |    NULL |                2 |                  2 |                 2 |                NULL | ?????? |        1 | dongfang-develop1 | a9f414f0-f49c-4212-b646-a60f2bdad214 | -----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQDZw04t+RboWiQrGnFrap58AL1sENAVsjZ1wX3hJqJaszBg1vKi
REmNXBo3mvGeCDDGU7C+/7uM/z3oytFRHixTyxh5S9NqyO3l85rq0MW9JQL1Tql0
Da0zmKYmJJJjnLEXX8+B0SYkUZ6Cm96p01Qw9Ege+IWPfZxS3ajBJQk93QIDAQAB
AoGAdL+A6qTg4zFwsqs6o5xF27WJ2KYq6XbiO7/A/TT5Vic7iK+05co2pNL8O1OW
4HjNNWYj3vsfgBip71VZSRSLekEo64608wJBAMOKnZVF/kRHBJWUSJfag/fgjsBv
1P0prQm2Uxa4wxXHX88qNJ0Wq3MENjK7XbcoQ5nhe77o
-----END RSA PRIVATE KEY-----
 | ssh-rsa AAAAB3NzaC1y3l85rq0MW9JQL1Tql0Da0zmKYmJJJjnLEXX8+B0SYkUZ6Cm96p01Qw9Ege+IWPfZxS3ajBJQk93Q== operation/dongfang/dongfang-develop1
 | NULL        |         1 |                     5 |          1 | 2019-05-18 16:35:45 |               1 | 2019-05-18 16:35:51 |
+----+------------+------------+-----------------------+------------+-----------+---------+------------------+--------------------+-------------------+---------------------+--------+----------+-------------------+--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-----------+-----------------------+------------+---------------------+-----------------+---------------------+
1 row in set (0.00 sec)

mysql> select * from devops_cluster;
+----+-----------------+--------+------------------+-------------+--------------------------------------+--------------+-------------------------------------------------------------------------------------------------------------------+-------------------------------+---------+-----------------------+------------+---------------------+-----------------+---------------------+
| id | organization_id | name   | code             | description | token                                | choerodon_id | namespaces                                                                                                        | skip_check_project_permission | is_init | object_version_number | created_by | creation_date       | last_updated_by | last_update_date    |
+----+-----------------+--------+------------------+-------------+--------------------------------------+--------------+-------------------------------------------------------------------------------------------------------------------+-------------------------------+---------+-----------------------+------------+---------------------+-----------------+---------------------+
|  1 |               1 | ?????? | dongfang-develop | ??????      | 08b07417-18d0-465f-8b60-b87ca61760ee | 727249b9     | ["default","kube-public","kube-system","choerodon","develop","dongfang-develop","dongfang-develop1","c7n-system"] |                             0 |       1 |                     7 |          1 | 2019-05-18 16:21:16 |               1 | 2019-05-18 16:35:52 |
+----+-----------------+--------+------------------+-------------+--------------------------------------+--------------+-------------------------------------------------------------------------------------------------------------------+-------------------------------+---------+-----------------------+------------+---------------------+-----------------+---------------------+
1 row in set (0.00 sec)


是否还有其他的关联?如果问题找不到,我需要清除所有和集群环境相关的数据,重新创建集群并添加环境。

清除数据重新添加还是报错,今天能否帮忙查看下错误原因,谢谢!

哪位大神有空帮忙看下,谢谢!

报错是gitlab连接的问题,member add的权限错误,是不是gitlab对接的还是有问题
环境你删除掉agent就会断开,断开的环境就可以进行删除了

gitlab的问题我要如何定位?目前代码提交、分支创建、应用创建都是正常的。
我将数据库中的记录清掉,然后在gitops组里将之前生成的project都删除了,重新操作还是一样的错误。

在创建环境的过程中,gitlab-service只有如下的一段报错:

2019-05-20 10:21:18.511  INFO 8 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
2019-05-20 10:22:12.982  INFO 8 --- [ XNIO-2 task-15] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://register-server.c7n-system:8000/
2019-05-20 10:22:12.995  INFO 8 --- [ XNIO-2 task-15] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=gitlab-service, profiles=[default], label=, version=0.16.1, state=
2019-05-20 10:24:38.663 ERROR 8 --- [XNIO-3 task-176] i.c.g.a.service.impl.ProjectServiceImpl  : no member found
2019-05-20 10:24:38.762  INFO 8 --- [XNIO-3 task-177] i.c.r.h.ControllerExceptionHandler       : exception info io.choerodon.core.exception.FeignException: Bad Request
	at io.choerodon.gitlab.app.service.impl.ProjectServiceImpl.createMember(ProjectServiceImpl.java:227)
	at io.choerodon.gitlab.api.controller.v1.ProjectsController.createMember(ProjectsController.java:378)
	at sun.reflect.GeneratedMethodAccessor316.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:707)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
	at io.choerodon.resource.filter.JwtTokenFilter.doFilter(JwtTokenFilter.java:90)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:90)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	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 io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	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 io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
	at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:65)
	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)
	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:336)
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:813)
Caused by: org.gitlab4j.api.GitLabApiException: Bad Request
	at org.gitlab4j.api.AbstractApi.validate(AbstractApi.java:330)
	at org.gitlab4j.api.AbstractApi.post(AbstractApi.java:143)
	at org.gitlab4j.api.ProjectApi.addMember(ProjectApi.java:931)
	at io.choerodon.gitlab.app.service.impl.ProjectServiceImpl.createMember(ProjectServiceImpl.java:225)
	... 82 more

2019-05-20 10:24:38.762  WARN 8 --- [XNIO-3 task-177] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [io.choerodon.core.exception.FeignException: Bad Request]
2019-05-20 10:26:18.512  INFO 8 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
2019-05-20 10:27:12.989  INFO 8 --- [ XNIO-2 task-45] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://register-server.c7n-system:8000/
2019-05-20 10:27:13.004  INFO 8 --- [ XNIO-2 task-45] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=gitlab-service, profiles=[default], label=, version=0.16.1, state=

Bad Request 是哪个api出错?

进入项目所对应的gitlab环境库,检查是否有用户的权限是developer?

全部是所有者

从agent的日志来看,读取gitlab的gitops的项目信息是成功的

I0520 13:41:50.263584       6 client.go:173] send response key env:choerodon-test, type resource_sync
I0520 13:41:50.263659       6 client.go:173] send response key env:develop, type resource_sync
I0520 13:41:50.263728       6 client.go:173] send response key env:choerodon-test, type resource_sync
I0520 13:41:50.263792       6 client.go:173] send response key env:develop, type resource_sync
I0520 13:41:55.210980       6 worker.go:143] get command: cluster:3.env:develop.envId:6/git_ops_sync
I0520 13:41:55.211079       6 client.go:173] send response key cluster:3.env:develop.envId:6, type git_ops_sync_failed
I0520 13:41:56.263283       6 client.go:173] send response key none:none, type namespace_update
I0520 13:42:00.160949       6 client.go:173] send response key cluster:3, type env_create_succeed
E0520 13:42:00.161139       6 daemon.go:94] develop do sync: git repo not ready
I0520 13:42:02.262083       6 daemon.go:81] env: develop get refreshed event for git repository ssh://git@develop/operation-dongfang-gitops/develop.git, branch master, HEAD 8a0c8a1789e6bccebfaefdd4b9632206229154a5, previous HEAD 
I0520 13:42:02.313865       6 daemon.go:339] env:develop git_ops_sync_event:
{"id":0,"resourceIDs":[],"type":"sync","startedAt":"2019-05-20T05:42:02.262167486Z","endedAt":"2019-05-20T05:42:02.262167486Z","metadata":{"commit":"8a0c8a1789e6bccebfaefdd4b9632206229154a5"}}
I0520 13:42:02.314054       6 client.go:173] send response key env:develop, type git_ops_sync_event
I0520 13:42:03.057776       6 daemon.go:321] develop tag: agent-sync, old: , new: 8a0c8a1789e6bccebfaefdd4b9632206229154a5
I0520 13:42:03.411057       6 daemon.go:81] env: develop get refreshed event for git repository ssh://git@develop/operation-dongfang-gitops/develop.git, branch master, HEAD 8a0c8a1789e6bccebfaefdd4b9632206229154a5, previous HEAD 8a0c8a1789e6bccebfaefdd4b9632206229154a5
I0520 13:42:20.213690       6 client.go:173] send response key inter:inter, type node_sync
I0520 13:42:50.259991       6 client.go:173] send response key inter:inter, type node_sync
I0520 13:43:07.966826       6 client.go:173] send response key env:develop, type status_sync_event
I0520 13:43:07.979058       6 worker.go:143] get command: cluster:3.env:develop.envId:6/status_sync
I0520 13:43:20.307858       6 client.go:173] send response key inter:inter, type node_sync
I0520 13:43:50.352071       6 client.go:173] send response key inter:inter, type node_sync
I0520 13:44:20.392313       6 client.go:173] send response key inter:inter, type node_sync
I0520 13:44:50.433594       6 client.go:173] send response key inter:inter, type node_sync
I0520 13:45:20.473557       6 client.go:173] send response key inter:inter, type node_sync
I0520 13:45:50.517355       6 client.go:173] send response key inter:inter, type node_sync
I0520 13:46:07.967069       6 client.go:173] send response key env:develop, type status_sync_event
I0520 13:46:07.979007       6 worker.go:143] get command: cluster:3.env:develop.envId:6/status_sync
I0520 13:46:20.565508       6 client.go:173] send response key inter:inter, type node_sync


你创建环境时是选了特定成员的是吗?

选特定成员与不选特定的成员都是出错。

新建环境都会出错?重新部署了choerodon 0.16.0 然后gitlab还是以前的?

选特定成员就出错

刚刚重新试了一下,不选特定成员就成功了。

所有的东西都是根据0.16的分布式部署操作的,上周六重新部署的,删除c7n-system这个namespace后重新helm部署的。

那你重新部署了之后 数据恢复了吗

这次没做数据恢复,删除gitlab之前手动git clone所有的仓库,部署完成后手动去gitlab创建分支,等猪齿鱼上读取到对应项目的分支后,再手动git push代码,让猪齿鱼上有对应的记录。

创建环境的时候不选择特定用户,就是成功的

但是gitlab-service上有个报错,如下

2019-05-20 13:51:23.014  INFO 8 --- [XNIO-2 task-310] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://register-server.c7n-system:8000/
2019-05-20 13:51:23.029  INFO 8 --- [XNIO-2 task-310] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=gitlab-service, profiles=[default], label=, version=0.16.1, state=
2019-05-20 13:53:56.058  INFO 8 --- [XNIO-3 task-226] i.c.r.h.ControllerExceptionHandler       : exception info io.choerodon.core.exception.FeignException: error.file.get
	at io.choerodon.gitlab.api.controller.v1.RepositoryController.lambda$getFile$15(RepositoryController.java:246)
	at io.choerodon.gitlab.api.controller.v1.RepositoryController$$Lambda$775.0000000018018FE0.get(Unknown Source)
	at java.util.Optional.orElseThrow(Optional.java:290)
	at io.choerodon.gitlab.api.controller.v1.RepositoryController.getFile(RepositoryController.java:246)
	at sun.reflect.GeneratedMethodAccessor663.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.doGet(FrameworkServlet.java:866)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
	at io.choerodon.resource.filter.JwtTokenFilter.doFilter(JwtTokenFilter.java:90)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:90)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	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 io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	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 io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
	at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:65)
	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)
	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:336)
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:813)

2019-05-20 13:53:56.059  WARN 8 --- [XNIO-3 task-226] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [io.choerodon.core.exception.FeignException: error.file.get]
2019-05-20 13:56:18.542  INFO 8 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
2019-05-20 13:56:32.981  INFO 8 --- [ XNIO-2 task-21] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://register-server.c7n-system:8000/
2019-05-20 13:56:32.996  INFO 8 --- [ XNIO-2 task-21] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=gitlab-service, profiles=[default], label=, version=0.16.1, state=

这个报错应该没有影响。

但是在环境权限分配中选一个后就出错

这是同一个人? 如果是同一个人, 他是项目成员,怎么是环境库的owner?
image

是的,我感觉这里有点问题,duhong这个账号之前我设置为项目所有者了,后来修改为项目成员了,但是gitlab里还是Owner。

这里还有一个问题:我在流水线里创建环境,选择了环境编码,然后点击创建,就会去gitlab的gitops组下创建一个project,但是在流水线中将环境删除后,gitops这个组下对应的project还是保留。

gitlab-service只会同步新增的project到gitlab,不会同步删除相关的操作?