导入gitlab应用 事务失败 devopsCreateGitlabProject

  • Choerodon平台版本:0.24

  • 问题描述:
    从gitlab中导入应用失败,任务编码:devopsCreateGitlabProject

io.choerodon.core.exception.CommonException
at io.choerodon.devops.infra.feign.operator.GitlabServiceClientOperator.queryProjectByName(GitlabServiceClientOperator.java:445)
at io.choerodon.devops.app.service.impl.AppServiceServiceImpl.operationAppServiceImport(AppServiceServiceImpl.java:849)
at io.choerodon.devops.app.service.impl.AppServiceServiceImpl$$FastClassBySpringCGLIB$$e2351bf.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.AppServiceServiceImpl$$EnhancerBySpringCGLIB$$b9d2c962.operationAppServiceImport()
at io.choerodon.devops.app.eventhandler.DevopsSagaHandler.importApp(DevopsSagaHandler.java:212)
at sun.reflect.GeneratedMethodAccessor808.invoke(Unknown Source)
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:85)
at io.choerodon.asgard.saga.consumer.SagaConsumer.lambda$null$0(SagaConsumer.java:57)
at io.choerodon.asgard.saga.consumer.SagaConsumer$$Lambda$986/0x00000000f8109e00.get(Unknown Source)
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604)
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:823)
Caused by: com.netflix.hystrix.exception.HystrixRuntimeException: GitlabServiceClient#queryProjectByName(Integer,String,String) failed and fallback failed.
at com.netflix.hystrix.AbstractCommand$22.call(AbstractCommand.java:825)
at com.netflix.hystrix.AbstractCommand$22.call(AbstractCommand.java:804)
at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onError(OperatorOnErrorResumeNextViaFunction.java:140)
at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:87)
at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:87)
at com.netflix.hystrix.AbstractCommand$DeprecatedOnFallbackHookApplication$1.onError(AbstractCommand.java:1472)
at com.netflix.hystrix.AbstractCommand$FallbackHookApplication$1.onError(AbstractCommand.java:1397)
at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:87)
at rx.observers.Subscribers$5.onError(Subscribers.java:230)
at rx.internal.operators.OnSubscribeThrow.call(OnSubscribeThrow.java:44)
at rx.internal.operators.OnSubscribeThrow.call(OnSubscribeThrow.java:28)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:51)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onError(OperatorOnErrorResumeNextViaFunction.java:142)
at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:87)
at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:87)
at com.netflix.hystrix.AbstractCommand$HystrixObservableTimeoutOperator$2.onError(AbstractCommand.java:1194)
at rx.internal.operators.OperatorSubscribeOn$SubscribeOnSubscriber.onError(OperatorSubscribeOn.java:80)
at rx.observers.Subscribers$5.onError(Subscribers.java:230)
at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:87)
at rx.observers.Subscribers$5.onError(Subscribers.java:230)
at com.netflix.hystrix.AbstractCommand$DeprecatedOnRunHookApplication$1.onError(AbstractCommand.java:1431)
at com.netflix.hystrix.AbstractCommand$ExecutionHookApplication$1.onError(AbstractCommand.java:1362)
at rx.observers.Subscribers$5.onError(Subscribers.java:230)
at rx.observers.Subscribers$5.onError(Subscribers.java:230)
at rx.internal.operators.OnSubscribeThrow.call(OnSubscribeThrow.java:44)
at rx.internal.operators.OnSubscribeThrow.call(OnSubscribeThrow.java:28)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:51)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:51)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OperatorSubscribeOn$SubscribeOnSubscriber.call(OperatorSubscribeOn.java:100)
at com.netflix.hystrix.strategy.concurrency.HystrixContexSchedulerAction$1.call(HystrixContexSchedulerAction.java:56)
at com.netflix.hystrix.strategy.concurrency.HystrixContexSchedulerAction$1.call(HystrixContexSchedulerAction.java:47)
at org.springframework.security.concurrent.DelegatingSecurityContextCallable.call(DelegatingSecurityContextCallable.java:87)
at org.hzero.core.hystrix.AbstractCallable.call(AbstractCallable.java:15)
at org.hzero.core.hystrix.RequestAttributeCallableWrapper$RequestAttributeCallable.call(RequestAttributeCallableWrapper.java:35)
at com.netflix.hystrix.strategy.concurrency.HystrixContexSchedulerAction.call(HystrixContexSchedulerAction.java:69)
at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
… 3 more
Caused by: java.lang.RuntimeException: com.netflix.client.ClientException: Load balancer does not have available server for client: gitlab-service
at org.springframework.cloud.openfeign.ribbon.LoadBalancerFeignClient.execute(LoadBalancerFeignClient.java:71)
at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:98)
at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:77)
at feign.hystrix.HystrixInvocationHandler$1.run(HystrixInvocationHandler.java:107)
at com.netflix.hystrix.HystrixCommand$2.call(HystrixCommand.java:302)
at com.netflix.hystrix.HystrixCommand$2.call(HystrixCommand.java:298)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:46)
… 29 more
Caused by: com.netflix.client.ClientException: Load balancer does not have available server for client: gitlab-service
at com.netflix.loadbalancer.LoadBalancerContext.getServerFromLoadBalancer(LoadBalancerContext.java:483)
at com.netflix.loadbalancer.reactive.LoadBalancerCommand$1.call(LoadBalancerCommand.java:184)
at com.netflix.loadbalancer.reactive.LoadBalancerCommand$1.call(LoadBalancerCommand.java:180)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeConcatMap.call(OnSubscribeConcatMap.java:94)
at rx.internal.operators.OnSubscribeConcatMap.call(OnSubscribeConcatMap.java:42)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OperatorRetryWithPredicate$SourceSubscriber$1.call(OperatorRetryWithPredicate.java:127)
at rx.internal.schedulers.TrampolineScheduler$InnerCurrentThreadScheduler.enqueue(TrampolineScheduler.java:73)
at rx.internal.schedulers.TrampolineScheduler$InnerCurrentThreadScheduler.schedule(TrampolineScheduler.java:52)
at rx.internal.operators.OperatorRetryWithPredicate$SourceSubscriber.onNext(OperatorRetryWithPredicate.java:79)
at rx.internal.operators.OperatorRetryWithPredicate$SourceSubscriber.onNext(OperatorRetryWithPredicate.java:45)
at rx.internal.util.ScalarSynchronousObservable$WeakSingleProducer.request(ScalarSynchronousObservable.java:276)
at rx.Subscriber.setProducer(Subscriber.java:209)
at rx.internal.util.ScalarSynchronousObservable$JustOnSubscribe.call(ScalarSynchronousObservable.java:138)
at rx.internal.util.ScalarSynchronousObservable$JustOnSubscribe.call(ScalarSynchronousObservable.java:129)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.Observable.subscribe(Observable.java:10423)
at rx.Observable.subscribe(Observable.java:10390)
at rx.observables.BlockingObservable.blockForSingle(BlockingObservable.java:443)
at rx.observables.BlockingObservable.single(BlockingObservable.java:340)
at com.netflix.client.AbstractLoadBalancerAwareClient.executeWithLoadBalancer(AbstractLoadBalancerAwareClient.java:112)
at org.springframework.cloud.openfeign.ribbon.LoadBalancerFeignClient.execute(LoadBalancerFeignClient.java:63)
… 35 more

你好,注意看下报错信息,检查下你的 gitlab-service 服务是否正常

不好意思刚刚 以为和上一个问题一样重启了一下。还没起来就重试了事务

你好!刚刚是我重启了服务还没起来就执行了事务重试,现在是提示error.git.push错误

你好,贴出错误信息前记得检查下是否有敏感信息需要处理下。
另外你试试gitlab功能正常不,包括创建仓库,然后用ssh推拉代码

哦好的谢谢提醒!gitlab里面是正常的ssh也是可以拉取的

我在gitlab中创建应用是正常的拉取也是正常的

ssh推送正常吗?http推送呢?

创建的项目 push 错误
推送不起来

git push 错误

@ZmfCn

是 gitlab 挂载 pvc 的权限问题。

kubectl exec -it -n c7n-system gitlab-gitlab-core-0 -- bash
--------------
/home/git/gitlab# cd ..
/home/git# ls -al 
total 20
drwxr-xr-x  1 git  git    78 Jan 22 10:05 .
drwxr-xr-x  1 root root   17 Jan  1  2020 ..
-rw-r--r--  1 git  git   220 Jan  1  2020 .bash_logout
-rw-r--r--  1 git  git  3771 Jan  1  2020 .bashrc
drwxr-xr-x  3 git  git    19 Jan  1  2020 .bundle
-rw-r--r--  1 git  git    70 Jan  1  2020 .gitconfig
-rw-r--r--  1 git  git   697 Jan  1  2020 .profile
-rw-------  1 git  git  1024 Jan 22 10:05 .rnd
lrwxrwxrwx  1 git  git    19 Jan  1  2020 .ssh -> /home/git/data/.ssh
drwxr-xr-x  3 git  git    17 Jan  1  2020 .yarn
drwxr-xr-x 10 git  git   118 Oct 28 09:32 data
drwxr-xr-x  1 git  git    25 Jan  1  2020 gitaly
drwxr-xr-x  1 git  git   135 Jan 22 10:06 gitlab
drwxr-xr-x  1 git  git    24 Jan  1  2020 gitlab-shell

/home/git# ls -al data/
total 60
drwxr-xr-x  10 git  git    118 Oct 28 09:32 .
drwxr-xr-x   1 git  git     78 Jan 22 10:05 ..
drwx------   2 git  git     57 May  8  2020 .ssh
drwxr-xr-x   2 git  git   8192 Jan 28 01:24 backups
drwxr-xr-x   6 git  git     66 Jan  4 14:45 builds
drwxrws--- 934 git  git  32768 Jan 24 06:20 repositories
drwxr-xr-x   6 git  git     66 Oct 29 17:18 shared
drwxr-xr-x   2 root root   226 Oct 28 09:32 ssh
drwxr-xr-x   3 root root    70 Oct 28 09:35 tmp
drwx------   2 git  git      6 Oct 28 09:32 uploads

看一下各目录的用户是不是 git,不是使用下面的命令修复

chown -R git:git xxx

image
是 ssh 和 tmp 也应该是git 用户吗?

@Vista

请问下我这边看了下目录用户都是正常的

使用的磁盘满了吗?

没有满

  1. 你的git仓库的大小?
  2. 推送的时候加上 --no-thin: git push --no-thin
  3. 上面都没有问题也有可能是 nfs 的文件,可以重启一下 nfs-server

您好 我这几天试了一下 发现可能是gitlab 上传文件大小做了限制,我上次的项目比较小的时候推送是正常的,请问我应该在哪个gitlab 哪个 pod里进行修改,如何配置啊?