routers_autoconnect_multicast
and routers_autoconnect_gossip
options have been introduced after the 0.5.0-beta.8 release. Thus, they are not yet supported in eclipse/zenoh:latest
image.master
branch that support those options. You should be able to run an eclipse/zenoh:master
container soon. I’ll let you know as soon as available.
.so
files on the other host), so I started to use the Docker container...
-e tcp/<ip_of_other_router>:7447
) ?
Ok, I will test it later.
So, I deduce that the multicast discovery of the routers is still an 'experimental feature'.
Just an observation:
this is not so-clear from the Getting Started section of the zenoh.io website...
it would be better to clearly report that, otherwise it seems that the "hello world" example between two routers, even in the simplest network configuration, is not working at all.
Hi @lrodorigo,
You can connect multiple routers with each other manually using the -e option. For example for 2 routers :
host1> zenohd
host2> zenohd -e tcp/host1:7447
routers discovery is deactivated by default so that users keep full control on the routers network topology.
routers_autoconnect_multicast=true
too, you should also pull the master branch for this fix.
Sorry for annoying you with really noob questions, but I am also having problems with z_put.py
/z_get.py
/z_sub.py
examples (from https://github.com/eclipse-zenoh/zenoh-python/blob/master/examples/zenoh/).
In particular the following happens:
1) I start the z_sub.py
script
2) I run z_put.py
script (without additional parameters)
3) z_sub.py
correctly invokes the callback
4) if I run z_get.py
, no data are received at all.
Openning session...
New workspace...
Get Data from '/demo/example/**'...
Process finished with exit code 0
More over (while the zenohd process with a [working] REST plugin is running):
0) I start z_sub.py -e tcp/localhost:7447
1) I run z_put.py -e tcp/localhost:7447
2) I run curl -X PUT -d 'Hello Data!' http://localhost:8000/demo/example/test2
3) The z_sub.py
invokes the callback ONLY for the data sent from the z_put.py
script (and not for the data sent by the REST API)
4) The key put from z_put.py
is retreived on the API at http://localhost:8000/demo/**
but the content is blank (while the content received from z_sub.py
is (correctly) 'Put from Python!'
Am I missing something?
curl -X PUT -H 'content-type:application/properties' -d 'path_expr=/demo/example/**' http://localhost:8000/@/router/local/plugin/storages/backend/memory/storage/my-storage
), but unfortunately the result is the same
-e tcp/localhost:7447
to z_pub and z_get (in this case the multicast discovery should work?)
pip install eclipse-zenoh
you might have compatibility issue with the router built from master
branch. (sorry, we’re large phase of changes since the last 0.5.0-beta.8 release, including in the protocol and APIs…)pip install https://github.com/eclipse-zenoh/zenoh-python/zipball/master
zenohd --mem-storage '/demo/**’
python3 ./z_sub.py
python3 ./z_put.py
=> z_sub receives the publicationcurl -X PUT -d 'Hello Data!' http://localhost:8000/demo/example/test2
=> z_sub receives the publicationcurl http://localhost:8000/demo/**
=> result is:[
{ "key": "/demo/example/zenoh-python-put", "value": "Put from Python!", "encoding": "text/plain", "time": "2021-07-07T13:48:04.130432996Z/D2D25874C4884368A11E63673229BA46" },
{ "key": "/demo/example/test2", "value": "Hello Data!", "encoding": "application/x-www-form-urlencoded", "time": "2021-07-07T13:48:08.151674997Z/D2D25874C4884368A11E63673229BA46" }
]
-e tcp/localhost:7447
is not necessary for z_put and z_get since they are configured in peer
mode by default and will do multicast discovery and discover the router.
zenohd --mem-storage '/demo/**
everything is working, if I run the zenohd docker container, and then I create the storage using curl -X PUT -H 'content-type:application/properties' -d 'path_expr=/demo/example/**' http://localhost:8000/@/router/local/plugin/storages/backend/memory/storage/my-storage
, the GET request does not see the data sent from z_put.py
(but it sees the data sent from PUT HTTP requests)
/demo/**
in the sencond you are creating a storage on /demo/example/**
.
put
it may not be surprising that it does not get stored. What is the key you are putting?
eclipse/zenoh:master
image including Olivier’s fix for this issue is now ready. Please try to pull it and re-do your test.
Yes I noticed that, and actually the reported metadata of the two datastores are correct:
/@/router/FB96238589C74C1AAADBB8359A9A24A8/plugin/storages/backend/memory/storage/my-storage
{"path_expr":"/demo/example/**"}
and
/@/router/1FE3B25A0F674180A0424BEFC8F46314/plugin/storages/backend/memory/storage/mem-storage-1
{"path_expr":"/demo/**"}
Anyway I am using z_put.py
with the default --path parameter (/demo/example/zenoh-python-put
), and I am publishing with curl on /demo/example/zenoh-python-put
--privileged
option to the container, the REST is receiving data sent from z_put.py
-e tcp/localhost:7447
the REST is working correctly. So --net=host
is not enough and it requires --privileged
to enable the discovery from the docker container... is there some L2/L3 socket usage? (but in this case even the standalone executable would require the CAP_NET_RAW
cap.)
--privileged
with --cap-add NET_BROADCAST
and/or --cap-add NET_ADMIN
?