Table of Contents |
---|
Tomcat 5.5 or later is required! Perhaps you are Tomcat6 is recommended. Are you using an older version of Tomcat?
...
The first thing to do when troubleshooting tomcat is to check the tomcat logs. They are found at C:\Program Files\Apache Software Foundation\Tomcat 6.0\logs - look for the one named stdout_yyyymmdd.txt where yyyymmdd is today's date. If this log is too long and you can't find the relevant part, you can stop the tomcat service (in Windows using control panel, administrative tools, services), rename the file to stdout_yyyymmdd_old.txt, restart tomcat and it will start writing a new log at stdout_yyyymmdd.txt.
Sluggish performance
Confirm that you have installed tomcat from the tomcat.apache.org website. The apt-get install of Ubuntu tomcat6 has terrible performance consequences.
Running Tomcat as a Service on Ubuntu
If you're trying to run Tomcat as a serving on Ubuntu, you will likely run into permission issues. The easiest way to solve this issue is to disable the Java security manager in /etc/init.d/tomcat5tomcat6.5.
Error:
Code Block |
---|
java.security.AccessControlException: access denied (java.io.FilePermission /varusr/libshare/tomcat5.5tomcat6/webapps/openmrs/WEB-INF/dwr-modules.xml delete) |
...
Code Block |
---|
# Use the Java security manager? (yes/no) TOMCAT5TOMCAT6_SECURITY=no |
Error: prunsrv.c Failed creating ... jvm.dll
...
- Search for msvcr71.dll on your hard drive
- Copy this file to C:\Windows\System32
Tomcat hangs and stops responding when uploading the war file
When uploading the war file, Tomcat hangs and stops responding. This typically occurs if you have not defined a MySQL user account that OpenMRS can use to access the database or if you have not granted this user full access to the OpenMRS database.
The default username is test with password test. The default username/password can be overridden in the openmrs_runtime_properties.properties configuration file.
To fix this: use Navicat or the MySQL administration tool (available from MySQL) to verify that you have a user with username test and password test and this user has full access to the OpenMRS database.
Tomcat error when uploading war file - FileUploadBase$SizeLimitExceededException
When uploading the war file, you can get the following error message with Tomcat's default settings.
Code Block |
---|
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (54624465) exceeds the configured maximum (52428800)
|
To fix this: Go to the web.xml of the manager application (for instance it could be under /tomcat7/webapps/manager/WEB-INF/web.xml).
Increase the max-file-size and max-request-size:
Code Block |
---|
<multipart-config>
<!– 50MB max –>
<max-file-size>52428800</max-file-size>
<max-request-size>52428800</max-request-size>
<file-size-threshold>0</file-size-threshold>
</multipart-config>
|
Cannot connect to Tomcat on port 8080
This port is sometimes used by other programs, such as Popfile and TivoServer. You can use the Windows "netstat -ao" command to discover if another process is using port 8080. Also, a case was found where
In one case, software for a HP Laserjet 2840 printer was trying to use port 8005, which conflicts with Tomcat startup.
...
This error will appear after Tomcat has exhausted all of its memory. This is typically caused by using the "Update" or "Reload" function on a webapp too many times. Currently, Tomcat and/or the JVM isn't releasing all of the memory when a webapp is destroyed/recreated. After several reloads Tomcat is out of its allotted memory and will hang or freeze. Read more at ?Out Of Troubleshooting Memory Errors.
Can't deploy applications
...
Now restart the service with
Panel |
---|
service tomcat tomcat6 start |
Log back into the Tomcat web interface and deploy your application.
...
First, make sure all Tomcat applications require HTTPS to operate. Find the $TOMCAT_HOME/conf/web.xml file. At the bottom of the file, immediately before make sure the following is uncommented (or added).
Code Block |
---|
<!-- == Force all applications to use SSL == -->
<security-constraint>
<web-resource-collection>
<web-resource-name>All applications</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<description>Redirect all requests to HTTPS</description>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
</web-app>
|
...
To turn off session persistence, Go to tomcathome/conf/server.xml and uncomment the "<Manager pathname="" />" line
ElException in parsing some JSP pages (Updated tomcat 7 and may be other servlet containers that conform to EL Spec 2.2)
In the latest version of EL Spec v2.2, Java identifiers and reserved keywords cannot be used in EL expression. In OpenMRS we have some parts in JSP that do not conform to this new spec. To workaround this problem, you can add "-Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=true" to CATALINA_OPTS environment variable - See discussion: Identifier creation doesn't work in trunk
Troubleshooting Installation
For more troubleshooting tips see Troubleshooting Installation.