-
Notifications
You must be signed in to change notification settings - Fork 101
Only one pod join the cluster #377
Comments
Same problem occurs for my embedded hazelcast setup based on hazelcast version 5.1.2. Application is deployed on k8s cluster with istio sidecar injection enabled. First node starts without any problem. When second node starts, connection between them is established: But when newly started node raises question about master, it remains unresolved: I can see couple of these messages in between: Then, they disagree about the master node: and I can see the same exception as the one raised by @SamueleAlpino: @SamueleAlpino, have you found the reason? Any workaround? |
I've been seeing the exact same issue... I am trying to run a Spring Boot service with embedded Hazelcast using kubernetes API discovery mode. This is running in a kubernetes cluster with an istio service mesh. Debug logs look to show that it has gained a connection but it doesn't seem to then be able to connect. This is working fine in a namespace without istio enabled, so maybe its something to do with sitting behind a proxy? @kkrol89 @SamueleAlpino have you figured out any work arounds yet? |
I've resolved by adding appProtocol in service definition like this: apiVersion: v1
kind: Service
metadata:
name: {{ printf "%s-%s" .Values.projectName "service-headless" }}
labels:
app: {{ printf "%s-%s" .Values.projectName "serviceapp" }}
spec:
type: ClusterIP
clusterIP: None
publishNotReadyAddresses: true
selector:
app: {{ printf "%s-%s" .Values.projectName "app" }}
ports:
- name: "hazelcast"
port: 5701
protocol: TCP
appProtocol: tcp I found the solution in this thread |
Hi, recently i tried to upgrade hazelcast from :
com.hazelcast hazelcast-spring 4.0.6 com.hazelcast hazelcast 4.0.6 com.hazelcast hazelcast-kubernetes 2.2.3to:
com.hazelcast hazelcast-spring 5.1.1 com.hazelcast hazelcast 5.1.1I have a kubernetes cluster with some applications with those dependencies, last time when i upgraded the application the only think that i did was to kill the pods with the old version and no problems happened.
according the documentation i have a bean to configure the service dns:
@bean
public Config hazelcastConfig(Environment environment) {
Config config = new Config();
config.getNetworkConfig()
.getJoin()
.getMulticastConfig()
.setEnabled(false);
i have also :
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: apps-role
namespace: ${cluster_env}
rules:
resources: ["pods", "nodes", "services", "endpoints", "deployments"]
verbs: ["get", "list", "watch"]
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: apps-role-binding
namespace: ${cluster_env}
roleRef:
kind: ClusterRole
name: apps-role
apiGroup: rbac.authorization.k8s.io
subjects:
name: default
namespace: ${cluster_env}
The problem is that one pod goes on 2/2 without problems , the other one continue to crash and print:
java.util.concurrent.TimeoutException: JoinMastershipClaimOp failed to complete within 9999991351 NANOSECONDS.
My claim to be master is rejected!
Setting master address to null
NOT sending master question to blacklisted endpoints
ending master question to [...]:5701
Connection to: [...]:5701 streamId:-1 is already in progress
am i missing any configurations?
The text was updated successfully, but these errors were encountered: