如何將 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)

相關內容