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

com.vesoft.nebula.client.graph.exception.AuthFailedException: Auth failed: Authenticate failed: Expected protocol id ffffff82 but got 0 #304

Closed
kinda830 opened this issue Jun 2, 2021 · 9 comments

Comments

@kinda830
Copy link

kinda830 commented Jun 2, 2021

com.vesoft.nebula.client.graph.exception.AuthFailedException: Auth failed: Authenticate failed: Expected protocol id ffffff82 but got 0
集群的登录验证没有开,但是登录失败

@wey-gu
Copy link
Contributor

wey-gu commented Jun 2, 2021

Dear @kinda830,

Could you please check one thing: the nebula java client's version matches the nebula graph server side?

  • java-client version
  • nebula-graph version

Thanks.

@kinda830
Copy link
Author

kinda830 commented Jun 2, 2021

nebulagraph : 2.0.0-nightly
java-client: 2.0.0

java-client:2.0.0-SNAPSHOT 这个版本的依赖无法解决,找不到这个版本

@kinda830
Copy link
Author

kinda830 commented Jun 2, 2021

Dear @kinda830,

Could you please check one thing: the nebula java client's version matches the nebula graph server side?

  • java-client version
  • nebula-graph version

Thanks.

nebulagraph : 2.0.0-nightly
java-client: 2.0.0

java-client:2.0.0-SNAPSHOT 这个版本的依赖无法解决,找不到这个版本

@wey-gu
Copy link
Contributor

wey-gu commented Jun 2, 2021

Dear @kinda830

You are right, 2.0.0-SNAPSHOT should be the client to be used as there were thrift changes between 2.0.0-nightly and 2.0.0 GA+, thus the RPC call including authentication itself may encounter protocol issues as you did through 2.0.0 client.

@Nicole00 could you help hint @kinda830 's dependencies issue?

Thanks!

@Nicole00
Copy link
Contributor

Nicole00 commented Jun 2, 2021

Dear @kinda830,
Could you please check one thing: the nebula java client's version matches the nebula graph server side?

  • java-client version
  • nebula-graph version

Thanks.

nebulagraph : 2.0.0-nightly
java-client: 2.0.0

java-client:2.0.0-SNAPSHOT 这个版本的依赖无法解决,找不到这个版本

You are using Nebula nightly, please make sure the client version is 2.0.0-SNAPSHOT. You can find the snapshot version from there: https://oss.sonatype.org/content/repositories/snapshots/com/vesoft/client/2.0.0-SNAPSHOT/

In your own pom.xml, you can add snapshot repository to auto download client-2.0.0-SNAPSHOT.jar.

<repositories>
        <repository>
            <id>snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </repository>
    </repositories>

@Nicole00
Copy link
Contributor

Nicole00 commented Jun 2, 2021

com.vesoft.nebula.client.graph.exception.AuthFailedException: Auth failed: Authenticate failed: Expected protocol id ffffff82 but got 0
集群的登录验证没有开,但是登录失败

Please check if you use the correct graphd's host and port, can you post your code to establish a connection with Nebula Graph ?

@aminmaghsodi
Copy link
Contributor

Hi, I have the same problem.
I use client v2.0.0 and server v2.0.0
Today I see this error, every time I start my application.
Sometimes when I activate debug mode, when I execute session.execute(some_command), client executes it well, but when I deactivate debug mode and run it normally it throws the below exception.

com.vesoft.nebula.client.graph.exception.IOErrorException: Expected protocol id ffffff82 but got 7
	at com.vesoft.nebula.client.graph.net.SyncConnection.execute(SyncConnection.java:74) ~[client-2.0.0.jar:?]
	at com.vesoft.nebula.client.graph.net.Session.execute(Session.java:46) ~[client-2.0.0.jar:?]

@aminmaghsodi
Copy link
Contributor

aminmaghsodi commented Jul 10, 2021

Finally I found it!
In my case, the error was using one instance of session by multi threads.
I have designed an object pool of sessions which keeps using sessions and assigns them to requester. In my case there was some cases that two threads request for one instance of session and therefore it throws the mentioned error.
I think you can search your code for some cases that session could be used by 2 requester by executing session.execute()

@wey-gu
Copy link
Contributor

wey-gu commented Jul 16, 2021

Will close it as it's been inactive for days. Feel free to reopen it.

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

No branches or pull requests

4 participants