Error during bahmni installation error on bahmni bin file

I am trying to install Bahmni .89 but faced error while i fired bahmni -i local install

#bahmni -i local install Traceback (most recent call last): File “/usr/bin/bahmni”, line 5, in from pkg_resources import load_entry_point File “/usr/lib/python2.6/site-packages/pkg_resources.py”, line 2655, in working_set.require(requires) File “/usr/lib/python2.6/site-packages/pkg_resources.py”, line 648, in require needed = self.resolve(parse_requirements(requirements)) File “/usr/lib/python2.6/site-packages/pkg_resources.py”, line 546, in resolve raise DistributionNotFound(req) pkg_resources.DistributionNotFound: Click

I encountered a similar issue. I think the root cause is that the rpm is trying to get the Click package from http://pypi.python.org/simple/Click/, as evidenced by these lines in the output from yum install:

Searching for Click
Reading http://pypi.python.org/simple/Click/
Couldn't find index page for 'Click' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for Click
error: Could not find suitable distribution for Requirement.parse('Click')

I checked that url but received a message “SSL Required”. The same url with https gives a list of directories containing various versions of the Click package. However I dont know which version is required. A simpler fix may be to change the .rpm to use the https url, but that is also outside of my skillset.

yum install python-click tried this and is working fine but i got issue when i finished installing i couldnt start the openerp. CHecked with the openerp status and was stopped and when i restart the service i got the error as per attached.

Hi @sanjayap and @dropbear ,

This might help for the time being:

Used the step and still getting the error as attached.

@sanjayap I would suggest that you share the details of your steps on the other thread and let the users on that thread guide you.

root Terminal using command line >>

Tattva@localhost# bahmni -i local install

after i am this Error ,how to reslove please help me.

t -c 1-2", “delta”: “0:00:00.005782”, “end”: “2018-03-24 17:37:16.682839”, “rc”: 0, “start”: “2018-03-24 17:37:16.677057”, “stderr”: “”, “stdout”: "3 ", “stdout_lines”: ["3 "], “warnings”: []}

TASK [httpd : delete matching rule if exists] ********************************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/httpd/tasks/main.yml:28 changed: [localhost] => {“changed”: true, “cmd”: "iptables -D INPUT 3 ", “delta”: “0:00:00.004295”, “end”: “2018-03-24 17:37:16.918078”, “rc”: 0, “start”: “2018-03-24 17:37:16.913783”, “stderr”: “”, “stdout”: “”, “stdout_lines”: [], “warnings”: []}

TASK [httpd : Allow port 443 through firewall] ********************************* task path: /opt/bahmni-installer/bahmni-playbooks/roles/httpd/tasks/main.yml:32 changed: [localhost] => {“changed”: true, “cmd”: ["/sbin/iptables", “-I”, “INPUT”, “1”, “-p”, “tcp”, “–dport”, “443”, “-j”, “ACCEPT”, “-m”, “comment”, “–comment”, “https”], “delta”: “0:00:00.003203”, “end”: “2018-03-24 17:37:17.141672”, “rc”: 0, “start”: “2018-03-24 17:37:17.138469”, “stderr”: “”, “stdout”: “”, “stdout_lines”: [], “warnings”: []}

TASK [httpd : save iptables] *************************************************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/httpd/tasks/main.yml:35 changed: [localhost] => {“changed”: true, “cmd”: [“service”, “iptables”, “save”], “delta”: “0:00:00.333113”, “end”: “2018-03-24 17:37:17.705974”, “rc”: 0, “start”: “2018-03-24 17:37:17.372861”, “stderr”: “”, “stdout”: “iptables: Saving firewall rules to /etc/sysconfig/iptables: [ OK ]”, “stdout_lines”: [“iptables: Saving firewall rules to /etc/sysconfig/iptables: [ OK ]”], “warnings”: [“Consider using service module rather than running service”]}

TASK [httpd : create bahmni-certs directory] *********************************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/httpd/tasks/main.yml:40 ok: [localhost] => {“changed”: false, “gid”: 501, “group”: “bahmni”, “mode”: “0755”, “owner”: “bahmni”, “path”: “/etc/bahmni-certs”, “secontext”: “unconfined_u:object_r:etc_t:s0”, “size”: 4096, “state”: “directory”, “uid”: 501}

TASK [httpd : check if certificate already points to letsencrypt] ************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/httpd/tasks/main.yml:43 ok: [localhost] => {“changed”: false, “stat”: {“atime”: 1521887772.9102335, “ctime”: 1521887772.9092336, “dev”: 64768, “executable”: false, “exists”: true, “gid”: 0, “gr_name”: “root”, “inode”: 522503, “isblk”: false, “ischr”: false, “isdir”: false, “isfifo”: false, “isgid”: false, “islnk”: true, “isreg”: false, “issock”: false, “isuid”: false, “lnk_source”: “/etc/pki/tls/certs/localhost.crt”, “mode”: “0777”, “mtime”: 1521887772.9092336, “nlink”: 1, “path”: “/etc/bahmni-certs/cert.crt”, “pw_name”: “root”, “readable”: true, “rgrp”: true, “roth”: true, “rusr”: true, “size”: 32, “uid”: 0, “wgrp”: true, “woth”: true, “writeable”: true, “wusr”: true, “xgrp”: true, “xoth”: true, “xusr”: true}}

TASK [httpd : link local certificate and domain key] *************************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/httpd/tasks/main.yml:47 skipping: [localhost] => (item={u’dest’: u’/etc/bahmni-certs/cert.crt’, u’src’: u’/etc/pki/tls/certs/localhost.crt’}) => {“changed”: false, “item”: {“dest”: “/etc/bahmni-certs/cert.crt”, “src”: “/etc/pki/tls/certs/localhost.crt”}, “skip_reason”: “Conditional check failed”, “skipped”: true} skipping: [localhost] => (item={u’dest’: u’/etc/bahmni-certs/chained.pem’, u’src’: u’/etc/pki/tls/certs/localhost.crt’}) => {“changed”: false, “item”: {“dest”: “/etc/bahmni-certs/chained.pem”, “src”: “/etc/pki/tls/certs/localhost.crt”}, “skip_reason”: “Conditional check failed”, “skipped”: true} skipping: [localhost] => (item={u’dest’: u’/etc/bahmni-certs/domain.key’, u’src’: u’/etc/pki/tls/private/localhost.key’}) => {“changed”: false, “item”: {“dest”: “/etc/bahmni-certs/domain.key”, “src”: “/etc/pki/tls/private/localhost.key”}, “skip_reason”: “Conditional check failed”, “skipped”: true}

TASK [httpd : Switch off chkconfig for httpd on passive] *********************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/httpd/tasks/main.yml:55 skipping: [localhost] => {“changed”: false, “skip_reason”: “Conditional check failed”, “skipped”: true}

TASK [httpd : Stop httpd] ****************************************************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/httpd/tasks/main.yml:59 changed: [localhost] => {“changed”: true, “name”: “httpd”, “state”: “stopped”}

TASK [httpd : Start httpd] ***************************************************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/httpd/tasks/main.yml:65 changed: [localhost] => {“changed”: true, “enabled”: true, “name”: “httpd”, “state”: “started”}

TASK [httpd : Add landing page html file] ************************************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/httpd/tasks/main.yml:71 ok: [localhost] => {“changed”: false, “gid”: 501, “group”: “bahmni”, “mode”: “0644”, “owner”: “bahmni”, “path”: “/var/www/html/index.html”, “secontext”: “system_u:object_r:httpd_sys_content_t:s0”, “size”: 16886, “state”: “file”, “uid”: 501}

TASK [httpd : Create /var/www/bahmni_revisions] ******************************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/httpd/tasks/main.yml:79 ok: [localhost] => {“changed”: false, “gid”: 501, “group”: “bahmni”, “mode”: “0755”, “owner”: “bahmni”, “path”: “/var/www/bahmni_revisions”, “secontext”: “unconfined_u:object_r:httpd_sys_content_t:s0”, “size”: 4096, “state”: “directory”, “uid”: 501}

TASK [httpd : Copy openmrs revision file] ************************************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/httpd/tasks/main.yml:82 ok: [localhost] => {“changed”: false, “checksum”: “ac63f1d23527ad6388180576113f690b3b71cf36”, “dest”: “/var/www/bahmni_revisions/./bahmni_openmrs_revision.json”, “gid”: 501, “group”: “bahmni”, “mode”: “0644”, “owner”: “bahmni”, “path”: “/var/www/bahmni_revisions/./bahmni_openmrs_revision.json”, “secontext”: “system_u:object_r:httpd_sys_content_t:s0”, “size”: 711, “state”: “file”, “uid”: 501}

TASK [httpd : Copy openerp revision file] ************************************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/httpd/tasks/main.yml:90 ok: [localhost] => {“changed”: false, “checksum”: “24e5087ac723221e79278eb78a09a020a48e039b”, “dest”: “/var/www/bahmni_revisions/./bahmni_openerp_revision.json”, “gid”: 501, “group”: “bahmni”, “mode”: “0644”, “owner”: “bahmni”, “path”: “/var/www/bahmni_revisions/./bahmni_openerp_revision.json”, “secontext”: “system_u:object_r:httpd_sys_content_t:s0”, “size”: 449, “state”: “file”, “uid”: 501}

TASK [httpd : Copy openelis revision file] ************************************* task path: /opt/bahmni-installer/bahmni-playbooks/roles/httpd/tasks/main.yml:99 ok: [localhost] => {“changed”: false, “checksum”: “1c3409cbc00d927df1de75235de2c11de5cbd306”, “dest”: “/var/www/bahmni_revisions/./bahmni_openelis_revision.json”, “gid”: 501, “group”: “bahmni”, “mode”: “0644”, “owner”: “bahmni”, “path”: “/var/www/bahmni_revisions/./bahmni_openelis_revision.json”, “secontext”: “system_u:object_r:httpd_sys_content_t:s0”, “size”: 198, “state”: “file”, “uid”: 501}

TASK [httpd : Uninstall bahmni-certs rpm] ************************************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/httpd/tasks/main.yml:108 ok: [localhost] => {“changed”: false, “msg”: “”, “rc”: 0, “results”: [“bahmni-certs is not installed”]}

TASK [httpd : Remove ssl.conf] ************************************************* task path: /opt/bahmni-installer/bahmni-playbooks/roles/httpd/tasks/main.yml:111 ok: [localhost] => {“changed”: false, “path”: “/etc/httpd/conf.d/ssl.conf”, “state”: “absent”}

TASK [oracle-java : check if java is already downloaded] *********************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/oracle-java/tasks/oracle-java.yml:1 ok: [localhost] => {“changed”: false, “stat”: {“atime”: 1521887780.0432334, “checksum”: “da39a3ee5e6b4b0d3255bfef95601890afd80709”, “ctime”: 1521887780.0432334, “dev”: 64768, “executable”: false, “exists”: true, “gid”: 0, “gr_name”: “root”, “inode”: 147144, “isblk”: false, “ischr”: false, “isdir”: false, “isfifo”: false, “isgid”: false, “islnk”: false, “isreg”: true, “issock”: false, “isuid”: false, “md5”: “d41d8cd98f00b204e9800998ecf8427e”, “mode”: “0644”, “mtime”: 1521887780.0432334, “nlink”: 1, “path”: “/opt/jre-8u131-linux-x64.rpm”, “pw_name”: “root”, “readable”: true, “rgrp”: true, “roth”: true, “rusr”: true, “size”: 0, “uid”: 0, “wgrp”: false, “woth”: false, “writeable”: true, “wusr”: true, “xgrp”: false, “xoth”: false, “xusr”: false}}

TASK [oracle-java : set_fact] ************************************************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/oracle-java/tasks/oracle-java.yml:5 ok: [localhost] => {“ansible_facts”: {“force_new_java_download”: true}, “changed”: false}

TASK [oracle-java : Delete java rpm if checksum does not match] **************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/oracle-java/tasks/oracle-java.yml:9 changed: [localhost] => {“changed”: true, “path”: “/opt/jre-8u131-linux-x64.rpm”, “state”: “absent”}

TASK [oracle-java : Download Java] ********************************************* task path: /opt/bahmni-installer/bahmni-playbooks/roles/oracle-java/tasks/oracle-java.yml:13 fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“wget”, “-q”, “-p”, “-O”, “/opt/jre-8u131-linux-x64.rpm”, “–no-check-certificate”, “–no-cookies”, “–header”, “Cookie:oraclelicense=accept-securebackup-cookie”, “http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jre-8u131-linux-x64.rpm”], “delta”: “0:00:02.496194”, “end”: “2018-03-24 17:37:26.866319”, “failed”: true, “rc”: 8, “start”: “2018-03-24 17:37:24.370125”, “stderr”: “”, “stdout”: “”, “stdout_lines”: [], “warnings”: [“Consider using get_url or uri module rather than running wget”]} to retry, use: --limit @/opt/bahmni-installer/bahmni-playbooks/all.retry

PLAY RECAP ********************************************************************* localhost : ok=93 changed=32 unreachable=0 failed=1

Traceback (most recent call last): File “/usr/bin/bahmni”, line 9, in load_entry_point(‘bahmni==0.1’, ‘console_scripts’, ‘bahmni’)() File “/usr/lib/python2.6/site-packages/click-6.7-py2.6.egg/click/core.py”, line 722, in call return self.main(*args, **kwargs) File “/usr/lib/python2.6/site-packages/click-6.7-py2.6.egg/click/core.py”, line 697, in main rv = self.invoke(ctx) File “/usr/lib/python2.6/site-packages/click-6.7-py2.6.egg/click/core.py”, line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File “/usr/lib/python2.6/site-packages/click-6.7-py2.6.egg/click/core.py”, line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File “/usr/lib/python2.6/site-packages/click-6.7-py2.6.egg/click/core.py”, line 535, in invoke return callback(*args, **kwargs) File “/usr/lib/python2.6/site-packages/click-6.7-py2.6.egg/click/decorators.py”, line 17, in new_func return f(get_current_context(), *args, **kwargs)

File “/usr/lib/python2.6/site-packages/bahmni-0.1-py2.6.egg/bahmni.py”, line 91, in install return subprocess.check_call(command, shell=True) File “/usr/lib64/python2.6/subprocess.py”, line 505, 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