[ 
https://issues.apache.org/jira/browse/TINKERPOP-2044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16632520#comment-16632520
 ] 

ASF GitHub Bot commented on TINKERPOP-2044:
-------------------------------------------

GitHub user spmallette opened a pull request:

    https://github.com/apache/tinkerpop/pull/943

    TINKERPOP-2044 Configurable traversal to validate host connectivity.

    https://issues.apache.org/jira/browse/TINKERPOP-2044
    
    The user can now configure the script used to validate the operations of 
the remote.
    
    ```text
    Cluster cluster = Cluster.build().validationRequest("g.inject()").create()
    ```
    
    Builds with `mvn clean install -pl gremlin-driver && mvn verify -pl 
gremlin-server -DskipIntegrationTests=false`
    
    VOTE +1

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/tinkerpop TINKERPOP-2044

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tinkerpop/pull/943.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #943
    
----
commit bd1760f56a1e70cc49f4129a367c60e748aa54ad
Author: Stephen Mallette <spmva@...>
Date:   2018-09-28T19:54:30Z

    TINKERPOP-2044 Configurable traversal to validate host connectivity.

----


> Cannot reconnect to Azure cosmos host that becomes available again
> ------------------------------------------------------------------
>
>                 Key: TINKERPOP-2044
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2044
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: driver
>    Affects Versions: 3.3.3
>            Reporter: Dantis P S
>            Assignee: stephen mallette
>            Priority: Major
>
> If a Azure Cosmos Gremlin host goes down and if it becomes available again, 
> the tinkerpop3 java driver cannot reconnect to it. 
> Sample code is available at [https://github.com/cancure/tinkerpopcosmos]
>  
> These are the steps to reproduce - 
> 1) Start the application after providing proper connection details in 
> remote.yaml file.
> 2) Call the end point POST [http://localhost:8080/query.] Pass a valid 
> gremlin query as HTTP body E.g. g.V(1).id()
> 3) Disconnect computer from internet. 
> 4) Do step 2.
> 5) Reconnect computer to the internet.
> 6) Do step 2. 
> Any query executed from this point onwards gets the error - 
> "java.lang.RuntimeException: java.util.concurrent.TimeoutException: Timed out 
> while waiting for an available host - check the client configuration and 
> connectivity to the server if this message persists".
>  
> The issue seems to be coming from 
> org.apache.tinkerpop.gremlin.driver.ConnectionPool.java. In line #403, the 
> gremlin query used for ping message is '' (Empty string in single quotes). 
> final RequestMessage ping = 
> RequestMessage.build(Tokens.OPS_EVAL).add(Tokens.ARGS_GREMLIN, "''").create();
>  
> Cosmos server returns an error saying that the gremlin query's grammar is 
> incorrect. Because of this error the rest of the lines of the method does not 
> get executed.
>  
> Fix will be to use a gremlin query which is valid for all supported graph DBs.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to