AT

Connecting to local gremlin server with websocket address

Ddw--10/25/2023
Hello everyone. I'm looking for help with a client app written in Java that uses Tinkerpop Gremlin to interact with a Janusgraph instance. When developing new features, I run a local Janusgraph with a Gremlin server at localhost. I'm trying demonstrate that I can take a websocket url and establish a connection using that URL. I believe that the default websocket address for a local Gremlin server is ws://127.0.0.1:8182/gremlin. I'm trying to use a Cluster to create the connection and obtain a GraphTraversalSource. Here's what I'm trying. Cluster cluster = Cluster.build("ws://127.0.0.1:8182/gremlin").create(); GraphTraversalSource g = AnonymousTraversalSource.traversal().withRemote(DriverRemoteConnection.using(cluster)); This is throwing -- IllegalArgumentException: No such host is known (ws://127.0.0.1:8182/gremlin). Am I doing something wrong? Any help apprecitated!
Solution:
By default it will connect via websocket so you can try ``` Cluster cluster = Cluster.build("localhost"). path("/gremlin"). create();...
Jump to solution
Solution
Rryn10/25/2023
By default it will connect via websocket so you can try
Cluster cluster = Cluster.build("localhost").
path("/gremlin").
create();
Cluster cluster = Cluster.build("localhost").
path("/gremlin").
create();
Ddw--10/25/2023
Thanks, Ryan. Just to check my understanding here -- if i have an 'aliased' websocket URL, something like ws://mydomainname.com, then I would do Cluster cluster = Cluster.build("mydomainname.com"). path("/gremlin"). create(); correct?
Rryn10/25/2023
Yes I believe that's correct

Looking for more? Join the community!

Want results from more Discord servers?
Add your server
Recommended Posts
Clarification on Kerberos configuration for Gremlin DriverI'm a little bit unclear on the role of the JAAS configuration file for the Gremlin client in the coGremlin Driver and frequently changing serversIn a containerised environment, hosts are frequently replaced and their IP address can change severaGlobal SearchIs there a way where i can scan all the vertex or edge properties that match a given keyword in gremGraphSON mapperHi, I'm trying to ingest some data into AWS Neptune and due to its size I'm forced to use a bulk d.drop() behavior confussionI have a basic java app and I'm learning hot to send gremlin queries to a JanusGraph from that java Can I name the result of an anonymous traversal without moving the traverser?I can currently do the following: ``` Graph graph = TinkerFactory.createModern(); GraphTraversalSCan GraphBinary be used to save a graph to file?Can GraphBinary be used to save graph in a file. Any example is welcome.How to get cardinality of property?I have a multi property and I want to find out its cardinality. How can I do that? valueMap/elementMinverted regex searchHey, In my vertices I store escaped regexp statements as labels (e.g: 'wh.' which in theory should Debug message spam from tinkerpop server 3.7Right now, when connecting to my local tinkerpop server, I am getting incredible amounts of debug loShould by() Modulator Work For More Types?This works. `gremlin> g.V().out().out().path().by("name") ==>[marko,josh,ripple] ==>[marko,josh,lop]InProcess GraphDB with Gremlin Support? (C# or NodeJS)Hello, is there any in process GraphDB out there in the world? Best would be c# or NodeJS and not Ja