Error installing on AWS EC2

Hi, I’m trying to install Bahmni on AWS Linux 2 EC2 instance. I had few errors with ansible but got past that. Now I get this strange error, has anyone seen this before? Would appreciate if there are instructions for AWS installation.

TASK [bahmni-base : Import EPEL GPG key.] ****************************************************************************************************************************************
task path: /opt/bahmni-installer/bahmni-playbooks/roles/bahmni-base/tasks/main.yml:13
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Not a valid key /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-NA"}
 [WARNING]: Could not create retry file '/opt/bahmni-installer/bahmni-playbooks/all.retry'.         [Errno 13] Permission denied: u'/opt/bahmni-installer/bahmni-

PLAY RECAP ***********************************************************************************************************************************************************************
localhost                  : ok=9    changed=4    unreachable=0    failed=1

I am guessing permission relevant issue? what user are you running as?

try getting more information - you can get more verbosity running install with “-vvv” option also a new patch release just came out today … you may want to try that.

1 Like

Thanks for your response. Looks like something to do with the key generation?? Please see below -

<localhost> PUT /tmp/tmpmxwyGi TO /home/ec2-user/.ansible/tmp/ansible-tmp-1592869912.22-233602720989602/
<localhost> EXEC /bin/sh -c 'chmod u+x /home/ec2-user/.ansible/tmp/ansible-tmp-1592869912.22-233602720989602/ /home/ec2-user/.ansible/tmp/ansible-tmp-1592869912.22-233602720989602/ && sleep 0'
<localhost> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-wjtwtykuijsbykwmhbcvoyitlrqpuuoo; /usr/bin/python /home/ec2-user/.ansible/tmp/ansible-tmp-1592869912.22-233602720989602/; rm -rf "/home/ec2-user/.ansible/tmp/ansible-tmp-1592869912.22-233602720989602/" > /dev/null 2>&1'"'"' && sleep 0'
fatal: [localhost]: FAILED! => {
    "changed": false, 
    "failed": true, 
    "invocation": {
        "module_args": {
            "key": "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-NA", 
            "state": "present", 
            "validate_certs": true
    "msg": "Not a valid key /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-NA"

@arun.mitteam - Can you give your centos version?

Hi, please see below for Amazon EC2 instance details -

NAME="Amazon Linux"
ID_LIKE="centos rhel fedora"

Can you post your centos version – >>. cat /etc/ centos -release

Hi, looks like only CentOS is supported. So I spun up a CentOS AWS instance and was able to kick off the installation. It is failing at the postgres db installation, the provided rpm url is not valid. rpm url - See error below -

TASK [postgres : Download postgres yum repo rpm if not present] ******************************************************************************************************************
task path: /opt/bahmni-installer/bahmni-playbooks/roles/postgres/tasks/main.yml:5
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["wget", "-q", "-O", "/opt/pgdg-centos96-9.6-3.noarch.rpm", ""], "delta": "0:00:00.374554", "end": "2020-06-24 08:23:50.369443", "failed": true, "msg": "non-zero return code", "rc": 8, "start": "2020-06-24 08:23:49.994889", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}

kindly use the patch 0.92-155. All these issues are addressed.