0

在 helm 在生成的 URL 上请求 che-dashboard 时,我收到 302 ERR_TOO_MANY_REDIRECTS。

我已经使用以下链接安装了 Eclipse che:

https://www.eclipse.org/che/docs/che-7/installation-guide/installing-che-on-google-cloud-platform/

这将安装多个服务,如 che-dashboard、keycloak、plugin-registry 等。 在这些唯一的 che 仪表板中返回 302 ERR_TOO_MANY_REDIRECTS,其余 URL 工作正常。

che-dashboard 服务返回 200 Ok 但 ingress-nginx-controller 返回 302 重定向。PFB 日志和 yaml 文件。

che-dashboard 服务日志:

2021-06-21 15:06:05.531 IST10.112.3.1 - - [21/Jun/2021:09:36:05 +0000] "GET /dashboard/ HTTP/1.1" 200 696
Info
2021-06-21 15:06:08.233 IST10.112.3.1 - - [21/Jun/2021:09:36:08 +0000] "GET /dashboard/ HTTP/1.1" 200 696
Info
2021-06-21 15:06:15.532 IST10.112.3.1 - - [21/Jun/2021:09:36:15 +0000] "GET /dashboard/ HTTP/1.1" 200 696
Info
2021-06-21 15:06:18.233 IST10.112.3.1 - - [21/Jun/2021:09:36:18 +0000] "GET /dashboard/ HTTP/1.1" 200 696
Info
2021-06-21 15:06:25.531 IST10.112.3.1 - - [21/Jun/2021:09:36:25 +0000] "GET /dashboard/ HTTP/1.1" 200 696
Info
2021-06-21 15:06:28.233 IST10.112.3.1 - - [21/Jun/2021:09:36:28 +0000] "GET /dashboard/ HTTP/1.1" 200 696

che-dashboard YAML:

apiVersion: v1
kind: Service
metadata:
  annotations:
    meta.helm.sh/release-name: che
    meta.helm.sh/release-namespace: eclipse-che
  creationTimestamp: "2021-06-07T17:57:40Z"
  labels:
    app: che
    app.kubernetes.io/managed-by: Helm
    component: che-dashboard
  managedFields:
  - apiVersion: v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .: {}
          f:meta.helm.sh/release-name: {}
          f:meta.helm.sh/release-namespace: {}
        f:labels:
          .: {}
          f:app: {}
          f:app.kubernetes.io/managed-by: {}
          f:component: {}
      f:spec:
        f:ports:
          .: {}
          k:{"port":8080,"protocol":"TCP"}:
            .: {}
            f:name: {}
            f:port: {}
            f:protocol: {}
            f:targetPort: {}
        f:selector:
          .: {}
          f:app: {}
          f:component: {}
        f:sessionAffinity: {}
        f:type: {}
    manager: Go-http-client
    operation: Update
    time: "2021-06-07T17:57:40Z"
  - apiVersion: v1
    fieldsType: FieldsV1
    fieldsV1:
      f:spec:
        f:ports:
          k:{"port":443,"protocol":"TCP"}:
            .: {}
            f:name: {}
            f:port: {}
            f:protocol: {}
            f:targetPort: {}
    manager: GoogleCloudConsole
    operation: Update
    time: "2021-06-13T04:44:42Z"
  name: che-dashboard
  namespace: eclipse-che
  resourceVersion: "6305578"
  selfLink: /api/v1/namespaces/eclipse-che/services/che-dashboard
  uid: cf8c6e75-1153-43db-b7f2-678f6bb927b9
spec:
  clusterIP: 10.115.242.109
  ports:
  - name: http
    port: 8080
    protocol: TCP
    targetPort: 8080
  - name: https
    port: 443
    protocol: TCP
    targetPort: 443
  selector:
    app: che
    component: che-dashboard
  sessionAffinity: None
  type: ClusterIP
status:
  loadBalancer: {}

ingress-nginx-controller 日志:

2021-06-21 13:47:18.499 IST171.61.57.210 - - [21/Jun/2021:08:17:18 +0000] "GET /dashboard/ HTTP/2.0" 302 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36" 22 0.001 [eclipse-che-che-host-8080] [] 10.112.4.3:8080 0 0.001 302 e9ffe655a67304f9a34ad623f1b2cfb1
Info
2021-06-21 13:47:18.707 IST171.61.57.210 - - [21/Jun/2021:08:17:18 +0000] "GET /dashboard/ HTTP/2.0" 302 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36" 22 0.001 [eclipse-che-che-host-8080] [] 10.112.4.3:8080 0 0.001 302 db12deeebd652964501ed94de4f8804b
Info
2021-06-21 13:47:18.911 IST171.61.57.210 - - [21/Jun/2021:08:17:18 +0000] "GET /dashboard/ HTTP/2.0" 302 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36" 22 0.001 [eclipse-che-che-host-8080] [] 10.112.4.3:8080 0 0.000 302 af3de97363a4912f8e1f24f0bbd51913

入口-nginx-控制器 YAML

apiVersion: v1
kind: Service
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"app.kubernetes.io/component":"controller","app.kubernetes.io/instance":"ingress-nginx","app.kubernetes.io/managed-by":"Helm","app.kubernetes.io/name":"ingress-nginx","app.kubernetes.io/version":"0.41.0","helm.sh/chart":"ingress-nginx-3.8.0"},"name":"ingress-nginx-controller","namespace":"ingress-nginx"},"spec":{"externalTrafficPolicy":"Local","ports":[{"name":"http","port":80,"protocol":"TCP","targetPort":"http"},{"name":"https","port":443,"protocol":"TCP","targetPort":"https"}],"selector":{"app.kubernetes.io/component":"controller","app.kubernetes.io/instance":"ingress-nginx","app.kubernetes.io/name":"ingress-nginx"},"type":"LoadBalancer"}}
  creationTimestamp: "2021-06-02T08:12:38Z"
  finalizers:
  - service.kubernetes.io/load-balancer-cleanup
  labels:
    app.kubernetes.io/component: controller
    app.kubernetes.io/instance: ingress-nginx
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: ingress-nginx
    app.kubernetes.io/version: 0.41.0
    helm.sh/chart: ingress-nginx-3.8.0
  managedFields:
  - apiVersion: v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .: {}
          f:kubectl.kubernetes.io/last-applied-configuration: {}
        f:labels:
          .: {}
          f:app.kubernetes.io/component: {}
          f:app.kubernetes.io/instance: {}
          f:app.kubernetes.io/managed-by: {}
          f:app.kubernetes.io/name: {}
          f:app.kubernetes.io/version: {}
          f:helm.sh/chart: {}
      f:spec:
        f:externalTrafficPolicy: {}
        f:ports:
          .: {}
          k:{"port":80,"protocol":"TCP"}:
            .: {}
            f:name: {}
            f:port: {}
            f:protocol: {}
            f:targetPort: {}
          k:{"port":443,"protocol":"TCP"}:
            .: {}
            f:name: {}
            f:port: {}
            f:protocol: {}
            f:targetPort: {}
        f:selector:
          .: {}
          f:app.kubernetes.io/component: {}
          f:app.kubernetes.io/instance: {}
          f:app.kubernetes.io/name: {}
        f:sessionAffinity: {}
        f:type: {}
    manager: kubectl-client-side-apply
    operation: Update
    time: "2021-06-02T08:12:38Z"
  - apiVersion: v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:finalizers:
          .: {}
          v:"service.kubernetes.io/load-balancer-cleanup": {}
      f:status:
        f:loadBalancer:
          f:ingress: {}
    manager: kube-controller-manager
    operation: Update
    time: "2021-06-02T08:13:27Z"
  name: ingress-nginx-controller
  namespace: ingress-nginx
  resourceVersion: "3164"
  selfLink: /api/v1/namespaces/ingress-nginx/services/ingress-nginx-controller
  uid: 17eb1fd5-fbbc-40aa-a0c9-d1020f21e635
spec:
  clusterIP: 10.115.245.45
  externalTrafficPolicy: Local
  healthCheckNodePort: 31646
  ports:
  - name: http
    nodePort: 30508
    port: 80
    protocol: TCP
    targetPort: http
  - name: https
    nodePort: 31341
    port: 443
    protocol: TCP
    targetPort: https
  selector:
    app.kubernetes.io/component: controller
    app.kubernetes.io/instance: ingress-nginx
    app.kubernetes.io/name: ingress-nginx
  sessionAffinity: None
  type: LoadBalancer
status:
  loadBalancer:
    ingress:
    - ip: 34.76.122.126

如果需要,我可以提供更多详细信息。提前致谢

4

1 回答 1

1

这似乎是最新版本中已修复的问题https://github.com/eclipse/che/issues/19914

该修复程序正在修复从/dashboard/*到的入口路径/dashboard/。见https://github.com/eclipse-che/che-server/pull/20

我不确定您需要的入口控制器,以上是针对 nginx 的,如果您有不同的入口控制器,您可能需要配置您的值。

让我们知道它是否不适合您。

于 2021-06-22T09:26:36.450 回答