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

Failed to listen on network interface: Address family not supported by protocol (os error 97) on Ubuntu (WSL) #40

Closed
sbmthakur opened this issue Dec 30, 2019 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@sbmthakur
Copy link

Platform details:

OS: Ubuntu 18.04.1 LTS (Windows Subsystem Linux)
Rust version: 1.40.0

Steps to reproduce:

  1. Run cargo build.
  2. After the compilation is done, run cargo run.
@imsnif
Copy link
Owner

imsnif commented Dec 30, 2019

Does this also happen when running as root?

@grishy
Copy link
Contributor

grishy commented Dec 30, 2019

Looks like #31

@sbmthakur
Copy link
Author

@imsnif Yes. And I ran the shell as an administrator in all cases.

@imsnif
Copy link
Owner

imsnif commented Dec 31, 2019

@sbmthakur - it might be #31 as @grishy mentions. This means that one of the network cards in the subsystem is virtual (or "problematic" in a different way) and what is trying to pick it up and fail (@grishy is working on a fix for this so such a situation won't fail the entire run and would just ignore that card). If you use the -i flag with one of the interfaces, does it work for you?

Another sadder option might be that we're having issues with linux-in-windows (that's what you're running, right?) so I'd be very interested to know if the -i option solved your problem.

@sbmthakur
Copy link
Author

@imsnif Thanks for pointing out. I am getting the same error even with the -i flag. There is some reading available about network interfaces in WSL here which might be helpful.

@imsnif
Copy link
Owner

imsnif commented Dec 31, 2019

Interesting. I'm going to take a look at this and would generally be interested in investigating further.

What seems to be happening is that we're failing to read the frames coming from any of your network interfaces. For this we're using the pnet crate, which is cross platform - but it might have some kinks or special requirements in regards to this specific setup.

Would it be okay for you to help debug this by running some code I'll whip up to pin-point the issue?

@sbmthakur
Copy link
Author

@imsnif Sure. I am always happy to help.

@imsnif imsnif self-assigned this Jan 4, 2020
@imsnif imsnif added the bug Something isn't working label Jan 5, 2020
@cyqsimon
Copy link
Collaborator

Hi all. I'm currently cleaning up old issues. Can you please check if this issue still persists on the latest release? Thank you.

@grishy
Copy link
Contributor

grishy commented Oct 12, 2023

@cyqsimon works fine for me now on 0.21.0 👍

@cyqsimon
Copy link
Collaborator

In which case I will close this issue as completed. Please reopen if it's still problematic, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants