[SOLVED] Error during install. pgsql failed to start , openERP OpenELIS not Working, Please Help

Hello,

Today I tried to install bahmni but not succeed.

OpenMRS worked fine but OpenERP and ELIS not working.

Figured out that postgresql not getting started.

#sudo service postgresql-9.2 start

/var/lib/pgsql/9.2/data is missing. Use "service postgresql-9.2 initdb" to initialize the cluster first.
                                                       [FAILED]
# service postgresql-9.2 initdb
Initializing database: mkdir: cannot create directory `/var/lib/pgsql/9.2/data/pg_log': File exists
                                                       [FAILED]

List of all services

# sudo service --status-all
Service bahmni-reports is running with pid: 12884
/etc/init.d/cdp-agent status: cdp (pid 1433) running
crond (pid  1387) is running...
exim is stopped
fail2ban-server (pid  1399) is running...
Status
|- Number of jail:      0
`- Jail list:
htcacheclean is stopped
httpd (pid  10697) is running...
ip6tables: Firewall is not running.
ipset: not running
Table: filter
Chain INPUT (policy DROP)
num  target     prot opt source               destination
1    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:8051 /* BAHMNIREPORTS */
2    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:3306 /* MYSQL */
3    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:8050 /* OPENMRS */
4    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:443 /* https */
5    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:80 /* WEB SERVER */
6    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
7    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
8    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0
9    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
10   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:22
11   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:80
12   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:443
13   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:10050
14   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:1167
15   ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           /* lo */
16   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:22 /* SSH */

Chain FORWARD (policy DROP)
num  target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination

Checking jexec statusmysqld (pid  3730) is running...
netconsole module not loaded
Configured devices:
lo eth0 eth1
Currently active devices:
lo eth0 eth1
ntpd (pid  1339) is running...
Service openmrs is running with pid: 11746
portreserve is stopped
postgresql-9.2 is stopped
quota_nld is stopped
rdisc is stopped
restorecond is stopped
rsyslogd (pid  1301) is running...
sandbox is stopped
saslauthd (pid  1351) is running...
snmpd is stopped
snmptrapd is stopped
openssh-daemon (pid  9772) is running...
zabbix_agentd (pid  1370) is running...

After the installation of bahmni i get this error

TASK [postgres : insert/update postgres config after "local" is for Unix domain                                                                socket connections only line] ***
task path: /opt/bahmni-installer/bahmni-playbooks/roles/postgres/tasks/main.yml:                                                               33
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Destin                                                               ation /var/lib/pgsql/9.2/data/pg_hba.conf does not exist !", "rc": 257}
        to retry, use: --limit @/opt/bahmni-installer/bahmni-playbooks/all.retry

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

Traceback (most recent call last):
  File "/usr/bin/bahmni", line 9, in <module>
    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", lin                                                               e 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/click-6.7-py2.6.egg/click/core.py", lin                                                               e 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.6/site-packages/click-6.7-py2.6.egg/click/core.py", lin                                                               e 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", lin                                                               e 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", lin                                                               e 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 8                                                               0, 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-installe                                                               r/local all.yml -vv  --extra-vars '@/etc/bahmni-installer/rpm_versions.yml' --ex                                                               tra-vars '@/etc/bahmni-installer/setup.yml'' returned non-zero exit status 2

Service status

# sudo service bahmni-lab status
bahmni-lab: unrecognized service
# sudo service openerp status
openerp: unrecognized service
# sudo service bahmni-erp-connect status
bahmni-erp-connect: unrecognized service
# sudo service mysqld status
mysqld (pid  3730) is running...
# sudo service postgresql-9.2 status
postgresql-9.2 is stopped

Please help.

Hi @medico, Which version of Bahmni you are trying to install ?? yum list installed | grep bahmni will give the Bahmni version.

take backup of /var/lib/pgsql/9.2/data and then delete the data folder. After this try to run sudo service postgresql-9.2 initdb

1 Like

also if you have another directory you want to use, you can do ``` sudo service postgresql-.9.2 initdb “dir name”

1 Like

Thanks for the help. Now its up and running without any errors.

Hi,

@sravanthi17 There is one problem am facing with Patient Registration app. After clicking the registration page is blank, nothing on the page. (https://1.2.3.4/bahmni/registration/index.html#/search)

But all other modules work fine as expected.

# sudo service --status-all
atomfeed-console is running with pid: 1406
auditd (pid  1197) is running...
Service bahmni-erp-connect is running with pid: 1424
Service bahmni-lab is running with pid: 1443
Service bahmni-reports is running with pid: 1461
crond (pid  2037) is running...
htcacheclean is stopped
httpd (pid  2023) is running...
Table: filter
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination
1    ACCEPT     all      ::/0                 ::/0                state RELATED,ESTABLISHED
2    ACCEPT     icmpv6    ::/0                 ::/0
3    ACCEPT     all      ::/0                 ::/0
4    ACCEPT     udp      ::/0                 fe80::/64           state NEW udp dpt:546
5    ACCEPT     tcp      ::/0                 ::/0                state NEW tcp dpt:22
6    REJECT     all      ::/0                 ::/0                reject-with icmp6-adm-prohibited

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination
1    REJECT     all      ::/0                 ::/0                reject-with icmp6-adm-prohibited

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination

Table: filter
Chain INPUT (policy DROP)
num  target     prot opt source               destination
1    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:8059 /* ATOMFEED_CONSOLE */
2    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:8069 /* BAHMNIERP */
3    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:5432 /* POSTGRES */
4    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:8052 /* BAHMNILAB */
5    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:8051 /* BAHMNIREPORTS */
6    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:3306 /* MYSQL */
7    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:8050 /* OPENMRS */
8    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:443 /* https */
9    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:80 /* WEB SERVER */
10   ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
11   ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0
12   ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
13   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22
14   REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited
15   ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           /* lo */
16   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:22 /* SSH */

Chain FORWARD (policy DROP)
num  target     prot opt source               destination
1    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination

Checking jexec statusKdump is operational
lvmetad is stopped
dmeventd is stopped
mdmonitor is stopped
messagebus (pid  1241) is running...
mysqld (pid  1777) is running...
netconsole module not loaded
Configured devices:
lo eth0
Currently active devices:
lo eth0
ntpd (pid  1391) is running...
openerp-server is running...
Service openmrs is running with pid: 1867
master (pid  2008) is running...
postgresql-9.2 (pid  1905) is running...
rdisc is stopped
rsyslogd (pid  1219) is running...
sandbox is stopped
saslauthd is stopped
openssh-daemon (pid  1380) is running...

Do you see any error ? Right click -> choose Inspect -> Check if any error message logged in “console”

Thanks for the reply,

I have created a new topic. Please goto registration page is blank