尝试使用datastax python驱动程序在cassandra上创建键空间

2fjabf4q  于 2021-06-09  发布在  Cassandra
关注(0)|答案(0)|浏览(262)

我有一个奇怪的错误,我似乎无法绕过,python错误是我似乎无法解决的东西,无法解决的接触点听起来像ip问题?当我看下面的客户机时,集群ip是无的

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

我只想在env中传递下面的参数:

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

在......下面

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: {}

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题