Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When use gremlin session client will cause Failed to authenticate #4206

Open
MiracleDx opened this issue Jan 16, 2024 · 7 comments
Open

When use gremlin session client will cause Failed to authenticate #4206

MiracleDx opened this issue Jan 16, 2024 · 7 comments

Comments

@MiracleDx
Copy link

MiracleDx commented Jan 16, 2024

I used session client to query, but it will cause Failed to authenticate in some times. I makesure username and password is right. I used it like

Cluster cluster = Cluster.open(filepath);
String uuid = UUID.randomUUID().toString();
Client client = cluster.connect(uuid);
client.submit("g.tx().open()"); 
client.submit(""); // this line is query something
...
client.submit("g.tx().commit()");

It will be throw Exception about "org.apache.tinkerpop.gremlin.driver.exception.ResponseException: Failed to authenticate". But when I request next, it will return sucess.

My Janusgraph is

  • Version: 1.0.0

  • Storage Backend: hbase

  • Mixed Index Backend: elasticsearch

  • Expected Behavior:

  • Current Behavior:

  • Steps to Reproduce:

Stack Trace

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:201)
	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at org.apache.tinkerpop.gremlin.driver.Handler$GremlinSaslAuthenticationHandler.channelRead0(Handler.java:127)
	at org.apache.tinkerpop.gremlin.driver.Handler$GremlinSaslAuthenticationHandler.channelRead0(Handler.java:69)
	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93)
	at io.netty.handler.codec.http.websocketx.Utf8FrameValidator.channelRead(Utf8FrameValidator.java:82)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at java.lang.Thread.run(Thread.java:748)
@MiracleDx
Copy link
Author

I did some verification

client.submit("g.tx().open()"); 
Thread.sleep(300)
client.submit(""); // this line is query something
client.submit("g.tx().commit()");

or

client.submit(""); // this line is submit something
client.submit("g.tx().rollback()");

Those two ways didn't throw exception.

@FlorianHockmann
Copy link
Member

I wonder whether this is simply a variation of this TinkerPop issue: https://issues.apache.org/jira/browse/TINKERPOP-2132

@MiracleDx
Copy link
Author

issues.apache.org/jira/browse/TINKERPOP-2132

I wonder whether this is simply a variation of this TinkerPop issue: issues.apache.org/jira/browse/TINKERPOP-2132
Yes,I think so. I was used Gremlin 3.7.0,Is there a solution?

@FlorianHockmann
Copy link
Member

Not yet, but there is an open PR which should fix this problem: apache/tinkerpop#2525.
It will probably be released with TinkerPop 3.7.2 at the beginning of April. JanusGraph will then get the fix as soon as it upgrades to that version.

@MiracleDx
Copy link
Author

Not yet, but there is an open PR which should fix this problem: apache/tinkerpop#2525. It will probably be released with TinkerPop 3.7.2 at the beginning of April. JanusGraph will then get the fix as soon as it upgrades to that version.

Thanks. I will keep attention it.

@MiracleDx
Copy link
Author

Not yet, but there is an open PR which should fix this problem: apache/tinkerpop#2525. It will probably be released with TinkerPop 3.7.2 at the beginning of April. JanusGraph will then get the fix as soon as it upgrades to that version.

Hi, I already upgraded gremlin-client to 3.7.2, but it didn't work. Janusgraph has a upgrades plans to that version?

@FlorianHockmann
Copy link
Member

FlorianHockmann commented May 27, 2024

JanusGraph already supports TinkerPop 3.7.2 on master: #4404. So you could use a snapshot release to already get this fix instead of having to wait for the next official release.
If you decide to try that out, then it would of course be great if you could let us know here whether it solved the issue or not. So we know whether we can close this as fixed or whether we need to investiage this some more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants