我已完成 Sentry 的部署,但 kafka-controller 一直进入 CrashLoopBackOff 状态。对于 kafka-controller[2024-08-29 14:39:51,534] WARN [RaftManager id=0] 连接到节点 sentry-kafka-cont 时出错……
我已完成 Sentry 的部署,但 kafka-controller 一直进入 CrashLoopBackOff 状态。
对于 kafka-controller
[2024-08-29 14:39:51,534] WARN [RaftManager id=0] Error connecting to node sentry-kafka-controller-1.sentry-kafka-controller-headless.svc.cluster.local:9093 (id: 1 rack: null) (org.apache.kafka.clients.NetworkClient)
java.net.UnknownHostException: sentry-kafka-controller-1.sentry-kafka-controller-headless.svc.cluster.local
at java.base/java.net.InetAddress$CachedAddresses.get(InetAddress.java:801)
at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1533)
at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1385)
at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1306)
at org.apache.kafka.clients.DefaultHostResolver.resolve(DefaultHostResolver.java:27)
at org.apache.kafka.clients.ClientUtils.resolve(ClientUtils.java:124)
at org.apache.kafka.clients.ClusterConnectionStates$NodeConnectionState.resolveAddresses(ClusterConnectionStates.java:536)
at org.apache.kafka.clients.ClusterConnectionStates$NodeConnectionState.currentAddress(ClusterConnectionStates.java:511)
at org.apache.kafka.clients.ClusterConnectionStates$NodeConnectionState.access$200(ClusterConnectionStates.java:466)
at org.apache.kafka.clients.ClusterConnectionStates.currentAddress(ClusterConnectionStates.java:173)
at org.apache.kafka.clients.NetworkClient.initiateConnect(NetworkClient.java:1050)
at org.apache.kafka.clients.NetworkClient.ready(NetworkClient.java:310)
at org.apache.kafka.server.util.InterBrokerSendThread.sendRequests(InterBrokerSendThread.java:145)
at org.apache.kafka.server.util.InterBrokerSendThread.pollOnce(InterBrokerSendThread.java:108)
at org.apache.kafka.server.util.InterBrokerSendThread.doWork(InterBrokerSendThread.java:136)
at org.apache.kafka.server.util.ShutdownableThread.run(ShutdownableThread.java:131)
此外,为了公开 sentry-web,我可以查看 UI 并开始测试该工具 -
我为服务制作了这个 yaml
apiVersion: v1
kind: Service
metadata:
name: sentry-web-service
namespace: gopikab
spec:
selector:
app: sentry
release: sentry
role: web
type: LoadBalancer
ports:
- protocol: TCP
port: 80
targetPort: 9000
但它仍然无法访问。我将 kafka 控制器副本数从 3 个减少到 1 个,以防止出现资源问题 - 但它们仍然不断死亡。