-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
Network collapses when Node is closed #98
Comments
One thing that may be helpful to convey up front is that all nodes on the network are storage nodes. At point 3 (if I understand your list correctly) you start a 4th node (what you call a "setter" node) that announces to the network that it is available to store things. Your network has 4 nodes at that point. If your 4th node then shuts off, the other 3 nodes still think they're on a 4 node network. At that point you have shut off 25% of your storage capacity. When you try to do anything on the network at that point, the remaining 3 nodes will produce messages about not being able to reach the 4th node that has now disappeared. A second item that may be helpful - so long as there is at least 1 node, and you are able to connect to it with a second node, your second node should be able to get/set values on the network (even with messages about not being able to reach nodes that may no longer be available). With that in mind, I'd be interested to get more specifics about what you're experiencing compared to what you're expecting. For instance:
|
Okay maybe i just wrote it a little bit clumsy because my english is not the best one.
Let me know if you need better information. Thanks for your help and this awesome project! |
Thanks @FlorianG2021 - if you're seeing nodes removed from the routing table when they are still reachable then that could definitely be signs of a bug. I'll try to dig in to see if I can reproduce, but it may take a little while before I have time. |
No problem - I have to say thanks to you for this nice project. If I can help you to find/fix this by giving more details/logs just let me know. :) |
I have a happy addition @bmuller. |
For now it seems to work. |
Still no changes. I can run different examples and projects of myself with the Kademlia Library, but under Windows 10 + PyCharm im still losing the neighbors all the time. I even tried setting up different virtual interpreter and tried using a global system interpreter. |
@FlorianG2021 could there be some sort of Windows firewall that's enabled? |
@bmuller Now im really triggered and want to know if my windows systems are broken (but it would be strange because I tried it with 2 different devices). :D |
@bmuller the problem is also available under a Windows 10 Enterprise Test VM. I used a Python 3.8 Interpreter (worked out-of-the-box in Kubuntu but not in Windows). |
Hey @FlorianG2021 - thanks for that update. I don't have access to a windows machine for testing, so unfortunately this isn't something I'm able to look into. If you're able to find a solution, I would happily accept a pull request, though. I'm going to close the issue for now, but please feel free to update with any other comments RE what you discover. |
When i use multiple nodes like 1 Bootstrap with 1-x Nodes and 1-2 get/set Nodes the network collapses as soon as I close one of the Nodes. All nodes have different ports where they are listening on and getting bootstraped by the Bootstrap Node.
For an example I do this steps:
Edit: Threw out the ZIP because now there is Gist attached.
I have the same results when i keep the Getter 1 and Setter 1 running in a while-true loop with "asyncio.sleep(5)". Than its crashing as soon as I close Node 2 and Start Node 4 (see step 6 and 7).
I tried many other combinations with less or more nodes and the result is always the same. The network always is collapsing with messages like this until setting and getting of key/value pairs is impossible and/or only the bootstrap node is left in the routing table:
Normall the network should work normally when a node is getting closed right?
I am using "PyCharm Community Edition 2020.2.3 x64" on Windows 10 and Python 3.9.
The text was updated successfully, but these errors were encountered: