zenoh
zenoh copied to clipboard
Zenoh subscriber not working[Bug]
Describe the bug
Subscriber listener not picking up any payloads
To reproduce
I'm using the code from Your first Zeno app.
I have 2 Anaconda prompt windows open, both with the Zenoh environment active.
I first run the subscriber in window 1 & then the publisher in window 2.
The publisher code is ticking away quite happily printing away in its window but there is nothing showing up in the subscriber window.
System info
Win 10 x64, Python 3.10, conda env, latest version of Zenoh on pip
Hi @DrBwts , can you enable the logging by prepending the following lines before zenoh.open
and
# initiate logging
zenoh.init_logger()
adding an environmental variable RUST_LOG="info"
? So that we can better understand the failure.
Can you also try the examples by explicitly specifying the peers to connect with? Thanks!
python examples/z_sub.py -m peer -l tcp/127.0.0.1:17447
python examples/z_pub.py -m peer -e tcp/127.0.0.1:17447
Hi @YuanYuYuan
Added the loggers but not sure where the data is logged to?
When using explicitly defined peers the pub & sub scripts work as expected.
Hello @DrBwts !
- To activate logs you need to set the
RUST_LOG
environment variable:set RUST_LOG=debug
- If the
z_pub
/z_sub
examples do work with-l
/-e
options but not without them, it means that multicast scouting is not working. This might be due to your network configuration. Informations on your network cards configuration likeipconfig
could help.
When I tried to run the previous mentioned command with the real IP address of 2 machines I got this error, where 192.168.1.72 is the IP address of machine B.
ERROR zenoh::net::runtime::orchestrator] Unable to open listener tcp/192.168.1.72:7447: Can not create a new TCP listener bound to tcp/192.168.1.72:7447: [192.168.1.72:7447: Cannot assign requested address (os error 99) at /root/.cargo/git/checkouts/zenoh-cc237f2570fab813/d118a2d/io/zenoh-links/zenoh-link-tcp/src/unicast.rs:245.] at /root/.cargo/git/checkouts/zenoh-cc237f2570fab813/d118a2d/io/zenoh-links/zenoh-link-tcp/src/unicast.rs:332.
What is the correct way to establish pub/sub between two different physical nodes?