Reputation: 347
I have a Cassandra image that worked with a GKE cluster v1.0.7 but has occassional issues starting on a new GKE cluster at v1.1.1 (no changes to the image or how it is created with kubectl just pointing to a new cluster).
I am using kubernetes-cassandra.jar from the kubernetes Cassandra example on github.
I see the following in kubectl logs.
INFO 21:57:01 Getting endpoints from https://kubernetes.default.cluster.local/api/v1/namespaces/default/endpoints/cassandra
ERROR 21:57:01 Fatal error during configuration loading
java.lang.NullPointerException: null
at io.k8s.cassandra.KubernetesSeedProvider.getSeeds(KubernetesSeedProvider.java:129) ~[kubernetes-cassandra.jar:na]
at org.apache.cassandra.config.DatabaseDescriptor.applyConfig(DatabaseDescriptor.java:659) ~[apache-cassandra-2.1.11.jar:2.1.11]
at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:136) ~[apache-cassandra-2.1.11.jar:2.1.11]
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:168) [apache-cassandra-2.1.11.jar:2.1.11]
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:562) [apache-cassandra-2.1.11.jar:2.1.11]
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:651) [apache-cassandra-2.1.11.jar:2.1.11]
null
Fatal error during configuration loading; unable to start. See log for stacktrace.
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
cassandra 0/1 CrashLoopBackOff 8 13m
Has anyone seen this error or have ideas on how to troubleshoot?
Upvotes: 1
Views: 173
Reputation: 1711
It happens when service endpoint is not ready. To verify that, please check output of kubectl get endpoints
against Cassandra service. If it is blank, then it means KubernetesSeedProvider
is not able to deserialize the output received from Kubernetes API server as the endpoint's address is in notReadyAddresses
state.
One possible work-around to this problem is to create a Cassandra pod before creating Cassandra service.
Upvotes: 1