Question: I am trying to run a server for our implementation i.e, UgandaEMR, however, I cant start any servers as they reach a point and hung and that at initializing EhCacheManager. I have tried creating different servers for different distributions including uninstalling the OpenMRS SDK but I still get back to the same issue, any ideas on how to solve this? The server logs can be found here https://gist.github.com/solemabrothers/e4c40281b07933d9937d263463460ef8
Hi @solemabrothers, somewhat annoying that
Initializing EhCache CacheManager takes quite longer to finish. Usually this eventually finishes. For how long did you wait? Also it’d be helpful to clarify on the distribution’s artefacts like the openmrs-core and modules. Maybe this could also be affected by the machine environments, i.e windows/linux/mac etc.
@solemabrothers can you add your Java and SDK versions to help troubleshoot
I am running Java “1.8.0_221” and OpenMRS SDK 3.13.4
So the way I’ve commonly caused this error is with some kind of Spring misconfiguration in a module I’m attempting to load. Despite the last message being about the
EhCacheManager that’s quite unlikely to the the problem. The thing that’s happening in the background is that Spring is reloading the main context, though it’s hard to track its progress via logging.
The easiest to track what might be happening is to start from a known quantity. E.g., if you create an SDK version of Platform 2.3 then run that to see if it starts up correctly. Then one-by-one start adding in modules required by UgandaEMR until you hit the issue. It’s probably safe to assume that any modules included in released versions of the RefApp are unlikely to have this issue.
Alternatively, you can turn the logging for the Spring context up. The way to do this is to connect to your SDK server’s MySQL instance and run something like this:
UPDATE global_property SET property_value = 'org.openmrs.api:info, org.springframework.context:debug' WHERE property = 'log.level';
Then restart the failing service and see if there’s any more useful information in the logs.
I work with @solemabrothers and suddenly I am seeing the same error, we have Reference Application 2.10.0-SNAPSHOT, Provider Management 2.10.0 and platform 2.3.0
Looks like its a conflict between the OpenMRS platform provider class and that seen within the Provider Management module
I am seeing the following error in the logs
DEBUG - OpenmrsClassLoader.expandURL(764) |2020-04-14 16:21:08,586| absolute path: /Users/ssmusoke/openmrs/ugandaemrpoc/.openmrs-lib-cache/patientqueueing/org/openmrs/module/metadatasharing/web/view/SerializeView.class INFO - OpenmrsMetadataHandler.(67) |2020-04-14 16:21:08,588| org.openmrs.Provider and org.openmrs.module.providermanagement.Provider have the same simple name. Trying to resolve the confict… INFO - OpenmrsMetadataHandler.(77) |2020-04-14 16:21:08,589| org.openmrs.module.providermanagement.Provider added as Provider.providermanagement
Try the snapshot version of the providermanagement module: https://github.com/openmrs/openmrs-module-providermanagement
@dkayiwa That does not help - still hangs at that error
@ssmusoke that was not meant to fix the hanging problem. But rather the warning message that you shared.
@dkayiwa got you now I am as far as
DEBUG - OpenmrsClassLoader.expandURL(764) |2020-04-14 21:36:47,513| absolute path: /Users/ssmusoke/openmrs/ugandaemrpoc/.openmrs-lib-cache/emrapi/org/openmrs/module/emrapi/conditionslist/EmrConditionValidator.class DEBUG - ModuleUtil.expandJar(581) |2020-04-14 21:36:47,513| Creating parent dirs: /Users/ssmusoke/openmrs/ugandaemrpoc/.openmrs-lib-cache/emrapi/org/openmrs/module/emrapi/conditionslist DEBUG - ModuleUtil.expand(628) |2020-04-14 21:36:47,513| expanding: org/openmrs/module/emrapi/conditionslist/EmrConditionValidator.class
Hard to tell what is going on without the full log.
@dkayiwa That is where I hang in the ehCache Manager status as the log is in full debug mode as I have setup org.openmrs in DEBUG
- Create a new server
mvn openmrs-sdk:setup -Ddistro=org.openmrs.module:ugandaemrpoc:1.0.2-SNAPSHOT
- Run this script on the newly created database for the server https://sourceforge.net/projects/ugandaemr/files/1.0.13/concept_dictonary_ref_1.0.13.sql/download
- Run the server
mvn openmrs-sdk:runand select the newly created server
Just did those steps and am at the login screen.
@dkayiwa as a sanity check what versions of aijar, referenceapplication and provider management modules do you have?
FWIW, i copied those from the instance i set up using your instructions, logged in and then went to this page: http://localhost:8080/openmrs/admin/maintenance/systemInfo.htm
@dkayiwa am having some error logs here https://pastebin.com/QAgCgJJ0 and the endpoint that I cant seem to go past…My story is slightly different coz I can build the server up well but get stuck when i stop and restart the server. Am building with an additional module of METS/ISS-distro on top of what has been shared.
What are the exact steps of reproducing your problem? @reagan
@dkayiwa those are not accurate since the version of ugandaemrpoc should be 1.0.2-SNAPSHOT as per the SDK server call
I simply did your exact commands and nothing more. FWIW, the name of the module file in the modules folder is