# Servers Hung at Initializing EhCache CacheManager

**URL:** <https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953>\
**Category:** Ask OpenMRS\
**Tags:** getting-started\
**Created:** [April 14, 2020, 6:44am UTC](https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953 "2020-04-14T06:44:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![solemabrothers](https://talk.openmrs.org/letter_avatar/solemabrothers/32/5_5575768a8748004e209b776fc1b2916d.png) [@solemabrothers](https://talk.openmrs.org/u/solemabrothers)\
**Post date:** [April 14, 2020, 6:44am UTC](https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953/1 "2020-04-14T06:44:03Z")

</div>

**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](https://gist.github.com/solemabrothers/e4c40281b07933d9937d263463460ef8)

---

<div class="post-metadata">

**Author:** ![ruhanga](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ruhanga/32/8318_2.png) [@ruhanga](https://talk.openmrs.org/u/ruhanga)\
**Post date:** [April 14, 2020, 7:18am UTC](https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953/2 "2020-04-14T07:18:01Z")

</div>

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.

Also [here](https://talk.openmrs.org/search?q=initializing%20EhCacheManager) are a couple of [similar experiences](https://talk.openmrs.org/search?q=initializing%20EhCacheManager) that could help solve this.

---

<div class="post-metadata">

**Author:** ![ssmusoke](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ssmusoke/32/8020_2.png) [@ssmusoke](https://talk.openmrs.org/u/ssmusoke)\
**Post date:** [April 14, 2020, 7:36am UTC](https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953/3 "2020-04-14T07:36:11Z")

</div>

@solemabrothers can you add your Java and SDK versions to help troubleshoot

---

<div class="post-metadata">

**Author:** ![solemabrothers](https://talk.openmrs.org/letter_avatar/solemabrothers/32/5_5575768a8748004e209b776fc1b2916d.png) [@solemabrothers](https://talk.openmrs.org/u/solemabrothers)\
**Post date:** [April 14, 2020, 7:40am UTC](https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953/4 "2020-04-14T07:40:04Z")

</div>

I am running Java “1.8.0\_221” and OpenMRS SDK 3.13.4

---

<div class="post-metadata">

**Author:** ![ibacher](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ibacher/32/19751_2.png) [@ibacher](https://talk.openmrs.org/u/ibacher)\
**Post date:** [April 14, 2020, 1:20pm UTC](https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953/5 "2020-04-14T13:20:36Z")

</div>

> [@solemabrothers](#):
>
> 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?

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:

```sql
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.

---

<div class="post-metadata">

**Author:** ![ssmusoke](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ssmusoke/32/8020_2.png) [@ssmusoke](https://talk.openmrs.org/u/ssmusoke)\
**Post date:** [April 14, 2020, 1:29pm UTC](https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953/6 "2020-04-14T13:29:52Z")

</div>

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

@dkayiwa @mogoodrich any ideas to help here

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [April 14, 2020, 2:29pm UTC](https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953/7 "2020-04-14T14:29:55Z")

</div>

Try the snapshot version of the providermanagement module: [https://github.com/openmrs/openmrs-module-providermanagement](https://github.com/openmrs/openmrs-module-providermanagement)

---

<div class="post-metadata">

**Author:** ![ssmusoke](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ssmusoke/32/8020_2.png) [@ssmusoke](https://talk.openmrs.org/u/ssmusoke)\
**Post date:** [April 14, 2020, 6:11pm UTC](https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953/8 "2020-04-14T18:11:12Z")

</div>

@dkayiwa That does not help - still hangs at that error

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [April 14, 2020, 6:30pm UTC](https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953/9 "2020-04-14T18:30:47Z")

</div>

@ssmusoke that was not meant to fix the hanging problem. But rather the warning message that you shared.

---

<div class="post-metadata">

**Author:** ![ssmusoke](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ssmusoke/32/8020_2.png) [@ssmusoke](https://talk.openmrs.org/u/ssmusoke)\
**Post date:** [April 14, 2020, 6:58pm UTC](https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953/10 "2020-04-14T18:58:33Z")

</div>

@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
```

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [April 14, 2020, 7:32pm UTC](https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953/11 "2020-04-14T19:32:35Z")

</div>

Hard to tell what is going on without the full log.

---

<div class="post-metadata">

**Author:** ![ssmusoke](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ssmusoke/32/8020_2.png) [@ssmusoke](https://talk.openmrs.org/u/ssmusoke)\
**Post date:** [April 15, 2020, 7:37am UTC](https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953/12 "2020-04-15T07:37:03Z")

</div>

@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

---

<div class="post-metadata">

**Author:** ![ssmusoke](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ssmusoke/32/8020_2.png) [@ssmusoke](https://talk.openmrs.org/u/ssmusoke)\
**Post date:** [April 15, 2020, 9:04am UTC](https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953/13 "2020-04-15T09:04:50Z")

</div>

@dkayiwa

1. Create a new server `mvn openmrs-sdk:setup -Ddistro=org.openmrs.module:ugandaemrpoc:1.0.2-SNAPSHOT`
2. 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](https://sourceforge.net/projects/ugandaemr/files/1.0.13/concept_dictonary_ref_1.0.13.sql/download)
3. Run the server `mvn openmrs-sdk:run` and select the newly created server

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [April 15, 2020, 10:09am UTC](https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953/14 "2020-04-15T10:09:21Z")

</div>

Just did those steps and am at the login screen.

---

<div class="post-metadata">

**Author:** ![ssmusoke](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ssmusoke/32/8020_2.png) [@ssmusoke](https://talk.openmrs.org/u/ssmusoke)\
**Post date:** [April 15, 2020, 1:16pm UTC](https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953/15 "2020-04-15T13:16:06Z")

</div>

@dkayiwa as a sanity check what versions of aijar, referenceapplication and provider management modules do you have?

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [April 15, 2020, 1:49pm UTC](https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953/16 "2020-04-15T13:49:28Z")

</div>

[https://pastebin.com/kGuaFu0t](https://pastebin.com/kGuaFu0t)

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](http://localhost:8080/openmrs/admin/maintenance/systemInfo.htm)

---

<div class="post-metadata">

**Author:** ![reagan](https://talk.openmrs.org/user_avatar/talk.openmrs.org/reagan/32/10652_2.png) [@reagan](https://talk.openmrs.org/u/reagan)\
**Post date:** [April 15, 2020, 2:02pm UTC](https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953/17 "2020-04-15T14:02:17Z")

</div>

@dkayiwa am having some error logs here [https://pastebin.com/QAgCgJJ0](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.

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [April 15, 2020, 2:23pm UTC](https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953/18 "2020-04-15T14:23:49Z")

</div>

What are the exact steps of reproducing your problem? @reagan

---

<div class="post-metadata">

**Author:** ![ssmusoke](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ssmusoke/32/8020_2.png) [@ssmusoke](https://talk.openmrs.org/u/ssmusoke)\
**Post date:** [April 15, 2020, 2:55pm UTC](https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953/19 "2020-04-15T14:55:49Z")

</div>

> [@dkayiwa](#):
>
> 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](http://localhost:8080/openmrs/admin/maintenance/systemInfo.htm)

@dkayiwa those are not accurate since the version of ugandaemrpoc should be 1.0.2-SNAPSHOT as per the SDK server call

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [April 15, 2020, 3:08pm UTC](https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953/20 "2020-04-15T15:08:45Z")

</div>

I simply did your exact commands and nothing more. FWIW, the name of the module file in the modules folder is `ugandaemrpoc-1.0.2-SNAPSHOT`

[Next page](https://talk.openmrs.org/t/servers-hung-at-initializing-ehcache-cachemanager/27953.md?page=2)
