Unable to install Bahmni

Hello. I am new to Bahmni and trying to install Bhamni to a new VPS installed with CentOS 6.8. I am following the instructions on https://bahmni.atlassian.net/wiki/display/BAH/Install+Bahmni+on+CentOS.

When i run bahmni install, I end up with the following displayed in red:

TASK [selinux : set selinux state and policy] ********************************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/selinux/tasks/main.yml:11 An exception occurred during task execution. To see the full traceback, use -vvv. The error was: IOError: [Errno 2] No such file or directory: ‘/etc/selinux/config’ fatal: [localhost]: FAILED! => {“changed”: false, “failed”: true, “module_stderr”: “Traceback (most recent call last):\n File “/tmp/ansible_nO8AzU/ansible_module_selinux.py”, line 211, in \n main()\n File “/tmp/ansible_nO8AzU/ansible_module_selinux.py”, line 151, in main\n config_policy = get_config_policy(configfile)\n File “/tmp/ansible_nO8AzU/ansible_module_selinux.py”, line 78, in get_config_policy\n myfile = open(configfile, “r”)\nIOError: [Errno 2] No such file or directory: ‘/etc/selinux/config’\n”, “module_stdout”: “”, “msg”: “MODULE FAILURE”, “parsed”: false}

Verifying installed components gives me the following result:

bahmni-installer.noarch 0.82-130 @/bahmni-installer-0.82-130.noarch

Any clue where i am going wrong? Am i unable to get the bahmni rpm using the installer? How can i get Bahmni up?

Please check the installed selinux related rpm’s. Paste the output below command

rpm -qa | grep selinux

Btw, we recommend Centos 6.7

thank you sravanthi for getting back to me. Yes I did realize that you recommend Centos 6.7 but having already installed 6.8 i thought i could get away with it.

rpm -qa | grep selinux gives the output:

libselinux-2.0.94-7.el6.i686 libselinux-utils-2.0.94-7.el6.x86_64 libselinux-2.0.94-7.el6.x86_64 libselinux-python-2.0.94-7.el6.x86_64

Install selinux-policy selinux-policy-targeted

yum install selinux-policy selinux-policy-targeted

after this please check if you have /etc/selinux/config

Hi. I have run the selinux-olicy install as suggested above and all seemed to work fine. however /etc/selinux/config still does not exist after this.

I decided to try installing Bahmni via the base.sh script and unlike before the rpm were installed. During the install process both MySql and Postgres Db failed to be populated with sample data and after install both services failed to start. pacs-intergration also failed.

Sorry. It actually does.

I would suggest you not install v0.80, and instead try and use v0.82 (latest installer) as documented on Wiki. Also, maybe it will be a good idea to remove all bahmni rpms from your machine, and redo the process for v0.82.

To remove all Bahmi RPMs, just fire the command:

yum list installed | grep bahmni

And then for each rpm, fire the command:

yum remove < rpmname >

Also uninstall openmrs (yum remove openmrs)

I have unistalled openmrs and removed all Bhamni RPMs. I now installed using v0.82 and got the following error during the process:

TASK [mysql : Start Mysql Service] ********************************************* task path: /opt/bahmni-installer/bahmni-playbooks/roles/mysql/tasks/main.yml:47 fatal: [localhost]: FAILED! => {“changed”: false, “failed”: true, “msg”: “MySQL Daemon failed to start.\nStarting mysqld: [FAILED]\r\n”}

NO MORE HOSTS LEFT ************************************************************* to retry, use: --limit @all.retry

PLAY RECAP ********************************************************************* localhost : ok=33 changed=20 unreachable=0 failed=1

Were you able to start mysqld manually ? run service mysql start

If it didnt help, then please share logs (/var/log/mysqld.log)

I had the same issue but then sravanthi17 recommendation fixed however openerp refused to install please help

@microantix : What is the issue with openerp ?

I was getting an error “mysqld dead but subsys locked” that i managed to fix by removing /var/lock/subsys/mysqld, stopping all services and restarting mysql. Thanks

@yudaman : good to hear from you that the issue is fixed :slight_smile:

@sravanthi17 I am not sure but it is just not present, I didn’t get any errors but it just did not install.

please check status of the service service openerp status

OK let me check

TASK [postgres : Create postgres user] ***************************************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/postgres/tasks/main.yml:75 fatal: [localhost]: FAILED! => {“changed”: false, “failed”: true, “msg”: “unable to connect to database: FATAL: the database system is starting up\n”}

openerp: unrecognized service

please try running service postgresql-9.2 start && sleep 10 .

After the above command ran successfully. go ahead with bahmni install

openerp: unrecognized service