Trying to create a keyspace on cassandra with datastax python driver

664 views Asked by At

I have this weird error i can't seem to get around, the python error is something i cant seem to figure out, unresolvable contact point sounds like ip issue? cluster-ip is none when i look at the client below

NAME↑                                  TYPE       CLUSTER-IP      EXTERNAL-IP SELECTOR                                                                                                                                                PORTS                                       │
│ rook-cassandra-client                  ClusterIP  None            <none>      app=rook-cassandra,app.kubernetes.io/managed-by=rook-cassandra-operator,app.kubernetes.io/name=rook-cassandra,cassandra.rook.io/cluster=rook

All i am trying to do is pass arguments below in env:

      env:
        replicationClass: SimpleStrategy
        replicationFactor: 3
        name: sample
        cluster: rook-cassandra-client
        namespace: xxxx-cassandra

below

FailedCreatePodSandBox
Failed create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" network for pod "rook-cassandra-create-keyspace-job-zf4p9": NetworkPlugin cni failed to set up pod "rook-cassandra-create-keyspace-job-xxxxx_xxxx-cassandra" network: add cmd: failed to assign an IP address to container
{}
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.8/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/audit/__main__.py", line 54, in <module>
    main()
  File "/audit/__main__.py", line 50, in main
    print(args.func(args))
  File "/audit/__main__.py", line 9, in keyspace
    keyspace.create(args.name, args.replication_class, args.replication_factor, args.cluster, args.namespace)
  File "/audit/keyspace/create_keyspace.py", line 17, in create
    raise e
  File "/audit/keyspace/create_keyspace.py", line 14, in create
    session = self.__connect_to_cluster(cassandra_service, cassandra_namespace)
  File "/audit/keyspace/create_keyspace.py", line 8, in __connect_to_cluster
    cluster = Cluster([f"{service}.{namespace}"])
  File "/usr/local/lib/python3.8/site-packages/cassandra/cluster.py", line 1174, in __init__
    raise UnresolvableContactPoints(self._endpoint_map_for_insights)
cassandra.UnresolvableContactPoints: {}


0

There are 0 answers