如何将 Janusgraph 0.4.0 连接到 COSMOS DB(Cassandra API)?

如何将 Janusgraph 0.4.0 连接到 COSMOS DB(Cassandra API)?

我正在尝试使用以下属性文件从 janusgraph(在 Azure VM 上)连接到 Azure Cosmos DB(Cassandra API)

janusgraph-cql.properties 文件

gremlin.graph=org.janusgraph.core.JanusGraphFactory
graph.set-vertex-id = false
storage.backend=cql
storage.hostname=xx.xx.xxx.xxxx
storage.port=10350
storage.cassandra.keyspace=janusgraph
storage.username=hipcosmosdb-cass
storage.password=***************
storage.cassandra.ssl.enabled=true
storage.cassandra.ssl.truststore.location=/data/certs/cacerts.jks
storage.cassandra.ssl.truststore.password=*****

我能够从同一个虚拟机连接到运行 java 快速启动代码的数据库。

快速启动代码配置文件

###Cassandra endpoint details on cosmosdb
cassandra_host=xxxxxxxxxxxxx
cassandra_port=10350
cassandra_username=hipcosmosdb-cass
cassandra_password=************
ssl_keystore_file_path=/data/certs/cacerts.jks
ssl_keystore_password=******

相关端口规则添加完毕,仍然出现如下错误。

Caused by: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: xxxxxxxxxx:10350 (com.datastax.driver.core.exceptions.OperationTimedOutException: [/40.89.132.238:10350] Operation timed out))
        at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:268)
        at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:107)
        at com.datastax.driver.core.Cluster$Manager.negotiateProtocolVersionAndConnect(Cluster.java:1652)
        at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1571)
        at com.datastax.driver.core.Cluster.init(Cluster.java:208)
        at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:376)
        at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:355)
        at com.datastax.driver.core.Cluster.connect(Cluster.java:305)
        at org.janusgraph.diskstorage.cql.CQLStoreManager.initializeSession(CQLStoreManager.java:302)
        at org.janusgraph.diskstorage.cql.CQLStoreManager.<init>(CQLStoreManager.java:174)

相关内容