Open mbspng opened 2 months ago
Hi @mbspng,
Seems that you are not starting any storage, thus the data published with the PUT
is being dropped as no subscriber are present.
Please refer to the reference manual: https://zenoh.io/docs/manual/plugin-storage-manager/#backends-and-volumes
Hi @mbspng,
Seems that you are not starting any storage, thus the data published with the
PUT
is being dropped as no subscriber are present.Please refer to the reference manual: https://zenoh.io/docs/manual/plugin-storage-manager/#backends-and-volumes
@gabrik Even when I start it with a storage, the outcome is the same. I followed the example in https://zenoh.io/docs/getting-started/first-app/ even before trying it with Docker. I am running zenohd -c zenoh-myhome.json5
and the storage query script also does not work. The replies()
call gives an empty list.
import zenoh
if __name__ == "__main__":
session = zenoh.open()
replies = session.get('myhome/kitchen/temp', zenoh.ListCollector())
for reply in replies():
try:
print("Received ('{}': '{}')"
.format(reply.ok.key_expr, reply.ok.payload.decode("utf-8")))
except:
print("Received (ERROR: '{}')"
.format(reply.err.payload.decode("utf-8")))
session.close()
I added the zenoh-myhome.json5
to my Docker file now and am launching it with CMD ["zenohd", "--id", "8513e6171ad48733194c2bab57a5dd86", "-c", "zenoh-myhome.json"]
. The PUT and GET commands from the original post still result in an empty array being returned.
Edit: Ok, got it working, thanks. Documentation could be better, though.
Actually, I still don't understand why the getting started example does not work. I got the manual PUT and GET working by adjusting the paths to myhome
, as per the example config, rather than demo/test
. But the retrieval script from the example still is not working.
Hi @mbspng, thank you for spotting this, the documentation is not yet updated to the 1.0.0-alpha.X
.
We are going to update it once the final 1.0.0
is released
@gabrik Ok thanks, installing zenoh=0.11.0-stable
made it work. Documentation should state which version it is for, and apt should maybe not install an alpha version by default. When following the docs (https://zenoh.io/docs/getting-started/installation/) for the installatoin of zenohd, one will get a version of zenohd which does not match the docs!
Hi, if you using Zenohd in a 1.0.0 and using 0.11.0 in a lib to you aplication. It Don't work. I had this problem here.
Describe the bug
REST API always returns empty array
To reproduce
Build an run this Docker code
Then send curl commands from docs (https://zenoh.io/docs/apis/rest/)
Now I expect to see that data when I query it, but I do not:
System info
See docker code.
zenohd v1.0.0-alpha.6 built with rustc 1.75.0 (82e1608df 2023-12-21)