Bahmni installation - can't get past "database selector" page for odoo

Hi all,

I’m trying to get to a working install of Bahmni standard for testing. Using Ubuntu server 22.04 VM and docker, fresh install as per the wiki with “latest” tags for images.

When I try to connect to the odoo module from the front page I have a couple of issues:

  • clicking the link from the Bahmni homepage redirects to https://ipaddress:8069 and I have to change to http:// instead. Is there a way to fix this link?
  • Once I get to the odoo page, I see the database selector page (http://ipaddress:8069/web/database/selector), and even when clicking the odoo database it just reloads the same page.

By specifying a previous image tag for odoo in the .env file I was able to log in to odoo, but then performing the initial set up step of updating the Bahmni app within odoo led to an error: "Odoo Server Error … ProgrammingError: there is no primary key for referenced table “res_users”

Any advice to be able to log into odoo?

Hello @andylinton ,

  1. URL redirection can be fixed. Will check on the setup.
  2. What is the database image tag for odoodb service? You can find it in .env file under ODOO_DB_IMAGE_TAG.

Hi @mohant thanks for replying.

  1. for the url redirection for odoo, I am using the default bahmni-standard installation with a fresh install. I just want to find out how to change the https:// to http:// so that it will open odoo from clicking the icon on the home screen (or alternatively how to serve the odoo page on a https:// address)

  2. the database image tag for ododb is demo-latest All the other images are using the latest tag also. I will try removing the image and pulling it again, and will wipe the odoo and odoodb volumes to start fresh.

Let me know if other thoughts

The issue with URL redirection has been fixed, please check if you have the latest proxy image. you can get the latest image by running docker compose pull from bahmni-docker/bahmni-standard directory

1 Like

Hi @mohant and team, I’m still trying to get a working Bahmni on Docker install. I tried a fresh install on a new VM with up to date Docker and Docker Compose versions, and pulled all the images for Bahmni Standard again (the tags in .env file are all “latest”)

  • still having the issue of the link to Odoo interface directs to the https:// address which returns an error. So it seems the URL redirection is not fixed?
  • now Odoo will not start. I get an error 500 Internal Server Error when trying to access Odoo. The log file for odoodb container looks normal. The log for the odoo container has bizarre looking content. Note: the first time I start the Bahmni service with a fresh install, the odoodb container always takes a while to start and then returns a status of “unhealthy”. I have to run “docker compose down” then restart, then the containers start normally, but I see this server error for odoo. I have tried removing the odooapp and odoodb volumes and restarting the containers with the same result.

Is there a problem with the latest odoo container? Or is it an issue with my local install? Happy to talk more on Slack if needed, I’m just keen to get a working instance of Bahmni Standard so I can continue with testing it to see if it will suit our hospital environment.

Still unable to get odoo running on latest docker images / fresh install. It seems to start correctly from the logs, then there are multiple errors when I try to access the web interface.

Here is the errors from the logs when I try to access the web interface for odoo

Have you performed the one time setup for odoo? https://bahmni.atlassian.net/wiki/spaces/BAH/pages/3117482082/Odoo+Configurations+docker

Might be needed to do them if you are starting from a fresh Odoo database.

Hi @gsluthra As mentioned in my previous post it has been impossible to open odoo, so I had not been able to perform the one time setup. I have made some progress, however!

It seems that the odoodb container is very slow to spin up on a fresh install because of many errors in the log file saying “postgres role not defined”. This leads to the odoo container not starting correctly and a corrupted install.

The workaround I discovered was to first run docker compose up -d odoodb and watch the log file until all the errors had stopped (took around 5 mins). I was then able to bring up all the containers as normal, and odoo is then accessible and works via the web interface.

So I believe this problem relates to the odoodb container expecting the db username to be postgres on the first run… For interest I changed the odoodb user environment variable in the .env file to postgres and this led to the odoodb container spinning up perfectly first time, but it prevented the odoo container from starting.

Hope this helps someone else.

1 Like

The URL redirection for the odoo web interface is still not working even with the latest proxy image, it still goes to https://:8069 and I have to manually change it to http://

Will check on the URL redirection issue and revert back

Thanks for the explanation @andylinton . So it seems on your machine, odoo is going in some weird state, because it isn’t being able to detect odoo-database up/ready. Once you reverse the process of ensuring odoo db is initialised/ready, and then bring up odoo server, it seems to connect and work fine.

Will keep an eye out for this behavior. thanks for the details.

Hi, Any update on this issue?

Can you check this in different browsers ? May be Firefox