Installing 0.92 on Centos 7.6.1810

I’ve got an installation error right at the start of the installation process on a freshly installed Centos 7.6 machine:

[root@bahmni ~]# bahmni install
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile

  • base: mirror.nextlayer.at
  • epel: mirror.23media.com
  • extras: ftp.tugraz.at
  • updates: ftp.tugraz.at
    Package matching ansible-2.4.2.0-2.el7.noarch already installed. Checking for update.

Nothing to do
ansible-playbook -i /etc/bahmni-installer/limited all.yml -vv --extra-vars ‘@/etc/bahmni-installer/rpm_versions.yml’ --extra-vars ‘@/etc/bahmni-installer/setup.yml’
ansible-playbook 2.8.2
config file = /opt/bahmni-installer/bahmni-playbooks/ansible.cfg
configured module search path = [u’/root/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /bin/ansible-playbook
python version = 2.7.5 (default, Jun 20 2019, 20:27:34) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
Using /opt/bahmni-installer/bahmni-playbooks/ansible.cfg as config file
[DEPRECATION WARNING]: The TRANSFORM_INVALID_GROUP_CHARS settings is set to allow bad characters in group names by default, this
will change, but still be user configurable on deprecation. This feature will be removed in version 2.10. Deprecation warnings can
be disabled by setting deprecation_warnings=False in ansible.cfg.
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
[DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and make sure become_method is ‘sudo’ (default). This feature will be removed in version 2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
statically imported: /opt/bahmni-installer/bahmni-playbooks/roles/oracle-java/tasks/oracle-java.yml
statically imported: /opt/bahmni-installer/bahmni-playbooks/roles/installer-config/tasks/installer- config.yml statically imported: /opt/bahmni-installer/bahmni-playbooks/roles/selinux/tasks/enforcing_policies.yml
statically imported: /opt/bahmni-installer/bahmni-playbooks/roles/installer-config/tasks/installer-config.yml
statically imported: /opt/bahmni-installer/bahmni-playbooks/roles/installer-config/tasks/installer-config.yml
statically imported: /opt/bahmni-installer/bahmni-playbooks/roles/oracle-java/tasks/oracle-java.yml
statically imported: /opt/bahmni-installer/bahmni-playbooks/roles/installer-config/tasks/installer-config.yml
ERROR! ‘always’ keyword cannot be used without ‘block’
The error appears to be in ‘/opt/bahmni-installer/bahmni-playbooks/roles/bahmni-backup-upload-directories/tasks/main.yml’: line 14, column 3, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be:
-always:
^ here
Traceback (most recent call last):
File “/bin/bahmni”, line 9, in load_entry_point(‘bahmni==0.1’, ‘console_scripts’, ‘bahmni’)()
File “/usr/lib/python2.7/site-packages/Click-7.0-py2.7.egg/click/core.py”, line 764, in _call_ return self.main(*args, **kwargs)
File “/usr/lib/python2.7/site-packages/Click-7.0-py2.7.egg/click/core.py”, line 717, in main rv = self.invoke(ctx)
File “/usr/lib/python2.7/site-packages/Click-7.0-py2.7.egg/click/core.py”, line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/lib/python2.7/site-packages/Click-7.0-py2.7.egg/click/core.py”, line 956, in invoke return ctx.invoke(self.callback, **ctx.params)
File “/usr/lib/python2.7/site-packages/Click-7.0-py2.7.egg/click/core.py”, line 555, in invoke return callback(*args, **kwargs)
File “/usr/lib/python2.7/site-packages/Click-7.0-py2.7.egg/click/decorators.py”, line 17, in new_func return f(get_current_context(), *args, **kwargs)
File “build/bdist.linux-x86_64/egg/bahmni.py”, line 79, in install
File “/usr/lib64/python2.7/subprocess.py”, line 542, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘ansible-playbook -i /etc/bahmni-installer/limited all.yml -vv --extra-vars ‘@/etc/bahmni-installer/rpm_versions.yml’ --extra-vars ‘@/etc/bahmni-installer/setup.yml’’ returned non-zero exit status 4

Please let me know if you need more details.

Sorry about . Kindly use paste bin to share your error log. What did you enter as username to the database?

Here it is a copy of /var/log/bahmni-installer/bahmni-installer.log : https://pastebin.com/MzK1d3hD

I didn’t enter/choose any username for the database as I wasn’t asked to.

Please note that I used a light version of the inventory file: https://pastebin.com/32q3V8SB

You need to mention the “inventory” file.

bahmni -i local install

But I did write an alternative file (see pastebin) named “limited” and launched the command “bahmni -i limited install”. I do not need a standarrd install as I do not plan to use openerp.

Hmm … we have not faced this at all. We will try out with your inventory file and test.

If there is an easy way to uninstall everything, I could try to

bahmni -i local install

and see if it works…

In your inventory file, can you remove the entry under [postgres-backup-tool] and retry? You are not installing postgres, and so this entry is not relevant.

I removed the entry under [postgres-backup-tool] but I’ve got the same error

ERROR! ‘always’ keyword cannot be used without ‘block’

And exactly the same happens if I execute the command

bahmni -i local install

I’ve added a few additional error lines in a new pastebin: https://pastebin.com/ZiHr1JWw
I think they were there from the start but I didn’t send them to you because I copied’n’pasted from bahmni-installer.log

Thats weird, we tried with the same “inventory” file that you posted without the postgres-backup-tool specified. It worked just fine.

What environment are you installing this on? I am guessing that this is probably distro specific.

Can you try installing on CentOS 7.6 minimal? Also check what ansible version is present there (Bahmni uses ansible 2.4.2.0)

[msf@bahmni ~]$ cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)

I installed from CentOS 7 DVD and choose - if I remember correctly - “Infrastructure server” in “Software Selection”.

My ansible is version 2.8.2, installed from epel repository:

$ ansible --version ansible 2.8.2
config file = /etc/ansible/ansible.cfg
configured module search path = [u’/home/msf/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, Jun 20 2019, 20:27:34) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
$ yum list installed | grep ansible
ansible.noarch 2.8.2-1.el7 @epel

I’ll try to downgrade it and see what happens.

OK, downgrading ansible did the trick: now the installation is running.

I will update this thread to notify you if the installation completes correctly (or not).

1 Like

PS the installation of the wrong version was my fault: I was tweaking the “inventory” file when I noticed that ansible was not installed, and I did “sudo yum install ansible” before launching yhe installation command…

bahmni-installer will install ansible as well. So, no need to do that.

1 Like

OK, the installation ended correctly and I can access the “get started” page located at /home.

I can go no further than that because when i click on the “Clinical Service” icon I get the error “The OpenMRS service is currently unavailable. Please check if the service is started and refresh the page once it is up.”, but this is a different issue: I will file a new post if needed.

Thanks for your help, guys, and sorry again for my error.

Massimo

check if openmrs is running and start if not.

$ service openmrs status

$ service openmrs start

Solved, thanks.