Install Bahmni 0.89 to have fresh database.


When we install Bahmni 0.89 to have fresh database, does it install the database of the OpenMRS 2.1 or 1.12.0 as mentioned in the link ? Which states as “As per Bahmni’s installation process, if a database is unavailable during the deployment, it would restore a base vanilla OpenMRS 1.12.0 database if the implementation_name is NOT chosen as default.” Or should the Wiki need to be updated?

Hi @nawazshaikh, When we install Bahmni 0.89 with implementation name other than default we get base vanilla database of latest OpenMRS version. We have updated the wiki accordingly. Thanks for pointing it out.

Thanks @binduak

I followed the “Install Bahmni for Vanilla OpenMRS DB” steps in the wiki, but when I start Bahmni I still see visit locations like “Ganiyari” on the login page.

Do you know why is this happening?

Hi @dsurrao, Is it a Fresh Bahmni Installation??

Hi @binduak

Here are the steps I performed:

Installed Bahmni VM using instructions here.

Logged into Bahmni Virtual Box

Installed Bahmni for Vanilla OpenMRS DB:

  • Changed implementation name to “ces” in /etc/bahmni_installer/setup.yml
  • Copied ces_config from here to /etc/bahmni_installer/deployment_artifacts/
  • Ran bahmni -i local install

Hi @dsurrao,[quote=“dsurrao, post:6, topic:11451”] Installed Bahmni VM using instructions here. [/quote]

when you run bahmni install command in existing bahmni setup, the installation doesn’t restore the database. To get Vanilla database please drop the existing openmrs database and run bahmni install command.

mysql -uroot -ppassword -e "drop database openmrs"

I tried that but get this error message when running bahmni install:

“Unknown database ‘openmrs’ when selecting the database”

TASK [bahmni-emr : Backup openmrs markers, failed_events tables] ***************
task path: /opt/bahmni-installer/bahmni-playbooks/roles/bahmni-emr/tasks/main.yml:89
fatal: [localhost -> localhost]: FAILED! => {"changed": true, "failed": true, "rc": 2, "stderr": "+ . /etc/bahmni-installer/bahmni.conf\n++ IMPLEMENTATION_NAME=ces\n++ OPENMRS_DB_USERNAME=openmrs-user\n++ OPENMRS_DB_PASSWORD=password\n++ OPENMRS_DB_SERVER=localhost\n++ OPENELIS_DB_USERNAME=clinlims\n++ OPENELIS_DB_PASSWORD=password\n++ OPENELIS_DB_SERVER=localhost\n++ OPENERP_DB_USERNAME=openerp\n++ OPENERP_DB_PASSWORD=password\n++ OPENERP_DB_SERVER=localhost\n++ MYSQL_ROOT_USER=root\n++ MYSQL_ROOT_PASSWORD=password\n++ REPORTS_DB_SERVER=localhost\n++ REPORTS_DB_PASSWORD=password\n++ REPORTS_DB_USERNAME=reports-user\n++ date +%Y%m%d_%H%M%S\n+ TIME=20170621_181121\n+ mysqldump -uroot -ppassword openmrs markers failed_events\nWarning: Using a password on the command line interface can be insecure.\nmysqldump: Got error: 1049: Unknown database 'openmrs' when selecting the database\n", "stdout": "", "stdout_lines": []}
	to retry, use: --limit @/opt/bahmni-installer/bahmni-playbooks/all.retry

Hi @dsurrao, You have to remove both openmrs rpm and openmrs database. And then trigger the bahmni install command.

Hi @binduak

The install command now runs successfully. However when I try to access the Bahmni console at, I get this message:

The requested information does not exist The OpenMRS service is currently unavailable. Please check if the service is started and refresh the page once it is up.

The page at does show that OpenMRS is running:

OpenMRS Platform Running!

If you are seeing this page, it means that the OpenMRS Platform is running successfully, but no user interface module is installed. Learn about the available User Interface Modules

If you are a developer, you can access the REST API. (See REST documentation for clients)

Also the log file at /var/log/openmrs/openmrs.log has this error:

22-06-2017 12:53:15 [WARN ] PageNotFound - No mapping found for HTTP request with URI [/openmrs/ws/rest/v1/session] in DispatcherServlet with name ‘openmrs’

Hi @dsurrao, Can you please confirm whether you have imported the sql file on openmrs database as mentioned in this step. Do you see any error on openmrs UI ??

Hi @binduak, yes I did that step. In fact line 42 failed because there was no ‘Visit Location’, so I wrote sql to insert one into location_tag.

No errors in openmrs UI, it only said “no user interface module installed” as I mentioned above.


Hi @dsurrao, Can you please share the screenshot of /opt/openmrs/modules folder. Also share entire openmrs.log file to check the error stack trace.

Hi @binduak

The /opt/openmrs/modules folder is empty.

Here is the openmrs.log file:

Hi @dsurrao,[quote=“dsurrao, post:15, topic:11451”] The /opt/openmrs/modules folder is empty. [/quote]

This folder shouldn’t be empty. Can you please uninstall bahmni-openmrs, bahmni-emr, bahmni-web rpms and trigger the bahmni install command again.

yum remove bahmni-web bahmni-emr bahmni-openmrs

[Install Bahmni for Vanilla OpenMRS ] ( works well with fresh Bahmni Installation. If its not a fresh installation (like vagrant where we already have Bahmni server up and running) then we need to uninstall some modules like openmrs, bahmni-emr and drop openmrs database to get Vanilla OpenMRS. Sorry that we haven’t updated the wiki for this scenario. We will update the wiki soon. Sorry for the inconvenience caused.

1 Like

Thanks @binduak, that worked.

I still get some “file not found” javascript errors like “the requested information does not exist” on the login page, but I think that is because my installation is built against v0.88.

Is there a recommended way to migrate from v0.88 to v0.89, specifically with respect to what files should be included in the openmrs code folder?

Hi @dsurrao,

Not sure what is the issue exactly as you are not using default configuration. Can you please share console log of the chrome browser. Right click on Bahmni Browser page -> select inspect -> share console log

Hi @binduak, I fixed the configuration by copying over missing files from the default, so no need to debug further.

Thanks for your help!

Hi @dsurrao, Good to hear that !

Is it possible to keep some concept while dropping others? I want to keep existing concept for registration and clinical module but I want to drop all drugs database out. manually retire unused drugs is load of works!