Hi Folks.
This is so difficult/complex/time consuming!
Introduction. I’m trying to get a project up and running for a charity and OpenMRS appears to be a good fit for the client database that they require. I’ve spent countless hours/weeks trying to get an operational system and it has become very frustrating. :’( I’ve worked in IT Support/Consultancy for many years, though can’t get my head around the complexity and nuances of Tomcat, java etc.
Background. After many failed attempts, I finally got an installation up and running with the “Reference Application 2.11.0 Standalone Edition”, on a manually installed VPS (I maintain many servers). This only worked once a specific set of software versions was installed, for example Tomcat 7. This has allowed a Proof Of Concept but is not production ready, primarily due to not being able get SSL to run properly. Many more hours wasted. I’ve messed around so much, just to get to this point, that I doubt I could replicate it.
Documentation. Much of the information that I’ve found is geared towards ‘localhost’ i.e. running on a PC sitting at someone’s desk - not really applicable for an enterprise system.
Aims. I’m not interested in SDK, nor docker, nor any other added complications; I’m just looking for a simple deployment of openMRS, with most of the bundled modules available. It needs to run in a secure Linux (not Ubuntu bloat, preferably debian) server environment.
Current position. Rather than starting from scratch, each time I “go down a one-way street to a dead-end”, I’m starting from Turnkey Tomcat v16.1 (Tomcat on Apache | TurnKey GNU/Linux). Basically, debian 10 with Tomcat 9 and useful webmin - with a view that I shouldn’t need to upgrade anytime soon. Additionally, Turnkey provides a simple installation of Let’s Encrypt, that is utilised by Tomcat. Within Tomcat Manager, at the server, I deploy " Platform 2.4.0 WAR", which subsequently is shown as /openmrs . However, when I click on this, I get the dreaded “404 Not Found”.
Does this look correct? (repo, is to save downloading each failed attempt)
Context Path: /openmrs
Version (for parallel deployment):
XML Configuration file path:
WAR or Directory path: /home/staff/repo/openmrs.war
Thanks for any assistance.
Supplementary. A few errors from catalina.out, including some well known ones…
[warning] [SetContextPropertiesRule]{Context} Setting property 'antiJARLocking' to 'true' did not find a matching property.
[info] 2021-08-27 10:54:45,121 main ERROR Unable to create file openmrs.log java.io.IOException: Permission denied
[info] 2021-08-27 10:54:45,135 main ERROR Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@173441c2] unable to create manager for [openmrs.log]
[info] 2021-08-27 10:54:45,145 main ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender
[info] WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2138) |2021-08-27T10:54:45,650| Unable to find a runtime properties file at /var/lib/tomcat9/openmrs-runtime.properties
[info] WARN - OpenmrsUtil.getApplicationDataDirectory(1099) |2021-08-27T10:54:45,750| Unable to write to users home dir, fallback to: /var/lib
[info] WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2166) |2021-08-27T10:54:45,752| Unable to find properties file: /var/lib/OpenMRS/openmrs-runtime.properties
[info] WARN - OpenmrsUtil.getRuntimeProperties(2099) |2021-08-27T10:54:45,754| Unable to find a runtime properties file. Initial setup is needed. View the webapp to run the setup wizard.
Yes, I’ve created /var/lib/OpenMRS, /var/lib/openmrs, /root/OpenMRS, /root/openmrs with tomcat as the owner.
“View the webapp to run the setup wizard” - I would if I could.
I’ve tried adding a few lines in mod_jk.conf:
JkMount /openmrs ajp13_worker
JkMount /openmrs/* ajp13_worker