dee2xu
Explore posts from serversATApache TinkerPop
•Created by dee2xu on 10/25/2023 in #questions
Connecting to local gremlin server with websocket address
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!
6 replies