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

client watch failed when receive response **watch id is -1, and cancel reason is "etcdserver: invalid auth token" #1192

Open
lebronparker opened this issue Jul 17, 2023 · 3 comments

Comments

@lebronparker
Copy link

lebronparker commented Jul 17, 2023

Versions

  • etcd: v3.5.9
  • jetcd: v0.7.5
  • java: 11

Describe the bug
when client watch failed, then server response watch id is -1, and cancel reason is "etcdserver: invalid auth token", but implenment of code watchImp:262 will onError "etcd server failed to create watch id", and return it directly. it will cause watch problem, client watcher will not receive any message from etcd server.
image

To Reproduce

  1. start a etcd cluster first with user、 password, auth-token configuration is default "simple"
  2. start a register client and watcher client test it
  3. kill all etcd node of etcd cluster
  4. restart etcd cluser, then watcher client will receive invalid token exception

Expected behavior

  1. jetcd client should resume watchImp, and add token valid error check when watch exception
  2. if any other exception that jetcd should deal with

Additional context

  1. why jetcd client use cancel reason to check exception, if cause reason is changed, it will be unuseful
    image
@lburgazzoli
Copy link
Collaborator

it should have been fixed in 0.7.6, can you try it out ?

@lebronparker
Copy link
Author

it should have been fixed in 0.7.6, can you try it out ?

ok, i will try it later, thank you.

@lburgazzoli
Copy link
Collaborator

@lebronparker any update ?

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

No branches or pull requests

2 participants