Azure-cosmos-dotnet-v2: Cannot connect to emulator with Gremlin.Net

Created on 28 Mar 2018  路  6Comments  路  Source: Azure/azure-cosmos-dotnet-v2

When trying to connect to the emulator using Gremlin.Net I received the following exception:
System.Net.WebSockets.WebSocketException (0x80004005): The server returned status code '200' when status code '101' was expected.

My setup was this:
```c#
var gremlinServer = new GremlinServer(
hostname: "localhost",
port: 8081,
enableSsl: true,
username: "/dbs/Graph/colls/Graph",
password: "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=="
);

var client = new GremlinClient(gremlinServer, new GraphSON2Reader(), new GraphSON2Writer(), GremlinClient.GraphSON2MimeType);

await client.SubmitAsync("g.inject(0)");
```

graph planned

Most helpful comment

@BenjaBobs - Unfortunately the emulator does not include the Gremlin server yet.
We are planning on including including Gremlin server in a future CosmosDB emulator release so that this avenue for testing is available.

All 6 comments

@olivertowers please look into it.

@BenjaBobs - Unfortunately the emulator does not include the Gremlin server yet.
We are planning on including including Gremlin server in a future CosmosDB emulator release so that this avenue for testing is available.

@olivertowers Any ETA on this?

When can we see this in a release?

Latest Cosmos DB emulator supports enabling a Gremlin server endpoint. See Gremlin API section in developing with the emulator.

https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator#developing-with-the-emulator

As with the production environment, you will need to create a database and collection on the emulator before connecting to the server via a Gremlin client.

I am using the same piece of code as @BenjaBobs and I am getting the following exception when trying to connect to the emulator : Error while processing files: System.Net.WebSockets.WebSocketException (997): Unable to connect to the remote server

The CosmosDB emulator is running, I have created my collection, the Gremlin console has been started... am I missing a step ?

Was this page helpful?
0 / 5 - 0 ratings