[
https://issues.apache.org/jira/browse/TINKERPOP3-815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14718523#comment-14718523
]
stephen mallette commented on TINKERPOP3-815:
---------------------------------------------
I'm not completely clear on what you're trying to do, but if Gremlin Server is
configured for REST you can't connect to it via WebSockets and the java driver
without re-configuring it for that type of communication. If you want
websockets then your yaml file should have this:
https://github.com/apache/incubator-tinkerpop/blob/3b6e52582c55e6c673ab33516d517a62116daa54/gremlin-server/conf/gremlin-server.yaml#L24
if you want REST it should have:
https://github.com/apache/incubator-tinkerpop/blob/3b6e52582c55e6c673ab33516d517a62116daa54/gremlin-server/conf/gremlin-server-rest-modern.yaml#L24
Is that your problem?
> Unable to connect to the Tinkerpop gremlin-server from gremlin-driver from
> scala application
> --------------------------------------------------------------------------------------------
>
> Key: TINKERPOP3-815
> URL: https://issues.apache.org/jira/browse/TINKERPOP3-815
> Project: TinkerPop 3
> Issue Type: Bug
> Components: driver, server
> Affects Versions: 3.0.0-incubating
> Reporter: Venkata Phani Kumar Mangipudi
> Assignee: stephen mallette
>
> I've a titan 0.9.0-M2 running in server mode through a docker container
> connecting to elasticsearch and cassandra containers. All the containers
> running from a ubuntu linux 14.04.1 server. This gremlin-server is then
> exposed via nginx for websocket and http connections.
> Gremlin-server started without any errors in the log file.
> I am able to connect to the gremlin server from postman client on another
> windows desktop machine "http://titandb.in/gremlin?gremlin=100-1" and get the
> correct response.
> But when I am trying to connect using gremlin-driver from a scala
> application, I am not able to get through to the gremlin-server.
> I could see following error in nginx error log:
> 2015/08/28 18:16:38 [error] 4478#0: *22964 connect() failed (111: Connection
> refused) while connecting to upstream, client: 192.168.1.5, server:
> dev.myserver.in, request: "GET /gremlin HTTP/1.1", upstream:
> "http://[::1]:8182/gremlin", host: "dev.myserver.in:80"
> The gremlin-server.log file in the server shows following error message for
> the connect() requests from gremlin-driver:
> 7466936 [gremlin-server-worker-1] WARN
> org.apache.tinkerpop.gremlin.server.handler.HttpGremlinEndpointHandler -
> Invalid request - responding with 400 Bad Request and no gremlin script
> supplied
> Tried to connect to the server websockets from ubuntu server via curl command
> as follows, but the websockets connection is not initiated:
> $ curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host:
> localhost" -H "Origin: http://localhost:8182"
> http://localhost:8182/gremlin?gremlin=100-1
> This results in the normal json response but doesn't start a websocket
> connection.
> if I am doing something wrong, please suggest a right direction
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)