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

[Bug] No Message Received Pub/Sub on Windows 11 x64 #91

Open
liushuya7 opened this issue Jan 16, 2023 · 8 comments
Open

[Bug] No Message Received Pub/Sub on Windows 11 x64 #91

liushuya7 opened this issue Jan 16, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@liushuya7
Copy link

Describe the bug

Trying the example on Windows 11 x64, one terminal is publishing the data:

Opening session...
Declaring Publisher on 'myhome/kitchen/temp'...
Putting Data ('myhome/kitchen/temp': '[   0] Hello World')...
Putting Data ('myhome/kitchen/temp': '[   1] Hello World')...
Putting Data ('myhome/kitchen/temp': '[   2] Hello World')...
Putting Data ('myhome/kitchen/temp': '[   3] Hello World')...
Putting Data ('myhome/kitchen/temp': '[   4] Hello World')...
Putting Data ('myhome/kitchen/temp': '[   5] Hello World')...
Putting Data ('myhome/kitchen/temp': '[   6] Hello World')...
Putting Data ('myhome/kitchen/temp': '[   7] Hello World')...

But the subscriber terminal receives nothing:

Opening session...
Declaring Subscriber on 'myhome/kitchen/temp'...
Enter 'q' to quit...

I tried the exact same thing on Ubuntu 20.04, and everything works fine.
So, I guess zenoh-python doesn't support Windows 11 x86 yet?

To reproduce

  1. Go to the /example folder
  2. Open one PowerShell: python z_pub.py -k myhome/kitchen/temp -v 'Hello World'
  3. In another PowerShell: python z_sub.py -k 'myhome/kitchen/temp'

System info

  • Platform: Windows 11 x64
  • CUP: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  • Python Version: tested with 3.8, 3.9, 3.10 (none of them worked)
  • Tried with 'pip install eclipse-zenoh' and building from source (neither worked)
@liushuya7 liushuya7 added the bug Something isn't working label Jan 16, 2023
@liushuya7
Copy link
Author

liushuya7 commented Jan 16, 2023

Tested on WSL with Ubuntu 20.04: it works.
On Windows: tried running PowerShell as Administrator -> still not working.

@gabrik
Copy link
Contributor

gabrik commented Jan 16, 2023

Hi @liushuya7, it could be related to Windows Firewall blocking UDP multicast communications, therefore the Publisher and the Subscriber cannot leverage on Scouting for automatic discovery.

To verify it is the case please run the examples with these parameters:

Publisher: python z_pub.py -k myhome/kitchen/temp -v 'Hello World' -l tcp/127.0.0.1:7447
Subscriber: python z_sub.py -k 'myhome/kitchen/temp -e tcp/127.0.0.1:7447

If you see the data going through then you need to configure Windows Firewall to allow UDP multicast communications.

@cguimaraes
Copy link
Member

I have been playing with multicast on Windows 10 recently, and I indeed had some issues with the multicast. The root cause was the Windows firewall blocking multicast traffic, as @gabrik is mentioning. I believe you are having the same issue.

@liushuya7
Copy link
Author

liushuya7 commented Jan 16, 2023

Thanks! Yes, I was finally able to see the data going through using the commands @gabrik you gave. It must be due to the Windows Firewall blocking UDP multicast then. However, I looked up how to configure Windows Firewall to allow UDP multicast, no success.. @cguimaraes were you able to configure the Windows Firewall to allow UDP multicast?
I've opened all the UDP ports but it doesn't seem to work.
Screenshot_20230116_032342

@cguimaraes
Copy link
Member

In my case, I just add the application to the Windows Firewall exceptions list, since I was in a close environment. However, note what Windows Support mentions regarding such solution:

An application on the Windows Firewall exceptions list is allowed to receive all incoming traffic. In many ways, this is the easiest method. However, it creates a vulnerability that may not be required. Therefore, this method is less secure than the other methods.

Important: We do not recommend this method.

It seems that the other option to allow the multicast to go through is the one you are using. What did you set on the other wizard windows?

@liushuya7
Copy link
Author

liushuya7 commented Jan 16, 2023

The other window is just a list of allowed applications and policies.
I have checked that the UDP multicast is already allowed on my Windows:
image

@liushuya7
Copy link
Author

@gabrik

To verify it is the case please run the examples with these parameters:

Publisher: python z_pub.py -k myhome/kitchen/temp -v 'Hello World' -l tcp/127.0.0.1:7447
Subscriber: python z_sub.py -k 'myhome/kitchen/temp -e tcp/127.0.0.1:7447

I realize as long as the Publisher's endpoint is listening on tcp/127.0.0.1:any_port
Subscriber doesn't need to specify which endpoint to connect. I just did python z_sub.py -k myhome/kitchen/temp and it receives data.

@gabrik
Copy link
Contributor

gabrik commented Jan 17, 2023

That's interesting because when not passing any listening locator it should listen to tcp/localhost:7447 (@OlivierHecart please correct me if I'm wrong), but maybe on Windows something strange happens.
We'll check on a Windows machine where it is actually listening.

I imagine that when starting the command the first time you Allowed the python interpreter to do network on both public and private so that should not be the problem right?

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

3 participants