[SOLVED] Bahmni Install error on Digital Ocean, Please Help

I have tried many times to install bahmni on DO. But it didnt work at all.

Please help… I think the issue is with mysql, protege sql (Error: postgres user already exists.), and httpd services error…

`+ . /etc/openmrs/openmrs.conf ++ export SERVER_PORT=8080 ++ SERVER_PORT=8080 ++ export BASE_DIR=/var/run/openmrs ++ BASE_DIR=/var/run/openmrs ++ export CONTEXT_PATH=/openmrs ++ CONTEXT_PATH=/openmrs ++ export WAR_DIRECTORY=/var/run/openmrs/openmrs ++ WAR_DIRECTORY=/var/run/openmrs/openmrs ++ export OPENMRS_RUNTIME_PROPERTIES_FILE=/etc/openmrs/openmrs-runtime.properties ++ OPENMRS_RUNTIME_PROPERTIES_FILE=/etc/openmrs/openmrs-runtime.properties ++ export MODULE_REPO=/opt/openmrs/modules ++ MODULE_REPO=/opt/openmrs/modules ++ export ‘SERVER_OPTS=-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m’ ++ SERVER_OPTS=’-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m’ ++ export DEBUG_OPTS=-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n ++ DEBUG_OPTS=-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n ++ OPENMRS_DB_SERVER=localhost ++ OPENMRS_DB_USER=openmrs-user ++ OPENMRS_DB_PASSWORD=password ++ MYSQL_ROOT_USER=root ++ MYSQL_ROOT_PASSWORD=password

  • ‘[’ -f /etc/bahmni-installer/bahmni.conf ‘]’ ++ mysql -h localhost -uroot -ppassword --skip-column-names -e ‘SHOW DATABASES LIKE ‘’‘openmrs’’’’ Warning: Using a password on the command line interface can be insecure.
  • RESULT=openmrs
  • ‘[’ openmrs ‘!=’ openmrs ‘]’
  • mysql -h localhost -uroot -ppassword -e ‘CREATE USER ‘’‘openmrs-user’’’@’’‘localhost’’’ IDENTIFIED BY ‘’’’’’; GRANT ALL PRIVILEGES ON openmrs. TO ‘’‘openmrs-user’’’@’’‘localhost’’’ identified by ‘’‘password’’’ WITH GRANT OPTION;’ Warning: Using a password on the command line interface can be insecure. ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for ‘openmrs-user’@‘localhost’ Verifying : unzip-6.0-2.el6_6.x86_64 1/2 Verifying : openmrs-1.12.0-792.noarch 2/2

Installed: openmrs.noarch 0:1.12.0-792

Dependency Installed: unzip.x86_64 0:6.0-2.el6_6

Complete! Loaded plugins: fastestmirror Setting up Install Process Loading mirror speeds from cached hostfile

  • base: centos.usonyx.net
  • epel: ftp.cuhk.edu.hk
  • extras: centos.usonyx.net
  • updates: centos.usonyx.net No package bahmni-emr- available. No package bahmni-web- available. No package bahmni-reports- available. No package bahmni-lab- available. No package bahmni-lab-connect- available. No package bahmni-erp- available. Error: Nothing to do error reading information on service httpd: No such file or directory error reading information on service openerp: No such file or directory error reading information on service bahmni-lab: No such file or directory [root@server ~]# yum install httpd Loaded plugins: fastestmirror Setting up Install Process Loading mirror speeds from cached hostfile
  • base: centos.usonyx.net
  • epel: ftp.cuhk.edu.hk
  • extras: centos.usonyx.net
  • updates: centos.usonyx.net Resolving Dependencies –> Running transaction check —> Package httpd.x86_64 0:2.2.15-47.el6.centos.1 will be installed –> Processing Dependency: httpd-tools = 2.2.15-47.el6.centos.1 for package: httpd-2.2.15-47.el6.centos.1.x86_64 –> Processing Dependency: apr-util-ldap for package: httpd-2.2.15-47.el6.centos.1.x86_64 –> Processing Dependency: /etc/mime.types for package: httpd-2.2.15-47.el6.centos.1.x86_64 –> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.2.15-47.el6.centos.1.x86_64 –> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.2.15-47.el6.centos.1.x86_64 –> Running transaction check —> Package apr.x86_64 0:1.3.9-5.el6_2 will be installed —> Package apr-util.x86_64 0:1.3.9-3.el6_0.1 will be installed —> Package apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1 will be installed —> Package httpd-tools.x86_64 0:2.2.15-47.el6.centos.1 will be installed —> Package mailcap.noarch 0:2.1.31-2.el6 will be installed –> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================================================== Package Arch Version Repository Size

Installing: httpd x86_64 2.2.15-47.el6.centos.1 updates 830 k Installing for dependencies: apr x86_64 1.3.9-5.el6_2 base 123 k apr-util x86_64 1.3.9-3.el6_0.1 base 87 k apr-util-ldap x86_64 1.3.9-3.el6_0.1 base 15 k httpd-tools x86_64 2.2.15-47.el6.centos.1 updates 77 k mailcap noarch 2.1.31-2.el6 base 27 k

Transaction Summary

Install 6 Package(s)

Total download size: 1.1 M Installed size: 3.6 M Is this ok [y/N]: y Downloading Packages: (1/6): apr-1.3.9-5.el6_2.x86_64.rpm | 123 kB 00:00 (2/6): apr-util-1.3.9-3.el6_0.1.x86_64.rpm | 87 kB 00:00 (3/6): apr-util-ldap-1.3.9-3.el6_0.1.x86_64.rpm | 15 kB 00:00 (4/6): httpd-2.2.15-47.el6.centos.1.x86_64.rpm | 830 kB 00:00 (5/6): httpd-tools-2.2.15-47.el6.centos.1.x86_64.rpm | 77 kB 00:00 (6/6): mailcap-2.1.31-2.el6.noarch.rpm | 27 kB 00:00

Total 4.5 MB/s | 1.1 MB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : apr-1.3.9-5.el6_2.x86_64 1/6 Installing : apr-util-1.3.9-3.el6_0.1.x86_64 2/6 Installing : httpd-tools-2.2.15-47.el6.centos.1.x86_64 3/6 Installing : apr-util-ldap-1.3.9-3.el6_0.1.x86_64 4/6 Installing : mailcap-2.1.31-2.el6.noarch 5/6 Installing : httpd-2.2.15-47.el6.centos.1.x86_64 6/6 Verifying : httpd-tools-2.2.15-47.el6.centos.1.x86_64 1/6 Verifying : httpd-2.2.15-47.el6.centos.1.x86_64 2/6 Verifying : apr-util-ldap-1.3.9-3.el6_0.1.x86_64 3/6 Verifying : apr-1.3.9-5.el6_2.x86_64 4/6 Verifying : mailcap-2.1.31-2.el6.noarch 5/6 Verifying : apr-util-1.3.9-3.el6_0.1.x86_64 6/6

Installed: httpd.x86_64 0:2.2.15-47.el6.centos.1

Dependency Installed: apr.x86_64 0:1.3.9-5.el6_2 apr-util.x86_64 0:1.3.9-3.el6_0.1 apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1 httpd-tools.x86_64 0:2.2.15-47.el6.centos.1 mailcap.noarch 0:2.1.31-2.el6

Complete! [root@server ~]# service rum httpd rum: unrecognized service [root@server ~]# service run httpd run: unrecognized service [root@server ~]# service start httpd start: unrecognized service [root@server ~]# service httpd start Starting httpd: httpd: apr_sockaddr_info_get() failed for server httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName [ OK ] [root@server ~]# Complete! `

Please Help…

Hi Mayank

how are you trying to install bahmni? what command are you running?

-Shruthi

Mayank,

After creating a CentOS box on Digital Ocean, are you following these steps? https://bahmni.atlassian.net/wiki/display/BAH/Install+Bahmni+on+CentOS

Looks like the bahmni rpms could not be found (could be because the Bahmni repo did not get registered).

Hello Gurpreet & Shruthi, Thanks for your reply…

Im following the exact steps listed on the wiki page.

I have created cent os 6.7 with swap… and follow the commands listed on wiki page.

curl https://raw.githubusercontent.com/Bahmni/bahmni-vagrant/master/packer/scripts/base.sh | sudo sh

After that I check services… the first error i get is of httpd, any way i install httpd service and start it. after that i start openmrs service as well … but nothing happens… cant access any urls…

I tried it from scratch many times. If you allow it i can send you the new droplet access where you can check and tell me if i am doing anything wrong…

Thanks.

@mayanksworld You are right. I just tried installing on a Digital Ocean box, and got the same error:

No package bahmni-emr- available. No package bahmni-web- available. No package bahmni-reports- available. No package bahmni-lab- available. No package bahmni-lab-connect- available. No package bahmni-erp- available. Error: Nothing to do error reading information on service httpd: No such file or directory error reading information on service openerp: No such file or directory error reading information on service bahmni-lab: No such file or directory

Seems like the “BAHMNI_VERSION” variable doesn’t get read when we do a curl command directly. Can you do the following instead.

1) export BAHMNI_VERSION=0.78 
2) curl https://raw.githubusercontent.com/Bahmni/bahmni-vagrant/master/packer/scripts/base.sh >> install.sh
3) chmod +x install.sh
4) ./install.sh

ok wait a min am trying …

I get an error of psql…

Installed: postgresql92-server.x86_64 0:9.2.14-1PGDG.rhel6

Dependency Installed: postgresql92.x86_64 0:9.2.14-1PGDG.rhel6 postgresql92-libs.x86_64 0:9.2.14-1PGDG.rhel6

Complete! Initializing database: [ OK ] Starting postgresql-9.2 service: [ OK ] –2016-01-25 05:42:43-- https://github.com/Bahmni/emr-functional-tests/blob/master/dbdump/pgsql_backup.sql.gz?raw=true Resolving github.com… 192.30.252.128 Connecting to github.com|192.30.252.128|:443… connected. HTTP request sent, awaiting response… 302 Found Location: https://github.com/Bahmni/emr-functional-tests/raw/master/dbdump/pgsql_backup.sql.gz [following] –2016-01-25 05:42:44-- https://github.com/Bahmni/emr-functional-tests/raw/master/dbdump/pgsql_backup.sql.gz Connecting to github.com|192.30.252.128|:443… connected. HTTP request sent, awaiting response… 302 Found Location: https://raw.githubusercontent.com/Bahmni/emr-functional-tests/master/dbdump/pgsql_backup.sql.gz [following] –2016-01-25 05:42:45-- https://raw.githubusercontent.com/Bahmni/emr-functional-tests/master/dbdump/pgsql_backup.sql.gz Resolving raw.githubusercontent.com… 103.245.222.133 Connecting to raw.githubusercontent.com|103.245.222.133|:443… connected. HTTP request sent, awaiting response… 200 OK Length: 34501165 (33M) [application/octet-stream] Saving to: “pgsql_backup.sql.gz”

100%[==============================================================================================================================>] 34,501,165 81.5M/s in 0.4s

2016-01-25 05:43:06 (81.5 MB/s) - “pgsql_backup.sql.gz” saved [34501165/34501165]

ERROR: role “postgres” already exists

Keep waiting… this is just a warning. Not an issue… The install is still in progress. : )

Thanks, was trying from a week :stuck_out_tongue: … I think now i will succeed…

I updated the documentation on wiki. Thanks for your patience Mayank. https://bahmni.atlassian.net/wiki/display/BAH/Install+Bahmni+on+CentOS

Installation finished- Few errors-

httpd: apr_sockaddr_info_get() failed for server httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName [ OK ]

now:

[root@server ~]# sudo service bahmni-reports start Starting bahmni-reports [root@server ~]# sudo service bahmni-lab start Starting bahmni-lab [root@server ~]# sudo service openerp start Starting OpenERP Server Daemon (openerp-server): [ OK ] [root@server ~]# sudo service bahmni-erp-connect start Starting bahmni-erp-connect [root@server ~]# nohup: appending output to `/home/bahmni/nohup.out’

[root@server ~]# sudo service bahmni-event-log-service start bahmni-event-log-service: unrecognized service [root@server ~]# sudo service bahmni-event-log-service status bahmni-event-log-service: unrecognized service

Now when i try to access the website it shows some location error…

128.199.90.180/home

Please look at it…

Hi Mayank, The OpenMRS is not running. The commands doesn’t show “service openmrs start” here. Can you try starting it? You can access openmrs here → https://128.199.90.180/openmrs

I have restarted the droplet and started the services till 503 on openmrs… :frowning:

Last login: Mon Jan 25 06:46:52 2016 from 59.177.103.4 [root@server ~]# sudo service --status-all acpid (pid 1124) is running… auditd (pid 1035) is running… Service bahmni-erp-connect is not running Service bahmni-lab is running with pid: 1167 Service bahmni-reports is not running htcacheclean is stopped httpd (pid 1535) is running… Table: filter Chain INPUT (policy ACCEPT) num target prot opt source destination

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

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

Table: filter Chain INPUT (policy ACCEPT) num target prot opt source destination

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

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

iscsi is stopped iscsid is stopped Checking jexec statuslvmetad is stopped dmeventd is stopped mdmonitor is stopped messagebus (pid 1086) is running… multipathd is stopped mysqld dead but subsys locked netconsole module not loaded Configured devices: lo eth0 eth1 Currently active devices: lo eth0 eth1 openerp-server is running… Service openmrs is not running postgresql-9.2 (pid 1504) is running… rdisc is stopped rsyslogd (pid 1057) is running… sandbox is stopped saslauthd is stopped openssh-daemon (pid 1148) is running… [root@server ~]# sudo service mysqld start Starting mysqld: [ OK ] [root@server ~]# sudo service postgresql-9.2 start Starting postgresql-9.2 service: [ OK ] [root@server ~]# sudo service openmrs start Starting openmrs [root@server ~]# sudo service httpd start Starting httpd: [root@server ~]#

The problem is solved and i appreseated the kind of help i get with bahmni devlopers…

As the wiki has been updated by @gsluthra @bharatak Now one can easily install and test it on digitalocean VPS.

Link: updated the documentation on wiki. https://bahmni.atlassian.net/wiki/display/BAH/Install+Bahmni+on+CentOS

All other problems are because of low memory. So I suggest to use at least 4GB Ram with 4-8 GB of swap to test bahmni.

Thanks.

Hello. Just checking quickly, so ultimately the issue was due to low memory? Because currently I am testing an install on virtual box (without using vagrant to familiarise myself with the installation steps) and I am getting a similar error.

“Unable to fetch locations” error on the home page, 503 service unavailable error on openELIS, and SSL error for openERP.

I allocated 3GB RAM on the virtual box.

-Daniel Ng-

Oh, I think I get what you mean. I left it for about an hour and suddenly it is up and running.

Only issue now is openERP, with the SSL error. Otherwise, it works perfectly fine. :slight_smile:

Thank you!

-Daniel Ng-