Error in installing bahmni 0.92 in vagrant box

Tags: #<Tag:0x00007fe2e209d900> #<Tag:0x00007fe2e209d838>

When We are installing bahmni 0.92 in vagrant box we get openmrs starting error. The step what We are following:

Vagrant file:

    VAGRANTFILE_API_VERSION = "2"
    Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
      config.vm.define "client" do |client|
        client.vm.box = "bento/centos-7.6"
        client.vm.network :private_network, ip: "192.168.33.20"
        client.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--memory", 8072, "--cpus", "3"]
        end
      end
    end

After vagrant up we have execute the bellow command:

sudo su
yum install -y python-setuptools
yum install -y https://dl.bintray.com/bahmni/rpm/rpms/bahmni-installer-0.92-142.noarch.rpm
curl -L https://tinyurl.com/yyoj98df >> /etc/bahmni-installer/setup.yml
bahmni -i local install

And get the bellow error:

TASK [bahmni-emr : Start openmrs] **********************************************
task path: /opt/bahmni-installer/bahmni-playbooks/roles/bahmni-emr/tasks/main.yml:218
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Unable to start service openmrs: Job for openmrs.service failed because a configured resource limit was exceeded. See \"systemctl status openmrs.service\" and \"journalctl -xe\" for details.\n"}
        to retry, use: --limit @/opt/bahmni-installer/bahmni-playbooks/all.retry

And after execute the systemctl status openmrs.service command we get the bellow message:

● openmrs.service - LSB: start and stop openmrs system,
   Loaded: loaded (/etc/rc.d/init.d/openmrs; bad; vendor preset: disabled)
   Active: failed (Result: resources) since Sat 2019-09-28 09:38:46 IST; 8h ago
     Docs: man:systemd-sysv-generator(8)
  Process: 15413 ExecStop=/etc/rc.d/init.d/openmrs stop (code=exited, status=0/SUCCESS)
  Process: 15938 ExecStart=/etc/rc.d/init.d/openmrs start (code=exited, status=0/SUCCESS)
 Main PID: 26863 (code=killed, signal=KILL)

Sep 28 09:38:46 localhost.localdomain systemd[1]: Starting LSB: start and stop openmrs system,...
Sep 28 09:38:46 localhost.localdomain openmrs[15938]: Starting openmrs
Sep 28 09:38:46 localhost.localdomain su[15952]: (to bahmni) root on none
Sep 28 09:38:46 localhost.localdomain systemd[1]: Refusing to accept PID outside of service control group....pid
Sep 28 09:38:46 localhost.localdomain systemd[1]: Refusing to accept PID outside of service control group....pid
Sep 28 09:38:46 localhost.localdomain systemd[1]: Failed to start LSB: start and stop openmrs system,.
Sep 28 09:38:46 localhost.localdomain systemd[1]: Unit openmrs.service entered failed state.
Sep 28 09:38:46 localhost.localdomain systemd[1]: openmrs.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

But we are successfully installed in bahmni 0.92 in a centos 7.6 pc by using the above installation commands. but can not in vagrant box. Is it my vagrant box configuration problem. I am not expert in linux. is it the access right problem? Please help me what can i do. Thank you in advance.

@angshuonline @snehabagri @binduak @ruchikab @vmalini @rmkanda @mksrom

I think @laxman got the same error (Announcing Bahmni 0.92 Release Candidate).

@laxman were you able to solve this?

Yes error was same, in my case there was no openmrs.pid file generated so I manually created openmrs.pid and then restarted , it worked but this error happened to my colleagues machine too but same approach didn’t worked for him. Please try this once, otherwise i think this is the blocker issue for any new implementation.

I have created openmrs.pid, give file access to bahmni user, restart openmrs & also restart vagrant device. But unfortunately not working. Interesting things is that bahmni 0.92 is installed successfully in centos 7.6 pc but not in vagrant box. I & my two colleagues try in vagrant but we are stucked at the same point. Please try anyone & resolve this issue. Thanks in advance.

Can you provide information like - what Host OS you are using, version of Vagrant and Virtual box etc? I never had to install setup tools etc (as my dev machine). and I just use the default centos7 community box to start with.

https://app.vagrantup.com/centos/boxes/7 - check the release notes as well. and check for your respective host OS.

this is the simple Vagrantfile that I use. once provisioned, i just download and install the installer, configure inventory and run install command. never had a problem.

My vagrant version is 2.1.5 (slightly old) and virtualbox as 6.0.