Announcing Bahmni 0.92 Release Candidate

@angshuonline installing 0.92-142 0n Aws. Got this error “Unable to start service openmrs: Job for openmrs.service failed because a configured resource limit was exceeded.” Server configuration is

Filesystem

/dev/xvda1 Size 30G Used 9.9G Avail 21G Use% 34% Mounted on /

devtmpfs Size 473M Used 0 Avail 473M Use% 0% Mounted on /dev

tmpfs Size 495M Used 4.0K Avail 495M Use% 1% Mounted on /dev/shm

tmpfs Size 495M Used 20M Avail 476M Use% 4% Mounted on /run

tmpfs Size 495M Used 0 Avail 495M Use% 0% Mounted on /sys/fs/cgroup

tmpfs Size 99M Used 0 Avail 99M Use% 0% Mounted on /run/user/1001

tmpfs Size 99M Used 0 Avail 99M Use% 0% Mounted on /run/user/1000

We also faced the same issue in our new implementation. Could you please attach openmrs.log file so that we could study and suggest.

1 Like

Please find the attached openmrs.log herewith for your reference.openmrs.log.txt (16.1 KB)

@akshaybirajdar from your log, it seems that mysql connection is erroring out.
Can you check?

  • if mysqld is running

systemctl status mysqld

  • try logging onto mysql

mysql -uroot -p openmrs

the above would prompt you for password - try with your admin password (check wiki for default, if you have not overridden the mysql root password)

If successful, then try connecting as the user

mysql -uopenmrs-user -p openmrs

You will find the password in /etc/openmrs/openmrs-runtime.properties file.

Have you also tried restarting openmrs?

@laxman Was bahmni-emr installed? Have you checked the details of the install log? You can see that in /bahmni_temp/logs/bahmni_deploy.log

  • have you tried starting the openmrs service specifically?
  • try installing one component at a time - modify your inventory file, and only install bahmni-emr, and bahmni-reports to start with.
  • if the above is successful, then you can go back to the inventory file and add the rest of the components (like bahmni-lab, bahmni-erp etc). You can then selectively install one component at a time.

bahmni -i local --only bahmni-emr

bahmni -i local --only bahmni-reports

bahmni -i local --only bahmni-lab

(of course you can do this even at the first step process)

Openmrs service is running, mysqld also running. I can successfully login in mysql using database openmrs.

try with user “openmrs-user”. If yes, then stop openmrs and mysqld. start mysqld first and then start openmrs

Odoo is running, but the openmrs showing :This site cant be reached refused to connect". Openmrs service is running. Please find the attached openmrs.log herewith. Port 443 is defined in inbound security group on AWS. openmrs.log.txt (3.8 MB)

If might be an issue with port forwarding! not sure - I wouldn’t know about your specific group settings on AWS. The log says potentially some modules might not have been loaded. But the message “site can not be reached, refused to connect” etc - can be even due to inaccessibility to the service.

to check whether the service is actually, go to the server and check

curl http://localhost:8050/openmrs/

if it throws up a login page (html content), then you know that the server is up, its probably not forward the requests to openmrs service correctly.

Also check if any of the apache resources can be loaded.

https://your-server/bahmni_config/openmrs/apps/home/app.json

If that does not return you anything, then apache is not working properly.

The curl command shows a html page, but second command throws a blank web page showing “Refused to connect.” What is the solution for Apache not working properly?

  • the second URL you should execute from your browser (not from the server hosting bahmni). replace (your-server with IP or hostname)

I hope you have done the above.

Also , how is Odoo accessible? unless you are bypassing apache and exposing Odoo directly.

When I access from my local machine not from server, https://Server-IP/openmrs Shows Refused to connect and http://Server-IP:8069 shows Odoo login page and https://my-server-IP/ also shows Refused to connect.

  1. check if apache is running on server

systemctl status httpd

  1. if apache is running, then you are not mapping your ports from the gateway to the hosted instance ports. Check aws ec2 console.

The Security group for the instance is same as the other instances,The problem occurs when the Bahmni installation failed showing “Unable to start service openmrs: Job for openmrs.service failed because a configured resource limit was exceeded.” Please find the attached bahmni-installer.log herewith.bahmni-installer.log.txt (3.8 MB)

@akshaybirajdar,

My problem of " “Unable to start service openmrs:…" is solved now

But i am not sure about the solution if it works on your side, I checked systemctl status openmrs.service

returned no openmrs.pid file or refused to create pid file

So I created openmrs.pid in path var/run/openmrs and restarted openmrs.

Also I re-started machine, restarted bahmni, so actually I am not sure this step actually solved my problem.

Cc: @angshuonline

There was no openmrs.pid file in var/run/openmrs so I created openmrs.pid then restarted openmrs. When I changed owner of openmrs.pid, then restarted openmrs, the owner of openmrs.pid changed automatically to bahmni. openmrs.service - LSB: start and stop openmrs system, Loaded: loaded (/etc/rc.d/init.d/openmrs; bad; vendor preset: disabled) Active: failed (Result: resources) since Mon 2019-09-30 14:29:47 IST; 16min ago Docs: man:systemd-sysv-generator(8) Process: 8954 ExecStart=/etc/rc.d/init.d/openmrs start (code=exited, status=0/SUCCESS)

Sep 30 14:29:47 ip-172-31-8-84.ap-south-1.compute.internal systemd[1]: Starting LSB: start and stop openmrs system,…

Sep 30 14:29:47 ip-172-31-8-84.ap-south-1.compute.internal openmrs[8954]: Service openmrs is already running (pid: 5938)

Sep 30 14:29:47 ip-172-31-8-84.ap-south-1.compute.internal systemd[1]: New main PID 5938 does not belong to service, and PID file is not owned by root. Refusing.

Sep 30 14:29:47 ip-172-31-8-84.ap-south-1.compute.internal systemd[1]: New main PID 5938 does not belong to service, and PID file is not owned by root. Refusing. Sep 30 14:29:47 ip-172-31-8-84.ap-south-1.compute.internal systemd[1]: Failed to start LSB: start and stop openmrs system,.

Sep 30 14:29:47 ip-172-31-8-84.ap-south-1.compute.internal systemd[1]: Unit openmrs.service entered failed state.

Sep 30 14:29:47 ip-172-31-8-84.ap-south-1.compute.internal systemd[1]: openmrs.service failed.

I have same logs but now I can browse bahmni. Can you recheck after restarting ?

Odoo is unable to start after server unexpected power outage, i tried letting Odoo start at boot with the command chkconfig odoo on but this does not work when server unexpectedly shutdown- odoo won’t start unless started manually. Any solution to this?

Hello @angshuonline, I have been trying for over 2 weeks now to install Bahmni 0.92 on Centos7 but it’s failing. Initially I had a custom inventory file because I am installing all DBs on a separate server. When I ran command bahmni -i inventory install, nothing gets installed except MySQL on the remote server.

I then tried installing everything on the localhost with bahmni -i local install, but I got this error message

TASK [mysql : Update mysql root password] *************************************************************************************************************************
task path: /opt/bahmni-installer/bahmni-playbooks/roles/mysql/tasks/main.yml:60
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "mysql -e \"UPDATE mysql.user SET authentication_string=PASSWORD('**********') WHERE User='root'; FLUSH PRIVILEGES;\" -u root -i -p'**********'", "delta": "0:00:00.009389", "end": "2019-10-15 11:01:54.306947", "msg": "non-zero return code", "rc": 1, "start": "2019-10-15 11:01:54.297558", "stderr": "mysql: [Warning] Using a password on the command line interface can be insecure.\nERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)", "stderr_lines": ["mysql: [Warning] Using a password on the command line interface can be insecure.", "ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)"], "stdout": "", "stdout_lines": []}
        to retry, use: --limit @/opt/bahmni-installer/bahmni-playbooks/all.retry

PLAY RECAP ********************************************************************************************************************************************************
localhost                  : ok=65   changed=22   unreachable=0    failed=1

Hi @tapologo I have just replied on the other thread. It seems you have some invalid characters in your inventory file! (so suggests the log)

Couple of things

  1. Try running the installer command with -vv option. That will provide you with more information (more number of v, means more debug info)

bahmni -i local install -vvvv

  1. also check the install logs, which is available at the control machine (where you triggered installation from).

/bahmni_temp/logs/bahmni_deploy.log

Also, regarding inventory file, you can find more explanation about inventory files and ansible specific information here