ulrikpedersen / tomoscan

Demonstration of a tomography scan using EPICS BlueSky with a pulsed laser source
https://ulrikpedersen.github.io/tomoscan/
Apache License 2.0
1 stars 1 forks source link

Catalog not working with mongodb backend #19

Open ulrikpedersen opened 1 year ago

ulrikpedersen commented 1 year ago

The catalog that is returned when requesting the "mongo" catalog from bluesky: catalog = databroker.catalog["mongo"] do not work. It throws exceptions with any subsequent interaction with the catalog object.

In ophyd_inter_setup.py I had to comment out the line and not use the mongodb backend: catalog = databroker.temp().v2

This works but is a work-around and we should figure out why the mongodb backend does not work and fix it. Probably a configuration issue.

8ryn commented 1 year ago

I have been unable to replicate this bug so far.

This is strange given that the mongodb backend is running within the docker compose environment and the blueksy script is running in a docker environment too meaning that no aspect should be dependent on the local system. In my tests I simply commented out catalog = databroker.temp().v2, uncommented catalog = databroker.catalog["mongo"] and rebuilt the docker container. This then worked without any exceptions and the runs saved within mongodb persisted between bluesky sessions.

If the bluesky script was being run locally rather than within its docker container then additional setup would be required for the databroker. This can be achieved by simply copying mongo.yml to ~/.config/databroker/
This instruction has been added to the latest docs on my documentation updates branch.

8ryn commented 1 year ago

I have also been unable to replicate this issue on a virtual machine with a fresh tomoscan setup according to the user instructions. As such I won't work on this further unless the issue is seen again.