Code Monkey home page Code Monkey logo

Comments (6)

bmuller avatar bmuller commented on May 13, 2024

@iTecAI please disable all firewall rules and also try using 127.0.0.1 as the host if you're running on the same machine (it's possible that your operating system doesn't resolve your IP as the same host).

This library is not officially supported in windows, but it should work.

from kademlia.

iTecAI avatar iTecAI commented on May 13, 2024

I have applied those changes and the issue is the same as before. My firewall is completely off as I am on a private network, and changing the IP to localhost/127.0.0.1 does not resolve the issue.

from kademlia.

bmuller avatar bmuller commented on May 13, 2024

@iTecAI can you send the output from running the following in two different console windows (don't use start, or any other windows specific stuff, just run these specific commands in 2 separate console windows):

Console Window One

> python first_node.py

Console Window Two

> python set.py 127.0.0.1 8468 key value

If you can put the output from both windows here, that might help diagnose.

from kademlia.

iTecAI avatar iTecAI commented on May 13, 2024

first_node.py

D:\Downloads\kademlia-master\kademlia-master\examples>python first_node.py
2020-07-18 15:15:51,039 - kademlia.network - INFO - Node 81011206440633377725205859190027940965572046235 listening on 127.0.0.1:8468
2020-07-18 15:15:51,041 - kademlia.network - DEBUG - Refreshing routing table

< I pressed Ctrl+C after a bit here, just to see what would happen >

2020-07-18 15:16:28,178 - kademlia.protocol - INFO - never seen 127.0.0.1:8469 before, adding to router
Executing <Task finished name='Task-4' coro=<RPCProtocol._accept_request() done, defined at C:\Python38\lib\site-packages\rpcudp\protocol.py:71> result=None created at C:\Python38\lib\site-packages\rpcudp\protocol.py:51> took 16.063 seconds

set.py

D:\Downloads\kademlia-master\kademlia-master\examples>python set.py 127.0.0.1 8468 test_k test_v
2020-07-18 15:16:28,176 - kademlia.network - INFO - Node 144244605408982251315605458964589358728155001363 listening on 127.0.0.1:8469
2020-07-18 15:16:28,176 - kademlia.network - DEBUG - Refreshing routing table
2020-07-18 15:16:28,177 - kademlia.network - DEBUG - Attempting to bootstrap node with 1 initial contacts
Did not receive reply for msg id b'5l0v/qyC/WFLzcEIS2RsgUBuK3M=' within 5 seconds
2020-07-18 15:16:33,178 - kademlia.crawling - INFO - creating spider with peers: []
2020-07-18 15:16:33,178 - kademlia.crawling - INFO - crawling network with nearest: ()
2020-07-18 15:16:33,178 - kademlia.network - INFO - setting 'test_k' = 'test_v' on network
2020-07-18 15:16:33,178 - kademlia.network - WARNING - There are no known neighbors to set key 8488291004d33c55edef2966ff7bc3867068b968

Based on what happened in first_node.py, it looks like it might be hanging for some reason?

from kademlia.

bmuller avatar bmuller commented on May 13, 2024

@iTecAI Don't hit Ctrl+C - leave it running - it's a server. If you stop it, it can't respond. Please try again and make sure to not stop the first node, then copy the full output again.

from kademlia.

iTecAI avatar iTecAI commented on May 13, 2024

Looks like it worked - Although when I pressed Ctrl+C on the last one the set.py code had already completed, I gave the server more time to initialize this time. Thanks for your help!

from kademlia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.