Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2132

Authentication when using multiple threads fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.3.2
    • 3.7.2
    • driver
    • None

    Description

      Scenes:

         1. Gremlin Server  Kerberos Authentication

         2. Multithreading using the same client

       

             DriverRemoteConnection connection = DriverRemoteConnection.using(cluster,"graphbase");
              GraphTraversalSource g = graph.traversal().withRemote(connection);
            Thread demo1 = new Thread(new ThreadDemo1(g));
             Thread demo2 = new Thread(new ThreadDemo1(g));
             Thread demo3 = new Thread(new ThreadDemo1(g));
             Thread demo4 = new Thread(new ThreadDemo1(g));
             Thread demo5 = new Thread(new ThreadDemo1(g));
            Thread demo6 = new Thread(new ThreadDemo1(g));
             Thread demo7 = new Thread(new ThreadDemo1(g)); 
             Thread demo8 = new Thread(new ThreadDemo1(g));
             Thread demo9 = new Thread(new ThreadDemo1(g));
             Thread demo10 = new Thread(new ThreadDemo1(g));
      

       

      ERROR INFO

      Exception in thread "Thread-4" java.util.concurrent.CompletionException: org.apache.tinkerpop.gremlin.driver.exception.ResponseException: Failed to authenticate
       at java.util.concurrent.CompletableFuture.reportJoin(CompletableFuture.java:375)
       at java.util.concurrent.CompletableFuture.join(CompletableFuture.java:1934)
       at org.apache.tinkerpop.gremlin.driver.ResultSet.one(ResultSet.java:107)
       at org.apache.tinkerpop.gremlin.driver.ResultSet$1.hasNext(ResultSet.java:159)
       at org.apache.tinkerpop.gremlin.driver.ResultSet$1.next(ResultSet.java:166)
       at org.apache.tinkerpop.gremlin.driver.ResultSet$1.next(ResultSet.java:153)
       at org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteTraversal$TraverserIterator.next(DriverRemoteTraversal.java:142)
       at org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteTraversal$TraverserIterator.next(DriverRemoteTraversal.java:127)
       at org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteTraversal.nextTraverser(DriverRemoteTraversal.java:108)
       at org.apache.tinkerpop.gremlin.process.remote.traversal.step.map.RemoteStep.processNextStart(RemoteStep.java:80)
       at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143)
       at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:192)
       at com.huawei.graphbase.gremlin.ThreadDemo1.println(ThreadDemo1.java:48)
       at com.huawei.graphbase.gremlin.ThreadDemo1.run(ThreadDemo1.java:32)
       at java.lang.Thread.run(Thread.java:748)
       Caused by: org.apache.tinkerpop.gremlin.driver.exception.ResponseException: Failed to authenticate
       at org.apache.tinkerpop.gremlin.driver.Handler$GremlinResponseHandler.channelRead0(Handler.java:246)
       at org.apache.tinkerpop.gremlin.driver.Handler$GremlinResponseHandler.channelRead0(Handler.java:197)
       at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373)
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
       at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:351)
       at org.apache.tinkerpop.gremlin.driver.Handler$GremlinSaslAuthenticationHandler.channelRead0(Handler.java:123)
       at org.apache.tinkerpop.gremlin.driver.Handler$GremlinSaslAuthenticationHandler.channelRead0(Handler.java:67)
       at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373)
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
       at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:351)
       at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373)
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
       at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:351)
       at org.apache.tinkerpop.gremlin.driver.handler.WebSocketClientHandler.channelRead0(WebSocketClientHandler.java:94)
       at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373)
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
       at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:351)
       at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
       at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373)
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)v[2072680]
       at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:351)
       at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373)
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
       at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
       at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129)
       at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:651)
       at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:574)
       at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:488)
       at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:450)
       at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873)
       ... 1 more

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kaiyangzhang kaiyangzhang
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: