Can I install Bahmni 0.92 version onto CentOS-7 x86_64 HVM

Hello, I am new to this Bahmni and trying to install onto Amazon AWS instance. Bahmni said (For production purposes, CentOS 7.6 64bit is the recommended). But, I couldn’t find exact 7.6 CentOS version. Amazon offer this “CentOS Linux release 7.9.2009 (Core)”. So, can I use this CentOS 7.9? or will I get any issues? thanks, Zaw.

Should work. Please give it a try.

Can you tell me where you get the installation instructions for this? I can spin up a CentOS 7 easily. [Nevermind, if it only uses more bloat, such as docker/ansible. :wink: ]

Note: you should not use any version less than CentOS 7.9!

Hi Mr. E Jonsen, I tried with CentOS 7.9.2009. But, there are several problems and I am googling and searching those errors from community bulletin boards, and fixing one error after another. Now, I am still stuck with postgresql installation step. Here is my error: Can someone help me why am I getting this error? I already edited /etc/bahmni-installer/setup.yml file with following entry lines.

timezone: America/New_York implementation_name: default selinux_state: disabled bahmni_repo_url: http://repo.mybahmni.org/releases/ postgres_repo_rpm_name: pgdg-centos92-9.2-7.noarch.rpm

========== Can someone help me? thanks, Zaw.

========== TASK [postgres : Download postgres yum repo rpm if not present] ************************************************************************************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/postgres/tasks/main.yml:5 skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional result was False”, “skipped”: true}

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_CM5Pu1/ansible_module_yum.py”, line 1358, in \n main()\n File “/tmp/ansible_CM5Pu1/ansible_module_yum.py”, line 1349, in main\n skip_broken, security, params[‘installroot’], allow_downgrade)\n File “/tmp/ansible_CM5Pu1/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_downgrade)\n File “/tmp/ansible_CM5Pu1/ansible_module_yum.py”, line 744, in install\n envra = local_envra(module, package)\n File “/tmp/ansible_CM5Pu1/ansible_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=158 changed=57 unreachable=0 failed=1

Traceback (most recent call last): File “/bin/bahmni”, line 9, in load_entry_point(‘bahmni==0.1’, ‘console_scripts’, ‘bahmni’)() File “/usr/lib64/python2.7/site-packages/click/core.py”, line 764, in call return self.main(*args, **kwargs) File “/usr/lib64/python2.7/site-packages/click/core.py”, line 717, in main rv = self.invoke(ctx) File “/usr/lib64/python2.7/site-packages/click/core.py”, line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File “/usr/lib64/python2.7/site-packages/click/core.py”, line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File “/usr/lib64/python2.7/site-packages/click/core.py”, line 555, in invoke return callback(*args, **kwargs) File “/usr/lib64/python2.7/site-packages/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 90, 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/local all.yml -vv --extra-vars ‘@/etc/bahmni-installer/rpm_versions.yml’ --extra-vars ‘@/etc/bahmni-backrest.conf’ --extra-vars ‘@/etc/bahmni-installer/setup.yml’’ returned non-zero exit status 2 [root@localhost bahmni-installer]#

Sorry, not my area of interest/expertise: I endorse the “Keep It Simple, Stupid” approach and stay clear of ansible etc. Frameworks are there to benefit developers and do nothing to provide a slimline, efficient, performant solution, IMHumbleO.

Good luck and I hope that you can get some help.

@mumzm: I think this should solve the problem you are facing regarding not finding a suitable postgres rpm to download: Installing Bahmni 0.92 Failed on postgres installation - #5 by aldrin19

Hello @gsluthra , thank you for your information. I did that and now I am stuck with another error “TASK [bahmni-odoo:Start Odoo and enable at boot]” “Unable to start service odoo: Job for odoo. service failed.”. I have been trying many times reinistall Bahmni 0.92 on top of CentOS 7.9, or CentOS 7.6 (as recommended by the web site). But, at the end, I ended up to this above error (Unable to start service odoo). There is a post about this error and suggested to fix this by: sudo pip uninstall beautifulsoup4 sudo pip install beautifulsoup4 So, I did but, still getting the same error. Can you help this? or do you know anyone who can help me on this? I am installing Bahmni 0.92 on CentOS 7.6 minimal on my laptop, without using Vagrant Box. Thank you. Zaw.

Please give the following commands in sequence, capture the results and post it here to understand the nature of the issue further .

systemctl status odoo

journalctl -xe

Hi @buvaneswariarun , thank you and here is the return from first command.

But, for the second command, it produce quite a bunch lines and I installed minimal CentOS and does not have any GUI support or email on this computer, so I don’t know how to capture the output from this laptop and send it to you. Can you please suggest me how I can capture those a few thousand lines from that laptop to send you? thanks, Zaw.

Hi @buvaneswariarun , in order to send you back the error lines, I fresh reinstall CentOS 7.9.2009 onto my laptop, and install Bahmni 0.92. Then, (after I resolved several known errors with solution/work-around provided from posts), I end up to my final this error (“TASK [bahmni-odoo:Start Odoo and enable at boot]” “Unable to start service odoo: Job for odoo. service failed.”) again.

So, I run systemctl status odoo command, and I got this output.

Sep 07 16:24:45 localhost.localdomain odoo[30118]: ws.require(requires) Sep 07 16:24:45 localhost.localdomain odoo[30118]: File “/usr/lib/python2.7/site-packages/pkg_resources/init.py”, line 891, in require Sep 07 16:24:45 localhost.localdomain odoo[30118]: needed = self.resolve(parse_requirements(requirements)) Sep 07 16:24:45 localhost.localdomain odoo[30118]: File “/usr/lib/python2.7/site-packages/pkg_resources/init.py”, line 777, in resolve Sep 07 16:24:45 localhost.localdomain odoo[30118]: raise DistributionNotFound(req, requirers) Sep 07 16:24:45 localhost.localdomain odoo[30118]: pkg_resources.DistributionNotFound: The ‘xlsxwriter’ distribution was not found and is re…by odoo Sep 07 16:24:45 localhost.localdomain systemd[1]: Daemon never wrote its PID file. Failing. Sep 07 16:24:45 localhost.localdomain systemd[1]: Failed to start LSB: Launches the Odoo server… Sep 07 16:24:45 localhost.localdomain systemd[1]: Unit odoo.service entered failed state. Sep 07 16:24:45 localhost.localdomain systemd[1]: odoo.service failed. Hint: Some lines were ellipsized, use -l to show in full.

I will send you another out put in separate reply.

After I run this journalctl -xe, I have too many lines and this message post will not allow me to display all of my log lines here. So, I copy only the bottom a few hundred lines here…

Sep 07 16:24:44 localhost.localdomain systemd[1]: Starting LSB: Launches the Odoo server… – Subject: Unit odoo.service has begun start-up – Defined-By: systemd – Support: systemd-devel Info Page

– Unit odoo.service has begun starting up. Sep 07 16:24:44 localhost.localdomain odoo[30118]: mkdir: cannot create directory ‘odoo’: File exists Sep 07 16:24:44 localhost.localdomain runuser[30127]: pam_unix(runuser:session): session opened for user odoo by (uid=0) Sep 07 16:24:44 localhost.localdomain runuser[30127]: pam_unix(runuser:session): session closed for user odoo Sep 07 16:24:44 localhost.localdomain odoo[30118]: Starting Odoo Server Daemon (odoo-server): [ OK ] Sep 07 16:24:44 localhost.localdomain systemd[1]: Can’t open PID file /var/run/odoo/odoo-server.pid (yet?) after start: No such file or directory Sep 07 16:24:45 localhost.localdomain python[30129]: detected unhandled Python exception in ‘/usr/bin/odoo’ Sep 07 16:24:45 localhost.localdomain odoo[30118]: Traceback (most recent call last): Sep 07 16:24:45 localhost.localdomain odoo[30118]: File “/usr/bin/odoo”, line 4, in Sep 07 16:24:45 localhost.localdomain odoo[30118]: import(‘pkg_resources’).run_script(‘odoo==10.0.post20190619’, ‘odoo’) Sep 07 16:24:45 localhost.localdomain odoo[30118]: File “/usr/lib/python2.7/site-packages/pkg_resources/init.py”, line 3098, in Sep 07 16:24:45 localhost.localdomain odoo[30118]: @_call_aside Sep 07 16:24:45 localhost.localdomain odoo[30118]: File “/usr/lib/python2.7/site-packages/pkg_resources/init.py”, line 3082, in _call_aside Sep 07 16:24:45 localhost.localdomain odoo[30118]: f(*args, **kwargs) Sep 07 16:24:45 localhost.localdomain odoo[30118]: File “/usr/lib/python2.7/site-packages/pkg_resources/init.py”, line 3111, in _initialize_master_working_set Sep 07 16:24:45 localhost.localdomain odoo[30118]: working_set = WorkingSet._build_master() Sep 07 16:24:45 localhost.localdomain odoo[30118]: File “/usr/lib/python2.7/site-packages/pkg_resources/init.py”, line 573, in _build_master Sep 07 16:24:45 localhost.localdomain odoo[30118]: ws.require(requires) Sep 07 16:24:45 localhost.localdomain odoo[30118]: File “/usr/lib/python2.7/site-packages/pkg_resources/init.py”, line 891, in require Sep 07 16:24:45 localhost.localdomain odoo[30118]: needed = self.resolve(parse_requirements(requirements)) Sep 07 16:24:45 localhost.localdomain odoo[30118]: File “/usr/lib/python2.7/site-packages/pkg_resources/init.py”, line 777, in resolve Sep 07 16:24:45 localhost.localdomain odoo[30118]: raise DistributionNotFound(req, requirers) Sep 07 16:24:45 localhost.localdomain odoo[30118]: pkg_resources.DistributionNotFound: The ‘xlsxwriter’ distribution was not found and is required by odoo Sep 07 16:24:45 localhost.localdomain systemd[1]: Daemon never wrote its PID file. Failing. Sep 07 16:24:45 localhost.localdomain systemd[1]: Failed to start LSB: Launches the Odoo server… – Subject: Unit odoo.service has failed – Defined-By: systemd – Support: systemd-devel Info Page

– Unit odoo.service has failed.

– The result is failed. Sep 07 16:24:45 localhost.localdomain systemd[1]: Unit odoo.service entered failed state. Sep 07 16:24:45 localhost.localdomain systemd[1]: odoo.service failed. Sep 07 16:24:47 localhost.localdomain sudo[30105]: pam_unix(sudo:session): session closed for user root Sep 07 16:24:47 localhost.localdomain python[21409]: detected unhandled Python exception in ‘/bin/bahmni’ Sep 07 16:24:47 localhost.localdomain abrt-server[30135]: Executable ‘/usr/bin/odoo’ doesn’t belong to any package and ProcessUnpackaged is set to ‘no’ Sep 07 16:24:47 localhost.localdomain abrt-server[30135]: ‘post-create’ on ‘/var/spool/abrt/Python-2021-09-07-16:24:45-30129’ exited with 1 Sep 07 16:24:47 localhost.localdomain abrt-server[30135]: Deleting problem directory ‘/var/spool/abrt/Python-2021-09-07-16:24:45-30129’ Sep 07 16:24:47 localhost.localdomain sudo[21407]: pam_unix(sudo:session): session closed for user root Sep 07 16:24:47 localhost.localdomain abrt-server[30149]: Executable ‘/bin/bahmni’ doesn’t belong to any package and ProcessUnpackaged is set to ‘no’ Sep 07 16:24:47 localhost.localdomain abrt-server[30149]: ‘post-create’ on ‘/var/spool/abrt/Python-2021-09-07-16:24:47-21409’ exited with 1 Sep 07 16:24:47 localhost.localdomain abrt-server[30149]: Deleting problem directory ‘/var/spool/abrt/Python-2021-09-07-16:24:47-21409’ Sep 07 16:27:29 localhost.localdomain dbus[923]: [system] Activating via systemd: service name=‘net.reactivated.Fprint’ unit=‘fprintd.service’ Sep 07 16:27:29 localhost.localdomain systemd[1]: Starting Fingerprint Authentication Daemon… – Subject: Unit fprintd.service has begun start-up – Defined-By: systemd – Support: systemd-devel Info Page

– Unit fprintd.service has begun starting up. Sep 07 16:27:29 localhost.localdomain dbus[923]: [system] Successfully activated service ‘net.reactivated.Fprint’ Sep 07 16:27:29 localhost.localdomain systemd[1]: Started Fingerprint Authentication Daemon. – Subject: Unit fprintd.service has finished start-up – Defined-By: systemd – Support: systemd-devel Info Page

– Unit fprintd.service has finished starting up.

– The start-up result is done. Sep 07 16:27:36 localhost.localdomain sudo[30737]: zmin : TTY=pts/0 ; PWD=/usr/local ; USER=root ; COMMAND=/bin/systemctl status odoo Sep 07 16:27:36 localhost.localdomain sudo[30737]: pam_unix(sudo:session): session opened for user root by zmin(uid=0) Sep 07 16:27:36 localhost.localdomain sudo[30737]: pam_unix(sudo:session): session closed for user root Sep 07 16:28:45 localhost.localdomain kernel: CPU2: Core temperature above threshold, cpu clock throttled (total events = 1300) Sep 07 16:28:45 localhost.localdomain kernel: CPU6: Core temperature above threshold, cpu clock throttled (total events = 1300) Sep 07 16:28:45 localhost.localdomain kernel: CPU3: Package temperature above threshold, cpu clock throttled (total events = 2896) Sep 07 16:28:45 localhost.localdomain kernel: CPU7: Package temperature above threshold, cpu clock throttled (total events = 2896) Sep 07 16:28:45 localhost.localdomain kernel: CPU6: Package temperature above threshold, cpu clock throttled (total events = 2896) Sep 07 16:28:45 localhost.localdomain kernel: CPU2: Package temperature above threshold, cpu clock throttled (total events = 2896) Sep 07 16:28:45 localhost.localdomain kernel: CPU0: Package temperature above threshold, cpu clock throttled (total events = 2896) Sep 07 16:28:45 localhost.localdomain kernel: CPU4: Package temperature above threshold, cpu clock throttled (total events = 2896) Sep 07 16:28:45 localhost.localdomain kernel: CPU1: Package temperature above threshold, cpu clock throttled (total events = 2896) Sep 07 16:28:45 localhost.localdomain kernel: CPU5: Package temperature above threshold, cpu clock throttled (total events = 2896) Sep 07 16:28:45 localhost.localdomain kernel: CPU2: Core temperature/speed normal Sep 07 16:28:45 localhost.localdomain kernel: CPU3: Package temperature/speed normal Sep 07 16:28:45 localhost.localdomain kernel: CPU1: Package temperature/speed normal Sep 07 16:28:45 localhost.localdomain kernel: CPU0: Package temperature/speed normal Sep 07 16:28:45 localhost.localdomain kernel: CPU4: Package temperature/speed normal Sep 07 16:28:45 localhost.localdomain kernel: CPU6: Core temperature/speed normal Sep 07 16:28:45 localhost.localdomain kernel: CPU5: Package temperature/speed normal Sep 07 16:28:45 localhost.localdomain kernel: CPU7: Package temperature/speed normal Sep 07 16:28:45 localhost.localdomain kernel: CPU6: Package temperature/speed normal Sep 07 16:28:45 localhost.localdomain kernel: CPU2: Package temperature/speed normal Sep 07 16:30:02 localhost.localdomain systemd[1]: Started Session 9 of user root. – Subject: Unit session-9.scope has finished start-up – Defined-By: systemd – Support: systemd-devel Info Page

– Unit session-9.scope has finished starting up.

– The start-up result is done. Sep 07 16:30:02 localhost.localdomain CROND[31565]: (root) CMD (/usr/lib64/sa/sa1 1 1) Sep 07 16:31:11 localhost.localdomain sudo[31764]: zmin : TTY=pts/0 ; PWD=/usr/local ; USER=root ; COMMAND=/bin/journalctl -xe Sep 07 16:31:11 localhost.localdomain sudo[31764]: pam_unix(sudo:session): session opened for user root by zmin(uid=0) Sep 07 16:31:21 localhost.localdomain sudo[31764]: pam_unix(sudo:session): session closed for user root Sep 07 16:32:05 localhost.localdomain sudo[31934]: zmin : TTY=pts/0 ; PWD=/usr/local ; USER=root ; COMMAND=/bin/journalctl -xe Sep 07 16:32:05 localhost.localdomain sudo[31934]: pam_unix(sudo:session): session opened for user root by zmin(uid=0) Sep 07 16:32:15 localhost.localdomain sudo[31934]: pam_unix(sudo:session): session closed for user root Sep 07 16:32:23 localhost.localdomain sudo[32005]: zmin : TTY=pts/0 ; PWD=/usr/local ; USER=root ; COMMAND=/bin/journalctl -xe Sep 07 16:32:23 localhost.localdomain sudo[32005]: pam_unix(sudo:session): session opened for user root by zmin(uid=0) Sep 07 16:32:26 localhost.localdomain sudo[32005]: pam_unix(sudo:session): session closed for user root Sep 07 16:33:23 localhost.localdomain firefox[30850]: No marshaller for signature of signal ‘PropertiesChanged’ Sep 07 16:35:20 localhost.localdomain sudo[32492]: zmin : TTY=pts/0 ; PWD=/usr/local ; USER=root ; COMMAND=/bin/su Sep 07 16:35:20 localhost.localdomain sudo[32492]: pam_unix(sudo:session): session opened for user root by zmin(uid=0) Sep 07 16:35:20 localhost.localdomain su[32494]: (to root) zmin on pts/0 Sep 07 16:35:20 localhost.localdomain su[32494]: pam_unix(su:session): session opened for user root by zmin(uid=0) Sep 07 16:35:20 localhost.localdomain dbus[923]: [system] Activating service name=‘org.freedesktop.problems’ (using servicehelper) Sep 07 16:35:20 localhost.localdomain dbus[923]: [system] Successfully activated service ‘org.freedesktop.problems’

Please let me know, if I can send you this journalctl output as a file and send you by email. thank you. Zaw.

Here is the full text lines for my current error.

TASK [bahmni-odoo : Start Odoo and enable at boot] *************************************************************************************************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/bahmni-odoo/tasks/main.yml:112 fatal: [localhost]: FAILED! => {“changed”: false, “failed”: true, “msg”: “Unable to start service odoo: Job for odoo.service failed. See “systemctl status odoo.service” and “journalctl -xe” for details.\n”} to retry, use: --limit @/opt/bahmni-installer/bahmni-playbooks/all.retry

PLAY RECAP ******************************************************************************************************************************************* localhost : ok=238 changed=87 unreachable=0 failed=1

Traceback (most recent call last): File “/bin/bahmni”, line 9, in load_entry_point(‘bahmni==0.1’, ‘console_scripts’, ‘bahmni’)() File “/usr/lib64/python2.7/site-packages/click/core.py”, line 764, in call return self.main(*args, **kwargs) File “/usr/lib64/python2.7/site-packages/click/core.py”, line 717, in main rv = self.invoke(ctx) File “/usr/lib64/python2.7/site-packages/click/core.py”, line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File “/usr/lib64/python2.7/site-packages/click/core.py”, line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File “/usr/lib64/python2.7/site-packages/click/core.py”, line 555, in invoke return callback(*args, **kwargs) File “/usr/lib64/python2.7/site-packages/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 90, 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/local all.yml -vv --extra-vars ‘@/etc/bahmni-installer/rpm_versions.yml’ --extra-vars ‘@/etc/bahmni-backrest.conf’ --extra-vars ‘@/etc/bahmni-installer/setup.yml’’ returned non-zero exit status 2 [zmin@localhost local]$

Thanks @mumzm for the input. will look into this and get back to you with our findings. This indicates that a python distribution is missing which causes odoo not to start. In case, you are not using actively odoo, then you can skip that step odoo installation and then progress with the rest of the bahmni installation -

vi /etc/bahmni-installer/local

go through the content of the file and there would be an entry for bahmni-erp and bahmni-erp-db —> remove the localhost under both the variables and then again try to give the bahmni install command tp re-install bahmni

1 Like

Thanks @buvaneswariarun . I will move on with your suggestion. But, if I don’t have odoo, what functionality I will be missing in Bahmni? I am new to this Bahmni and I haven’t really use/test it yet, since I never got successfully installed. If I skip this odoo installation, will I be able to use Bahmni as normal? What functionality I can’t do just because of I don’t have odoo installed? thanks, Zaw.

Odoo is the module that takes care of billing and stock management. In case you dont use it widely, you can skip it during installation - this is just an workaround that we are suggesting right now, so that you can install and use bahmni while we fix the reason why odoo is failing - once a fix is in place, you can re-install odoo separately without affecting other modules

Thanks @buvaneswariarun . I will install without odoo as you suggested, and will let you know… Really appreciate your help.

Hi @buvaneswariarun , yes, it works. After I skip the odoo installation, the whole installation went through all the way to the end, and I can see the Bahmni running. Thank you so much. Now, I can start testing and please let me know, if you find the way to fix this missing python distribution. Thank you so much for your help…

2 Likes

I run the service --status-all and here is what I got.

[zmin@bayintnaung ~]$ sudo service --status-all atomfeed-console is running with pid: 2019 Service bahmni-lab is running with pid: 1930 Service bahmni-reports is running with pid: 1884 Checking jexec statusnetconsole module not loaded Configured devices: lo enp1s0 grizzly Currently active devices: lo enp1s0 wlp2s0 virbr0 mkdir: cannot create directory ‘odoo’: File exists odoo-server is stopped Service openmrs is running with pid: 1970

And also start each services individually and got error on following 3 services:

[zmin@bayintnaung ~]$ sudo service odoo start Starting odoo (via systemctl): Job for odoo.service failed. See “systemctl status odoo.service” and “journalctl -xe” for details. [FAILED]

[zmin@bayintnaung ~]$ sudo service bahmni-erp-connect start Redirecting to /bin/systemctl start bahmni-erp-connect.service Failed to start bahmni-erp-connect.service: Unit not found.

[zmin@bayintnaung ~]$ sudo service pacs-integration start Redirecting to /bin/systemctl start pacs-integration.service Failed to start pacs-integration.service: Unit not found.

please do not use “service” command, it can mess up a lot of things. Use “systemctl”