Hey team, I continue to learn a ton. I have defined as an exercise getting OpenMRS running on a default Debian instance at GCP, it seems like it might be a useful specific unix config for us (me) to test on prior to release.
Default Debian is 10 (Buster) for which default java is 11, @dkayiwa was cool enough to clue me into:
so I grabbed the .war from the 5/17 build which tomcat loads, but I cannot get past the install wizard trying to create the profile file, I get the message:
**Error!**
A runtime properties file is needed for OpenMRS to start up consistently.
OpenMRS is unable to create this file : /var/lib/tomcat9/openmrs-standalone-runtime.properties
Because of this error : Read-only file system
[2020-05-19 16:19:04] [info] WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2078) |2020-05-19 16:19:04,803| Unable to find a runtime properties file at /var/lib/tomcat9/openmrs-standalone-runtime.properties
[2020-05-19 16:19:04] [info] WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2106) |2020-05-19 16:19:04,803| Unable to find properties file: /var/lib/OpenMRS/openmrs-standalone/openmrs-standalone-runtime.properties
but then I get stuck. I made sure /var/lib/tomcat9/ was owned by ātomcat9ā and writable.
I created /var/lib/OpenMRS/openmrs-standalone/ owned by ātomcat9ā and writable.
I tried putting profile files in both places, always the same message.
I did not yet mess around with defining env variable {WEBAPP NAME}_RUNTIME_PROPERTIES_FILE because I figured that added even more complexity but I will if itās helpful.
I get that waking up on a random linux platform, running as different users, and finding a consistent place to write files is tough, Iād like to debug further and update the wiki, any suggestions or help appreciated.
you can see tomcat starting and trying to load the profile then me running the install wizard and it tries again.
If I drop a profile file in /var/lib/tomcat9 it still does not pick it up, but when I restart tomcat then it seems to see it because I proceed to get a mysql error which I have not yet set up and catalina.out is clean.
I believe it looks like the wizard didnāt run because the wizard never completes, there are I think two relevant sections in the log.
I started with a clean log, started up tomcat which loaded openmrs-standalone, starting here:
[2020-05-19 19:43:32] [info] WARN - OpenmrsUtil.getApplicationDataDirectory(1044) |2020-05-19 19:43:32,092| Unable to write to users home dir, fallback to: /var/lib
then there are a bunch of messages about not being able to find the profile file in various locations:
[2020-05-19 19:43:32] [info] WARN - OpenmrsUtil.getRuntimeProperties(2039) |2020-05-19 19:43:32,502| Unable to find a runtime properties file. Initial setup is needed. View the webapp to run the setup wizard.
so yeah no wizard had been run yet, but then at 19:48 I run the wizard from a browser, openmrs-standalone canāt find or create the profile:
In the log:
[2020-05-19 19:48:26] [info] WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2078) |2020-05-19 19:48:26,004| Unable to find a runtime properties file at /var/lib/tomcat9/openmrs-standalone-runtime.properties
[2020-05-19 19:48:26] [info] WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2106) |2020-05-19 19:48:26,007| Unable to find properties file: /var/lib/OpenMRS/openmrs-standalone/openmrs-standalone-runtime.properties
In the UI:
Error!
A runtime properties file is needed for OpenMRS to start up consistently.
OpenMRS is unable to create this file : /var/lib/OpenMRS/openmrs-standalone/openmrs-standalone-runtime.properties
Because of this error : Read-only file system
I donāt think so Daniel, I can write to the directories fine. Itās not a showstopper for me if I can provide the profile file. We should figure out whatās going on Iāll continue to investigate.
I havenāt watched enough of the process/culture to know if I should file a bug, should I? I am happy to take direction on test cases I can spend some time on this like I said Iām learning a ton.
It seems like from talk and the wiki users have issues with this. I am not surprised you are so good about not restricting the configs we support we encounter tons of platform idiosyncrasies.
I wanna go learn more about testing release and QA before getting all excited about making suggestions but maybe we should try to corral folks to a reasonable number of configs that we then aspire/commit to test, could be nice all around.
For now, can you use the default war file name as openmrs.war? Then the OpenMRS application data folder would be /var/lib/OpenMRS instead of /var/lib/OpenMRS/openmrs-standalone
Of course it could also be /usr/share/tomcat9/.OpenMRS after this: chown -R tomcat9:tomcat9 /usr/share/tomcat9/.OpenMRS/
"Unable to write to users home dir, fallback to: /var/lib"
then it looks for
/var/lib/OpenMRS/openmrs-runtime.properties
OK so no problem because we have not yet run the wizard, I point a browser at /openmrs, wizard runs
**Error!**
A runtime properties file is needed for OpenMRS to start up consistently.
OpenMRS is unable to create this file : /var/lib/OpenMRS/openmrs-runtime.properties
Because of this error : Read-only file system
I bounced tomcat and tried again, no luck, all in all it looks like the same behavior except (as you suggested) the expected profile file name changed to openmrs-runtime.properties
OK I am going to rebuild the instance to make sure I have a default config, it makes me nervous that I donāt remember where/how that OpenMRS folder got created, brb.
**Error!** A runtime properties file is needed for OpenMRS to start up consistently. OpenMRS is unable to create this file : /var/lib/OpenMRS/openmrs-runtime.properties Because of this error : Read-only file system
You must correct this before continuing.
If I drop a openmrs-properties files into the first dir - /var/lib/tomcat9/ and chown it to tomcat:tomcat, then restart tomcat, openmrs sees it.