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

Error listening #5

Open
lonnietc opened this issue Jan 9, 2023 · 4 comments
Open

Error listening #5

lonnietc opened this issue Jan 9, 2023 · 4 comments

Comments

@lonnietc
Copy link

lonnietc commented Jan 9, 2023

Hello,

I just tried to compile (Go v1.19.3) on my Windows 10 (x64) system and the compile went fine for the examples, but when I try to start them up, I get a TCP bind error:

run> .\persist.exe
Error listening: listen tcp 169.254.222.0:0: bind: The requested address is not valid in its context.

This happens on all of the examples.

Any ideas how to fix this?
Thanks

@lonnietc
Copy link
Author

lonnietc commented Jan 9, 2023

Update, in my research on this it seems that Butter did not bind to the correct IP address as that is not one listed on my machine and it is suggested to Bind: 0.0.0.0 instead.

Not sure how to fix this, but all of the butter related applications that you have available under the butter-network:

https://github.com/butter-network

All produce the same error on this test machine which works fine with other network software.
Thanks

@a-shine
Copy link
Collaborator

a-shine commented Jan 10, 2023

Hi @lonnietc,

I was happy to hear you're messing around with Butter!

I haven't been able to re-produce your error on my machine (I'm on Linux and haven't ever really tried running Butter on Windows). I have, however, changed the strategy for obtaining the host machines IP address so if you pull the latest commit and rebuild it may fix you issue.

Keep me posted on what happen :)

Warm regards,
Alex

@lonnietc
Copy link
Author

lonnietc commented Jan 10, 2023

Hello Alex, (@a-shine added this since I was not sure if it gets sent to you, sorry for multiple updates)

I truly appreciate you getting back to me on this as I am researching a viable, efficient, and cutting-edge way to develop a type of mountable P2P filesystem to handle a huge number of users in a highly distributed mesh network.

Your butter framework looked like a very intriguing possibility to perhaps try and use if it can be made to work since it seems to have some nice features already built into the framework.

With your latest modifications, I built it with Go v1.19.3 (windows/amd64) and just tried it out, but ran into a new set of errors:

PS D:\test\newStuff\butter\test> go build -o ohce.exe .\examples\ohce\main.go
PS D:\test\newStuff\butter\test> .\ohce.exe

Node is listening at 192.168.0.28:54668
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x9ffbdc]

goroutine 19 [running]:
github.com/butter-network/butter/discover.ListenForMulticasts({0xcc0bb8, 0xc00000a090})
        D:/test/newStuff/butter/test/discover/discover.go:115 +0xbc
created by github.com/butter-network/butter/discover.Discover
        D:/test/newStuff/butter/test/discover/discover.go:73 +0x16b
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x9ff86a]

goroutine 8 [running]:
github.com/butter-network/butter/discover.PingLAN({0xcc0bb8, 0xc00000a090})
        D:/test/newStuff/butter/test/discover/discover.go:88 +0xaa
github.com/butter-network/butter/discover.Discover({0xcc0bb8, 0xc00000a090})
        D:/test/newStuff/butter/test/discover/discover.go:75 +0x1c5
created by github.com/butter-network/butter.Spawn
        D:/test/newStuff/butter/test/p2p.go:22 +0x85

I have am running on a local lan (192.168 subnet) and have a few computers on this network. (Linux Ubuntu 21.10 and 2 Windows 10 (x64) systems) for testing and development.

Any thoughts?

@a-shine
Copy link
Collaborator

a-shine commented Jan 11, 2023

Hiya,

Hmmm, looks like something is preventing the default Go net.ListenMulticastUDP() function from working - could be something configured on the network. Do you know if you're network allows for Multicast? Back at university, I used to be unable to run the framework on lab computers cause they blocked Multicast, but on my mobile network or home wifi it was totally fine. If you have a smartphone to hand (and a wireless card on your computer), I suggest you try with a mobile hotspot to see if that works. Then we'll know if it's the network.

What your working on seems very interesting! If you want more immediate help setting up and discussing the framework happy to jump on a call sometime in the next few days...

Regards,
Alex

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

2 participants