Installing Bahmni 0.92 Failed on postgres installation

To avoid posgres installtion error i have keep pgdg-centos96-9.6-3.noarch.rpm into /opt folder from my another system(running bahmni ) but still having bellow problem .

I don’t know. Also, I still keep getting that error myself, but I still don’t how to fix it yet. Let me know if you fixed it. Thanks.

1 Like

Anyone out there know how to fix Odoo error on installation? @angshuonline? can you help us?

I am also facing the same types of problem

During installetion I got an error showing

“rpm” (https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm) not found for PostgreSQL. PostgreSQL may be removed that rpm from the list of rpm.

To overcome this problem, I put the rpm file to opt folder manually taking from an existing system. And run installation command.

But I got another error

Can anyone help me please to install it properly?

@moyeen Please follow Bahmni 0.92 Install on CentOS 7.6 Minimal Fails Steps for odoo boot issue. I solved my error using that steps.

Downgrade systemd and use yum version lock

Hello Team, kindly help here as the Bahmni installation hangs up on Task install postgresql yum repository. Am installing Bahmni 0.92 on centos 7.6 minimal installation,using the latest postgresql these are files i did replace

  1. postgres_repo_rpm_name:
  2. postgres_repo_download_url:

the value in default of that is no longer available so you have to change it to this:

  1. postgres_repo_rpm_name: pgdg-redhat-repo-latest.noarch.rpm
  2. postgres_repo_download_url: https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/ Thanks

hello Bahmni team, this the atachment where i get stuck any one to help here backup openelis error.txt (3.0 KB)

I followed this but I got this error, does anyone faced this error or have any idea how to solve this issue?

@akshaybirajdar I too faced the same error, but it got resolved when I uninstalled the Postgres rpm(pgdg-redhat-repo-latest.noarch.rpm) available at /opt/ and reinstalled it from command

cd /opt/

wget https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm

yum install pgdg-redhat-repo-latest.noarch.rpm

After this run the bahmni install command and it will fail at this step

Follow this link for the solution.

Thanks @ritesh,

We are facing the same issue and have tried the above solution; we did get a different error:

“Failure talking to yum: failure: repodata/repomd.xml from pgdg-common: [Errno 256] No more mirrors to try.\nhttps://download.postgresql.org/pub/repos/yum/common/redhat/rhel-7-x86_64/repodata/repomd.xml: [Errno -1] repomd.xml signature could not be verified for pgdg-common”

The error is happening on the task [bahmni-base : install utils]. Do you know how to address this issue?

@akshaybirajdar did you experience the issue below, or know how to resolve it?

TASK [bahmni-base : install utils] **************************************************************************************************************************************************************
task path: /opt/bahmni-installer/bahmni-playbooks/roles/bahmni-base/tasks/main.yml:47
failed: [localhost] (item=[u'tree', u'htop', u'lsof', u'wget', u'unzip', u'python-pip', u'rsync']) => {"changed": false, "failed": true, "item": ["tree", "htop", "lsof", "wget", "unzip", "python-pip", "rsync"], "msg": "Failure talking to yum: failure: repodata/repomd.xml from pgdg-common: [Errno 256] No more mirrors to try.\nhttps://download.postgresql.org/pub/repos/yum/common/redhat/rhel-7-x86_64/repodata/repomd.xml: [Errno -1] repomd.xml signature could not be verified for pgdg-common"}
	to retry, use: --limit @/opt/bahmni-installer/bahmni-playbooks/all.retry

PLAY RECAP **************************************************************************************************************************************************************************************
localhost                  : ok=15   changed=2    unreachable=0    failed=1   

In /etc/yum.repos.d/pgdg-redhat-all.repo try disabling GPG signature-checking by setting gpgcheck to 0 (gpgcheck=0) and see if the install passes that step.

Thanks @rubailly for the feedback.

@ritesh @akshaybirajdar I have eventually successfully installed bahmni, by slightly modifying the official installation process (see “Installing Bahmni version 0.92 (Recommended)” https://bahmni.atlassian.net/wiki/spaces/BAH/pages/33128505/Install+Bahmni+on+CentOS):

- I updated the values on the 2 keys below in the file /opt/bahmni-installer/bahmni-playbooks/group_vars/local 
	○ postgres_repo_rpm_name: pgdg-redhat-repo-latest.noarch.rpm
	○ postgres_repo_download_url: https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/{{postgres_repo_rpm_name}}

The installation failed with the error below:

This issue was resolved by installing postgresql-libs and then restarting the installation:

sudo yum install postgresql-libs
bahmni -aru http://repo.mybahmni.org/releases/ansible-2.4.6.0-1.el7.ans.noarch.rpm install

Notes:

  • with the above approach, I didn’t need to manually remove and install the package “pgdg-redhat-repo-latest.noarch.rpm”.
  • I have also tried installing “postgresql-libs” before starting the bahmni installation (to avoid the above error), but that didn’t work. I am not sure why this is the case, but the approach that worked was to first start bahmni installation which will fail, then install “postgresql-libs” and finally restart bahmni installation which succeeds on the second try
4 Likes

I did all the things @aldrin19 said . But it is not working TASK [postgres : Install postgresql yum repository] **************************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/postgres/tasks/main.yml: 9 An exception occurred during task execution. To see the full traceback, use -vvv . The error was: _rpm.error: error reading package header fatal: [localhost]: FAILED! => {“changed”: false, “module_stderr”: “Traceback (m ost recent call last):\n File “/tmp/ansible_xWLNYI/ansible_module_yum.py”, li ne 1345, in \n main()\n File “/tmp/ansible_xWLNYI/ansible_module_yu m.py”, line 1336, in main\n skip_broken, security, params[‘installroot’], al low_downgrade)\n File “/tmp/ansible_xWLNYI/ansible_module_yum.py”, line 1228, in ensure\n res = install(module, pkgs, repoq, yum_basecmd, conf_file, en_re pos, dis_repos, installroot=installroot, allow_downgrade=allow_downgrade)\n Fil e “/tmp/ansible_xWLNYI/ansible_module_yum.py”, line 743, in install\n envra = local_envra(module, package)\n File “/tmp/ansible_xWLNYI/ansible_module_yum .py”, line 609, in local_envra\n header = ts.hdrFromFdno(fd)\n File “/usr/ lib64/python2.7/site-packages/rpm/transaction.py”, line 170, in hdrFromFdno\n raise rpm.error(“error reading package header”)\n_rpm.error: error reading p ackage header\n”, “module_stdout”: “”, “msg”: “MODULE FAILURE”, “rc”: 0} to retry, use: --limit @/opt/bahmni-installer/bahmni-playbooks/all.retry

PLAY RECAP ********************************************************************* localhost : ok=158 changed=57 unreachable=0 failed=1

postgres_repo_rpm_name: pgdg-redhat-repo-latest.noarch.rpm postgres_repo_download_url: https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/{{postgres_repo_rpm_name}} postgres_repo_rpm_location: “{{download_folder}}/{{ postgres_repo_rpm_name}}”

@aldrin19 previously i got downloading postgresql error and i did the steps you said to change open the file “local” in /opt/bahmni-installer/bahmni-playbooks/group_vars and edit the value of these:

  1. postgres_repo_rpm_name:
  2. postgres_repo_download_url:

the value in default of that is no longer available so you have to change it to this:

  1. postgres_repo_rpm_name: pgdg-redhat-repo-latest.noarch.rpm
  2. postgres_repo_download_url: Index of /pub/repos/yum/reporpms/EL-7-x86_64/

after doing that i rerun the installation and not i am getting another error TASK [postgres : Install postgresql yum repository] **************************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/postgres/tasks/main.yml: 9 An exception occurred during task execution. To see the full traceback, use -vvv . The error was: _rpm.error: error reading package header fatal: [localhost]: FAILED! => {“changed”: false, “failed”: true, "module_stderr ": “Traceback (most recent call last):\n File “/tmp/ansible_zcDE8U/ansible_mod ule_yum.py”, line 1358, in \n main()\n File “/tmp/ansible_zcDE8U/a nsible_module_yum.py”, line 1349, in main\n skip_broken, security, params[‘i nstallroot’], allow_downgrade)\n File “/tmp/ansible_zcDE8U/ansible_module_yum. py”, line 1241, in ensure\n res = install(module, pkgs, repoq, yum_basecmd, conf_file, en_repos, dis_repos, installroot=installroot, allow_downgrade=allow_d owngrade)\n File “/tmp/ansible_zcDE8U/ansible_module_yum.py”, line 744, in in stall\n envra = local_envra(module, package)\n File “/tmp/ansible_zcDE8U/an sible_module_yum.py”, line 610, in local_envra\n header = ts.hdrFromFdno(fd) \n File “/usr/lib64/python2.7/site-packages/rpm/transaction.py”, line 170, in hdrFromFdno\n raise rpm.error(“error reading package header”)\n_rpm.error: error reading package header\n”, “module_stdout”: “”, “msg”: “MODULE FAILURE”, “rc”: 0} to retry, use: --limit @/opt/bahmni-installer/bahmni-playbooks/all.retry

PLAY RECAP ********************************************************************* localhost : ok=159 changed=59 unreachable=0 failed=1

Please help me to solve the issues.

Did you solve the issue?

I’m getting the same error

@drss not yet :frowning:

postgres_repo_rpm_name: pgdg-redhat-repo-latest.noarch.rpm
postgres_repo_download_url: https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/{{postgres_repo_rpm_name}}

or

postgres_repo_rpm_name: pgdg-redhat-repo-42.0-18.noarch.rpm
postgres_repo_download_url: https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/{{postgres_repo_rpm_name}}

Basically, it tries to download the postgres rpm from there. You can manually. download the rpm and try installling as well.

  • Are you trying on a. fresh clean machine or an existing one? What. distribution of CentOS are you using? We typically start. from minimal distro.

  • Also, can you put the entire install log on a gist please?

  • Also check /bahmni_temp/logs/bahmni_deploy.log

  • What components are installed, have you checked whether EMR, Lab components are installed? -. if lab is installed, then postgres download and install is not the issue. Something else is.

  • And once installation fails, you may even try selectively trying out 1 component at a time. for example:

bahmni -i local --only bahmni-lab install

or

bahmni -i local --only bahmni-erp,bahmni-erp-connect install

I investigated on some of the issues reported, and this is what you can try

  1. For what @ghimirey is facing, its probably due to the variables set. Note the variables (either in setup.yml or in /opt/bahmni-installer/bahmni-playbooks/group_vars/local ) should be as follows:
postgrpostgres_repo_rpm_name: pgdg-redhat-repo-latest.noarch.rpm

postgres_repo_download_url: https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/{{postgres_repo_rpm_name}}
  1. It seems like there is some reported signature check error as reported here. Which depending on commands/steps you take, can have different resolutions. But as of now, consider this:
  • Have the right variables as above in the file.
  • Check the directory /opt/ for pgdg repo rpm and delete any repo rpm files

ls -al /opt/*.rpm

rm /opt/pgdg-redhat-repo-latest.noarch.rpm

  • Clean up
yum remove pgdg-redhat-repo
yum clean metadata
  • Run the installer (you may want to use --only option to save you time). For example

bahmni -i local --only bahmni-lab install

basically, any component that requires postgres and its packages

Now, if the above command fails with error like "signature could not be verified for pgdg-common … ", then you can do couple of things

try to install any dependent package

yum install python-psycopg2

The above, may ask you to accept a bunch of gpg keys, accept.

  • If the above succeeds, proceed with the regular installation process

bahmni -i local --only bahmni-lab install

Alternaate option is as @rubailly said, edit the yum repo file for postges and disable gpgcheck

vi /etc/yum.repos.d/pgdg-redhat-all.repo

and under relevant group (e.g. [pgdg-common]), disable gpgcheck

repo_gpgcheck = 0

and then run bahmni installation. (I wouldn’t advise the alternative. And even if you do, turn them back on when you have managed to finish installation)

I will try to see if I can automate accepting the gpg keys. manually accepting the keys once seem to have worked for me.

If you are trying out the above, please post any other relevant findings here.

1 Like

in case, anyone facing this (signature check) on 0.92 or 0.93 … do the following

  1. Follow the above reply, ie. do things manually.

  2. or edit the file /opt/bahmni-installer/bahmni-playbooks/roles/postgres/tasks/main.yml. Find the line “yum: name=python-psycopg2 state=present” and replace like below

- name: Install python-psycopg2
  command: yum -y install python-psycopg2

1 Like