k8ssandra / k8ssandra-operator

The Kubernetes operator for K8ssandra
https://k8ssandra.io/
Apache License 2.0
158 stars 74 forks source link

Cassandra cluster doesn't start if nodes > 2 #1385

Open luigiba opened 3 weeks ago

luigiba commented 3 weeks ago

What happened?

Hello everyone, I'm trying to create a simple test 3 nodes cluster with 1 dc and 1 rack. Two nodes starts correctly. The third one has the following error in logs: "The seed provider lists no seeds".The nodes which correctly started have the label "cassandra.datastax.com/seed-node=true". Moreover, If I try to create a 2 nodes cluster everything works correctly. The problem raises with clusters with more than 2 nodes in my case.I also tried to overwrite the seed_provider from cassandraYaml option with "fully qualified" names (with 'svc.cluster.local' suffix) but nothing changed.

Environment

apiVersion: k8ssandra.io/v1alpha1
kind: K8ssandraCluster
metadata:
  name: cassandra-cluster-test
  namespace: agile
spec:
  cassandra:
    serverVersion: "4.0.1"
    datacenters:
      - metadata:
          name: dc1
        size: 3
        storageConfig:
          cassandraDataVolumeClaimSpec:
            accessModes:
              - ReadWriteOnce
            resources:
              requests:
                storage: 10Gi
        resources:
          requests:
            memory: 8Gi
            cpu: 500m
          limits:
            memory: 8Gi
            cpu: 2000m
        config:
          jvmOptions:
            heap_initial_size: 4G
            heap_max_size: 7G
WARN  [main] 2024-08-13 15:48:37,335 K8SeedProvider4x.java:47 - Seed provider couldn't lookup host cassandra-cluster-test-seed-service
WARN  [main] 2024-08-13 15:48:57,348 K8SeedProvider4x.java:47 - Seed provider couldn't lookup host cassandra-cluster-test-dc1-additional-seed-service
ERROR [main] 2024-08-13 15:48:57,349 CassandraDaemon.java:909 - Exception encountered during startup: The seed provider lists no seeds.

┆Issue is synchronized with this Jira Story by Unito

luigiba commented 3 weeks ago

Further detail. This is the seed provider section of the cluster:

seed_provider:
    - class_name: org.apache.cassandra.locator.K8SeedProvider
      parameters:
        - seeds: cassandra-cluster-test-seed-service,cassandra-cluster-test-dc1-additional-seed-service