Java heap space errors when starting a new installation

We have an OpenMRS implementation that is running on our server. I am trying to create an exact replica on Ubuntu Server running on VirtualBox on my laptop. The point would be to test upgrades and new modules on this test server before rolling them out to production.

Here are the steps I took: 1.Installed Ubuntu 14.0.2 server 64 but 2. Installed mySQL, JRE 6, Tomcat 7, 3. Created new DB and imported the SQL data from the production server 4. Created directory .OpenMRS and did chown command 5. Changed tomcat memory settings to recommended 1024M 6. Deployed WAR file from tomcat manager 7. Installed OpenMRS

At this point, everything was working, and I was able to see the login screen for OpenMRS

  1. Stopped OMRS from Tomcat manager
  2. Copied modules from production server to /usr/share/tomcat7/.OpenMRS/modules

Now, when I restart Tomcat from CLI, the server says it is started. But on accessing the webpage, the browser just spins and fails to load. It will not load IP:8080/manager or IP:8080/openmrs.

Any help is appreciated!

Can you paste the contents of the tomcat log at pastebin.com?

I attached the file here:catalina.out.txt (243.3 KB)

In your log, i see something like:

Caused by: java.lang.OutOfMemoryError: Java heap space

Can you try increase your memory, then restart tomcat and try again?

I also got this

Found the answer here:

https://wiki.openmrs.org/questions/66814449/why-does-openmrs-2.0-hang-at-startup-with-event-module

I needed:

chown tomcat7 /var/lib/tomcat7

Now, all is well.

1 Like