502 Bad gateway: Hazelcast Management Center via GCE Ingress
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- gcp, kubernetes
- 領域
- cloud, infrastructure
調査の方向性
インラインの Kubernetes YAML から始め、GCE Ingress の背後にある Management Center deployment を再現し、readiness response と ingress backend health を確認します。サービスが GCE Ingress に受け入れられる health check を公開し、リダイレクトに依存せずに backend が healthy と報告されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
For those of you who will be exposing Hazelcast Management Center (MC) via Google's Ingress GCE controller - be aware that GCE Ingress is expecting a working (should be 200 OK) readiness probe from the Service backing the MC Deployment.
I tried with the defaults and got 502 Bad gateway when accessing the exposed MC service. You can read about similar experience here.
Note also, that the default endpoint /hazelcast-mancenter returns 302 Found, which is ok for the readiness probe, but apparently not for GCE Ingress. The quick hack would be to use either /hazelcast-mancenter/index.html or /hazelcast-mancenter/. But in the long term I would propose to implement a dedicated health probe, e.g. /health or /healthz, etc.
So 302 Found is ok for checking the readiness of the Service, but if you check the status of the ingress, you will probably see the UNHEALTHY status:
k describe ing mc-ingress
Name: mc-ingress
Namespace: default
Address: 34.98.YYY.2
Default backend: mc-service:8080 (10.52.2.23:8080)
Rules:
Host Path Backends
---- ---- --------
* * mc-service:8080 (10.52.2.23:8080)
Annotations:
ingress.kubernetes.io/backends: {"k8s-be-32517--47d3253409234a5d":"UNHEALTHY"}
Events: <none>
Here is a working yaml:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mc-volume
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mc
labels:
app: hazelcast
spec:
replicas: 1
selector:
matchLabels:
app: hazelcast
template:
metadata:
labels:
app: hazelcast
spec:
containers:
- name: mc
image: hazelcast/management-center
resources:
limits:
memory: 1Gi
ports:
- containerPort: 8080
livenessProbe:
httpGet:
path: /hazelcast-mancenter/
port: 8080
readinessProbe:
httpGet:
path: /hazelcast-mancenter/
port: 8080
volumeMounts:
- name: mc-storage
mountPath: /data
volumes:
- name: mc-storage
persistentVolumeClaim:
claimName: mc-volume
---
apiVersion: v1
kind: Service
metadata:
name: mc-service
spec:
type: NodePort
selector:
app: hazelcast
ports:
- protocol: TCP
port: 8080
targetPort: 8080
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: mc-ingress
labels:
app: hazelcast
spec:
backend:
serviceName: mc-service
servicePort: 8080
P.S. Nginx Ingress doesn't have such issue. But a dedicated health endpoint is a nice to have non the less.
- 主要言語
- Java
- スター
- 558
- フォーク
- 599
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hazelcast/hazelcast-code-samples のほかの issue
-
[BUG] ClassLoader Leak / Metaspace OOM: Unmanaged static ThreadLocal<Kryo> in PersonKryoSerializerオープン
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
-
hazelcast code sample for XA transactions no longer works with current Atomikos version (5.0.9)オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
hazelcast/hazelcast-code-samples#553 · コメント 4 件 ·
hazelcast/hazelcast-code-samples の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
tchiotludo/akhq#3438 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
Paul-Austin-Oswego-CSC480-HCI521/gift-app#266 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
ome/bioformats#4509 ·
メンテナーはふだん 2 日以内に返信
-
module/email Type/Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
ballerina-platform/ballerina-library#9758 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
Azure/azure-functions-java-worker#909 · リアクション 1 件 ·