部署流水线一直不成功,最后timeout

  • Choerodon平台版本:0.11.0

  • 运行环境:自主搭建

  • 问题描述:
    新增一个环境,创建成功后,
    kubectl logs choerodon-cluster-agent-nginx-001-d666d4d4c-ndgw7 -n choerodon -f查看日志
    不断报错。导致部署不成功。

  • 执行的操作:
    已经在创建环境后在项目的gitlab的setting中enable了自动生成的Enabled deploy keys

  • 报错信息(请尽量使用代码块的形式展现):

  • 建议:

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

你好可以检查一下该库的的ssh地址是否可以正常使用吗?

请执行下面语句 提供一下返回结果

kubectl get deployment -n c7n-system -l choerodon.io/release=devops-service -o yaml

我用ssh-keygen -t rsa -C手动生成秘钥,并把id_rsa.pub的内容完全复制到gitlab项目 Deploy Keys里面或者添加到gitlab个人的ssh-key里面都是能使用git clone ssh://git@******.git克隆下来的

apiVersion: v1
items:
- apiVersion: extensions/v1beta1
  kind: Deployment
  metadata:
    annotations:
      deployment.kubernetes.io/revision: "1"
    creationTimestamp: 2018-12-03T09:34:20Z
    generation: 5
    labels:
      choerodon.io/logs-parser: spring-boot
      choerodon.io/release: devops-service
    name: devops-service
    namespace: c7n-system
    resourceVersion: "128625"
    selfLink: /apis/extensions/v1beta1/namespaces/c7n-system/deployments/devops-service
    uid: 9cabed16-f6de-11e8-8642-0cda411db71d
  spec:
    progressDeadlineSeconds: 600
    replicas: 1
    revisionHistoryLimit: 10
    selector:
      matchLabels:
        choerodon.io/release: devops-service
    strategy:
      rollingUpdate:
        maxSurge: 25%
        maxUnavailable: 25%
      type: RollingUpdate
    template:
      metadata:
        annotations:
          choerodon.io/metrics-group: spring-boot
          choerodon.io/metrics-path: /prometheus
        creationTimestamp: null
        labels:
          choerodon.io/metrics-port: "8061"
          choerodon.io/release: devops-service
          choerodon.io/service: devops-service
          choerodon.io/version: 0.11.0
      spec:
        containers:
        - env:
          - name: AGENT_REPOURL
            value: https://openchart.choerodon.com.cn/choerodon/c7n/
          - name: AGENT_SERVICEURL
            value: ws://devops.******.com/agent/
          - name: AGENT_VERSION
            value: 0.11.0
          - name: CHOERODON_EVENT_CONSUMER_KAFKA_BOOTSTRAP_SERVERS
            value: kafka-0.kafka-headless:9092,kafka-1.kafka-headless:9092,kafka-2.kafka-headless:9092
          - name: EUREKA_CLIENT_SERVICEURL_DEFAULTZONE
            value: http://register-server:8000/eureka/
          - name: JAVA_OPTS
            value: -Xms1024M -Xmx1024M
          - name: SECURITY_IGNORED
            value: /ci,/webhook,/v2/api-docs,/agent/**,/ws/**,/webhook/**
          - name: SERVICES_GATEWAY_URL
            value: http://api.*******.com
          - name: SERVICES_GITLAB_PASSWORD
            value: password
          - name: SERVICES_GITLAB_PROJECTLIMIT
            value: "100"
          - name: SERVICES_GITLAB_SSHURL
            value: gitlab.*******.com
          - name: SERVICES_GITLAB_URL
            value: http://gitlab.***********.com
          - name: SERVICES_HARBOR_BASEURL
            value: https://harbor.***********.com
          - name: SERVICES_HARBOR_PASSWORD
            value: Password123456
          - name: SERVICES_HARBOR_USERNAME
            value: admin
          - name: SERVICES_HELM_URL
            value: http://chart.**************.com
          - name: SPRING_CLOUD_CONFIG_ENABLED
            value: "true"
          - name: SPRING_CLOUD_CONFIG_URI
            value: http://config-server:8010/
          - name: SPRING_CLOUD_STREAM_KAFKA_BINDER_BROKERS
            value: kafka-0.kafka-headless:9092,kafka-1.kafka-headless:9092,kafka-2.kafka-headless:9092
          - name: SPRING_CLOUD_STREAM_KAFKA_BINDER_ZK_NODES
            value: zookeeper-0.zookeeper-headless:2181,zookeeper-1.zookeeper-headless:2181,zookeeper-2.zookeeper-headless:2181
          - name: SPRING_DATASOURCE_PASSWORD
            value: password
          - name: SPRING_DATASOURCE_URL
            value: jdbc:mysql://mysql:3306/devops_service?useUnicode=true&characterEncoding=utf-8&useSSL=false
          - name: SPRING_DATASOURCE_USERNAME
            value: choerodon
          - name: SPRING_REDIS_DATABASE
            value: "3"
          - name: SPRING_REDIS_HOST
            value: redis
          - name: TEMPLATE_VERSION_JAVALIB
            value: 0.11.0
          - name: TEMPLATE_VERSION_MICROSERVICE
            value: 0.11.0
          - name: TEMPLATE_VERSION_MICROSERVICEFRONT
            value: 0.11.0
          image: choerodon/devops-service:0.11.0
          imagePullPolicy: Always
          name: devops-service
          ports:
          - containerPort: 8060
            name: http
            protocol: TCP
          readinessProbe:
            exec:
              command:
              - /bin/sh
              - -c
              - curl -s localhost:8061/health --fail && nc -z localhost 8060
            failureThreshold: 3
            initialDelaySeconds: 60
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 60
          resources:
            limits:
              memory: 4Gi
            requests:
              memory: 2Gi
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          volumeMounts:
          - mountPath: /Charts
            name: data
        dnsPolicy: ClusterFirst
        restartPolicy: Always
        schedulerName: default-scheduler
        securityContext: {}
        terminationGracePeriodSeconds: 30
        volumes:
        - name: data
          persistentVolumeClaim:
            claimName: chart
  status:
    availableReplicas: 1
    conditions:
    - lastTransitionTime: 2018-12-03T09:34:20Z
      lastUpdateTime: 2018-12-03T09:35:33Z
      message: ReplicaSet "devops-service-54884df6cf" has successfully progressed.
      reason: NewReplicaSetAvailable
      status: "True"
      type: Progressing
    - lastTransitionTime: 2018-12-05T03:01:48Z
      lastUpdateTime: 2018-12-05T03:01:48Z
      message: Deployment has minimum availability.
      reason: MinimumReplicasAvailable
      status: "True"
      type: Available
    observedGeneration: 5
    readyReplicas: 1
    replicas: 1
    updatedReplicas: 1
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""

你好,你这个参数配置的有问题吧

谢谢,这个问题解决了,是因为一键部署的时候没有更改这个设置

你好,上边我看说是SERVICES_GITLAB_SSHURL这个参数配置有问题,是因为url没有http://吗?还是什么别的错误,这个我要修改应该如何改呢?下边是我的配置,麻烦你看一下
- name: SERVICES_GITLAB_PASSWORD
value: password
- name: SERVICES_GITLAB_PROJECTLIMIT
value: “100”
- name: SERVICES_GITLAB_SSHURL
value: choerodon-gitla.com:2289
- name: SERVICES_GITLAB_URL
value: http://choerodon-gitlab.com
- name: SERVICES_HARBOR_BASEURL
value: https://choerodon-harbor.com
- name: SERVICES_HARBOR_INSECURESKIPTLSVERIFY
value: “true”

你好,上边我看说是SERVICES_GITLAB_SSHURL这个参数配置有问题,是因为url没有http://吗?还是什么别的错误,这个我要修改应该如何改呢?下边是我的配置,麻烦你看一下

参数配置并没有问题哈,此为ssh协议clone地址,并不是http协议,所以不能加http