【问题标题】:How to set up gremlin console to work against local Azure CosmosDB Emulator?如何设置 gremlin 控制台以针对本地 Azure CosmosDB 模拟器工作?
【发布时间】:2020-02-21 00:45:12
【问题描述】:

我有一些针对 Azure CosmosDB 模拟器在本地运行的软件,它运行良好,但是当我尝试使用 gremlin 控制台(版本 3.4.4)时,我无法让它工作。

根据 Microsoft 文档 https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/cosmos-db/create-graph-gremlin-console.md 和我现有的工作应用程序,我设置了本地 yaml 文件

hosts: [localhost]
port: 8901
username: /dbs/GremlinNoteDB/colls/CrmCollection
password: C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==
connectionPool: { enableSsl: true }
serializer: { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV2d0, config: { serializeResultToString: true }}

然后运行命令...

gremlin> :remote connect tinkerpop.server conf/cosmos_local.yaml

...导致以下输出(在我未经训练的人看来)看起来不错。

gremlin> :remote connect tinkerpop.server conf/cosmos_local.yaml
==>Configured localhost/127.0.0.1:8901, localhost/0:0:0:0:0:0:0:1:8901

但是当我尝试运行如下所示的 gremlin 命令时,它会失败。我错过了什么明显的东西吗?我曾尝试更改 ssl 并使用其他序列化程序,但无济于事。

gremlin> :> g.V().count()
Host did not respond in a timely fashion - check the server status and submit again.
Type ':help' or ':h' for help.
Display stack trace? [yN]

欢迎任何和所有的帮助。我在stackoverflow上查看了其他相关帖子,但它们并没有解决我的问题。总结一下:Azure CosmosDB 模拟器可以工作,因为我可以连接到我的 .net 应用程序,但我无法让 gremlin 控制台工作。

【问题讨论】:

    标签: azure-cosmosdb gremlin azure-storage-emulator


    【解决方案1】:

    目前似乎 gremlin 控制台(版本 3.4.4)不支持与 Azure CosmosDB 模拟器的连接(至少以 here 显示的形式)。 改用 gremlin 控制台 3.3.4

    【讨论】:

      【解决方案2】:

      CosmosDB 模拟器无需 SSL 即可工作。

      设置{ enableSsl: false } 应该可以解决您的问题。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-01-19
        • 2019-11-27
        • 2016-11-04
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多