Resolution for unable to start Openmrs service error message after 0.92 Patch release

Hello all

We are noticing that there has been multiple reports of Openmrs service not starting up after the upgrade to first patch of 0.92 (0.92-147) released in Feb, 2020. The error is seen when the user used “service openmrs start” instead of “systemctl start openmrs”. The recommendation from 0.92 patch release onwards is to strictly use Systemctl command instead of service command to start/stop Bahmni services. The resolution below applies to both 0.92-147 as well as 0.92-155 patch releases.

The major change that was incorporated in the patch release was the move to Systemd service files. We have identified the following sequence of steps as a workaround to restart openmrs in case service command was used:

  1. mv /opt/openmrs/log /opt/openmrs/log-backup
  2. rm /var/log/openmrs (without ‘/’ at the end, we want to remove only the symlink)
  3. rm /var/run/openmrs (without ‘/’ at the end, we want to remove only the symlink)
  4. mkdir /opt/openmrs/log
  5. chown bahmni:bahmni /opt/openmrs/log
  6. ln -s /opt/openmrs/log /var/log/openmrs
  7. chown -R bahmni:bahmni /var/log/openmrs

To prevent use of service command (out of habit) to restart openmrs we have provided an optional suggestion in the release notes of 0.92 Patch released in June 2020.



1 Like