No (I think) because I have not yet configured mySQL on the new instance, but it seems to get past being upset about the profile file and no more errors are logged in catalina.out
In the browser I see:
**The following error occurred at startup:**
Unable to get a connection to the database. Please check your openmrs runtime properties file and make sure you have the correct connection.username and connection.password set
java.lang.Exception: Unable to get a connection to the database. Please check your openmrs runtime properties file and make sure you have the correct connection.username and connection.password set at org.openmrs.util.DatabaseUpdater.getLiquibase(DatabaseUpdater.java:398) at org.openmrs.util.DatabaseUpdater.getLiquibase(DatabaseUpdater.java:378)
Hey is this profile file OK? I gabbed it out of the wiki.
# OpenMRS Runtime Properties file
#
# (comments starting with a pound sign "#" are ignored)
### Database connection properties
connection.username=test
connection.password=test
connection.url=jdbc:mysql://localhost:3306/openmrs?autoReconnect=true
## If set to true, allows automatic database updates
#auto_update_database=true
# Allow/Disallow uploading of a module via the web
module.allow_web_admin=false
# If set to true, all patients will be names will be displayed as below
obscure_patients=false
obscure_patients.given_name=John
obscure_patients.middle_name=P.
obscure_patients.family_name=Smith
### Debugging options
hibernate.show_sql=false
### Customization Options
## If the custom setting is a folder, only files contained in the customization will be overwritten
#custom.images.dir=/myfolder/custom/images
#custom.template.dir=/myfolder/custom/template
#custom.style.css.file=/myfolder/custom/style.css
#custom.index.jsp.file=/myfolder/custom/index.jsp
#custom.login.jsp.file=/WEB-INF/view/login.jsp
#custom.messages=/myfolder/custom/messages.properties
#custom.messages_fr=/myfolder/custom/messages_fr.properties
#custom.patientDashboardForm.jsp.file=/WEB-INF/view/patientDashboardForm.jsp
### Other
## Set the directory that OpenMRS uses for its application data
## Will be used as base dir for modules, generated reports, etc
## Defaults to C:/Docs&Settings/username/Application Data/OpenMRS for windows
## Defaults to ~/.OpenMRS for *nix
## (As of build 1.2.0.3426)
# application_data_directory=/opt/openmrs
## Displays optional extra data in the Legacy UI admin screens footer,
## alongside OpenMRS version... etc.
## (As of Legacy UI module 1.7.0)
#legacyui.footer.extradata=Docker Image 45f156d
### Encryption Settings
## WARNING! Changing these values will cause all encrypted data to be invalidated!
## Randomly set upon fresh installation but not during upgrade process.
## OpenMRS built-in defaults are:
#encryption.vector=9wyBUNglFCRVSUhMfsTa3Q==
#encryption.key=dTfyELRrAICGDwzjHDjuhw==
# These properties are deprecated as of 1.7.0
#scheduler.username=admin
#scheduler.password=test~~~~
In the setup wizard, the first screen should be about selecting a language. The second screen is where you choose the setup type. Go for the first option which will only ask you for the mysql root password. The rest will be next, next ā¦
@dkayiwa@carty, how did you folks resolve this , I am getting a similar 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
"
Unbutu 20.04
tomcat9 ( username tomcat)
OpenMRS reference application 2.10
mysql server 8.0.21
I cant get past the initialsetup screen due to the above message, permissions on all directories /usr/share/tomcat9 /var/lib/tomcat9 are all tomcat : tomcat
In my Debian install which I suspect is similar to your Ubuntu OpenMRS tried to create the profile file at /var/lib/OpenMRS/openmrs-runtime.properties which failed like yours, then in the log file I could see it trying to fall back to /home/tomcat/openmrs-runtime.properties.
I tried creating a user tomcat writable directory /var/lib/OpenMRS/ prior to running the install, that did not work. I created a tomcat writable directory in /home and that did work, profile file created is /home/tomcat/openmrs-runtime.properties.
This bug is super disruptive to linux installs, I would love to someday fix it, with the time I have available I am trying to learn enough about the implementation to be qualified to do so.
I am fairly certain the āRead-only file systemā message is relevant, /var/lib is not a typical place top write āuserā stuff. /home/tomcat should work but I suspect no one tries to create the directory if itās not there.
So I bumped into this exact issue today on an Ubuntu 20.10 install. I tried all of the suggestions above (and quite a few others!) to no avail. In my install, the openmrs.war is in /var/lib/tomcat9/webapps run by a tomcat user (whose home directory is /opt/tomcat but that doesnāt matter for this).
That did the trick and allowed the OpenMRS installer to create:
/var/lib/tomcat9/appdata/
where the new openmrs-runtime.properties file, modules directory, etc were created via the install process.