Installing Bahmni on an Ubuntu EC2 instance

Hello! I am facing an installation problem and I would really appreciate some help. I have installed Bahmni, and openMRS, Elis, and Pacs are running fine, but I am not able to login into odoo. When I press on the odoo icon in the browser, I get this error message; " This site can’t be reached, took too long to respond, try : Checking the connection etc". When I check the odoo-connect logs, this is what I can pick out “org.bahmni.openerp.web.OpenERPException: org.apache.xmlrpc.XmlRpcException: Failed to create input stream: Read timed outjava.lang.RuntimeException: org.bahmni.openerp.web.OpenERPException: org.apache.xmlrpc.XmlRpcException: Failed to create input stream: Read timed out” etc.

Has anyone encountered this? If you have, can you please advise? Thank you.

Sorry for the error @sangalo! The error message you provided indicates a timeout while trying to establish a connection to the Odoo server. Kindly have you confirmed the Odoo service is running and properly configured?

You can confirm by running this command: sudo service odoo status

If the service is not running, start it using: sudo service odoo start

Hello @jwnasambu ! thanks for helping out. Sadly, my problem was not solved. I get the message Unit odoo.service could not be found when I run the commands you provided

Oh sorry for the late response! this indicates that the system’s init specifically the systemd is unable to locate the specified unit file for the Odoo service. This could be due to various reasons such as incorrect unit file name, missing unit file, or incorrect file path.

To fix this error, follow these steps:

  1. Make sure you are using the correct unit name

  2. Check the Unit File Location to make sure that the odoo.service file is present in the directory. The unit files are usually stored in the /etc/systemd/system/ directory.

  3. Open the odoo.service file and ensure that it contains the correct configuration for the Odoo service. Below is an example of how the content might look like:


# Specify the user and group that Odoo should run as

# Specify the path to the Odoo binary and its configuration file
ExecStart=/path/to/odoo-bin -c /etc/odoo.conf

  1. After making any changes to the unit files, you need to reload systemd to apply the changes. Run the following command: sudo systemctl daemon-reload

  2. Start the Odoo Service once the unit file is correctly configured using the following command sudo systemctl start odoo


@sangalo - Did you try the Docker option for installing Bahmni? That might be much easier.

Thanks @jwnasambu

@gsluthra Actually it is what I am using now. I am installing Bahmni Standard. The installation process was smooth and the only problem was accessing the odoo UI. I was getting a network timeout error. So I tried solving it by updating the security group rules by allowing inbound traffic through port 8069. When I did this, the error changed to an ERR_SSL_PROTOCOL_ERROR. But I think this should not be a problem because I am able to access the UI of the other apps, though I have not attached an SSL to the instance.

I would also like to know, how I can use an external database for the EMR. i.e Running MYSOL and POSTGRES on RDS instances, instead of using the database images that come with the installation. Can I use the most recent versions of MYSQL and Postgres, or does Bahmni only support MYSQL version 5.6, 5.7 and postgres version 9.2 and 9.6

Hi @sangalo

  1. Odoo should be accessible on https://localhost:8069 (or try http://localhost:8069) on start of bahmni standard. You should not require to open any other ports locally (assuming you are running docker on same machine as your browser where you are accessing it). If Odoo is timing out, it could be that it didn’t start properly. Bring it down and restart the odoo container. You can also see Odoo logs to get a sense of whether it is running/ not.

  2. Once Odoo is accessible, and you can login, please perform these ONE TIME steps: Odoo Configurations (docker) - Bahmni Wiki - Confluence

  3. If Odoo is not coming up at all, it could be that your machine needs more resources. You can try to temporarily shut down other services (emr, etc) and only bring Odoo up.

  4. With regards to an external DB, you can definitely do that. I think all you need to do is comment out / ensure the DB containers don’t start in docker-compose, and point the .env file DB variables to external DB. e.g:OpenMRS Configurations (docker) - Bahmni Wiki - Confluence (see OPENMRS_DB_HOST variable, etc). I think you should be able to mention the hostname/IP address of the remote DB.

cc: @mohant @umairfayaz ^ Can you provide more details on how to connect to an external DB?

1 Like

Hello @sangalo

  1. For the ERR_SSL_PROTCOL_ERROR as @gsluthra mentioned, try accessing with http://<ip-address>:8069, this should resolve the problem. This is because Odoo is accessed directly from the Odoo App’s port rather through proxy.
  2. You can definitely run databases on an RDS instance and connect the containers from docker compose to the same. Under every application you will find variables for DB_HOST, DB_USERNAME, DB_PASSWORD. You can update the values for these parameters in the .env file and start the containers. One additional thing here would be to comment the database containers in the docker compose file to save resources on the machine.
  3. You should be able to run EMR on MySQL 8.0, as the latest bahmni/openmrs docker images are built on top of latest OMRS core image which supports MySQL 8. But we have not completely tested all the modules for compatibility. For Postgres, Odoo, OpenELIS, DCM4CHEE has a dependency on 9.6 version as of now and is not compatible with latest postgres versions.
1 Like

Thanks for coming through, it eventually worked

Thanks, accessing with http solved the ssl error message

1 Like