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

Frequent Prefix Registration Failure #34

Open
justincpresley opened this issue Oct 23, 2021 · 4 comments
Open

Frequent Prefix Registration Failure #34

justincpresley opened this issue Oct 23, 2021 · 4 comments

Comments

@justincpresley
Copy link

System: Ubuntu 20.04
Forwarder Version: NFD-nightly, latest pull
Scope: When working with heavy applications using python-ndn that register more than 2+ prefixes.
Error Frequency: Around 1 per 10 registrations, starting to see this problem more though.

Situation: When working on ndn-hydra, an application that listens to around 6+ different prefixes, I noticed that I would consistently get the error Registration for PREFIX failed: 403 authorization rejected for about half of the times that I ran the application. I dismissed this fact when first encountered, and later become curious which lead me to open this issue for NFD-nightly as I thought it was a forwarding-related problem.

Reproducing: You can see this error in action if you run ndn-hydra. It might not happen in the very first run, but a couple will bound to produce this error.

Problem: As stated in the issue, @yoursunny noted that the error is likely a result of python-ndn not implementing stop and wait correctly. More information is found inside that issue.

@justincpresley
Copy link
Author

justincpresley commented Oct 23, 2021

Hey, feel more than free to delay this issue until appropriate time can be allocated. It is not an urgent issue and can be worked around till it can be fixed.

@zjkmxy
Copy link
Member

zjkmxy commented Oct 23, 2021

Last time this happens because the same key was used to sign multiple registration commands in one ms. Somehow NFD prevents this. I added a delay function in sending command Interests to slow it down.
If you use python-ndn with multithreading, probably the delay does not work properly. You can try to slow down registration (1-2ms is enough, which does not impede performance much) and see what happens.

@yoursunny
Copy link
Member

yoursunny commented Oct 23, 2021

If you specifically talk about Hydra:

  • Hydra calls for running four instances on the same machine.
  • If all four instances are using the same keychain, delaying 1ms after every command would not prevent the problem.
  • Instead, you need to start each instance on a separate keychain / sign commands with a separate key.

@justincpresley
Copy link
Author

justincpresley commented Oct 23, 2021

I would like to point out that even running one Hydra node results in this problem, so while ensuring instance separation (like key maagement) could help, the existence of multiple instances does not complete the problem.

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

3 participants