Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Info

Help is available by sending an email to csf-support@mit.edu
Have any suggestion on how improve this wiki?  Please give us your feedback at csf-support@mit.edu

Quick

Links

to:

{

Panel
Wiki Markup
Table of Contents
:
minLevel
=
3
}
Panel

Anchor
h3.data resource
h3.data resource

How do I add new database Resource Definition (database connection) to Tomcat?

ANSWER:

  • The Install Tomcat 7 instructions gives an example on how to add a new Resouce Definition to Tomcat.
unmigrated-wiki-markup
Panel
h3.

Tomcat

7

manager

fails

when

deploying

a

WAR

file

when

using

the

AJP

connector

When

the

Tomcat

7

manager

tries

to

deploy

a

war

file,

it

fails

with

the

following

error:

{
Code Block
}
Feb 28, 2013 8:20:35 AM org.apache.coyote.ajp.AjpMessage processHeader
SEVERE: Invalid message received with signature 8192
{code}
*

ANSWER:

*


By

default,

the

maximum

packet

size

that

can

be

process

by

the

AJP

connector

is

8192

bytes.

  Do the following to change the default: # Edit the Tomcat *server.xml* file located in the *conf* directory of your Tomcat installation. # Find the *Connector* entry (show below). {code}

  Do the following to change the default:

  1. Edit the Tomcat server.xml file located in the conf directory of your Tomcat installation.
  2. Find the Connector entry (show below).
    Code Block
    
    <Connector port="8009" protocol="AJP/1.3" tomcatAuthentication="false" redirectPort="8443" address="127.0.0.1" maxPostSize="536870912" />
    
{code} # Add *
  1. Add maxHttpHeaderSize="65536"
*
  1. and
*
  1. packetSize="65536"
*
  1. so
  1. that
  1. the
  1. Connector
  1. is
  1. as
  1. follows:
{
  1. Code Block
}
  1. 
    <Connector port="8009" protocol="AJP/1.3" tomcatAuthentication="false" redirectPort="8443" address="127.0.0.1"  maxPostSize="536870912" maxHttpHeaderSize="65536" packetSize="65536" />
    
{code} # When you are satisfied with your changes, save your changes and restart your Tomcat server.
  1. When you are satisfied with your changes, save your changes and restart your Tomcat server.

h3.Tomcat 7 manager fails when deploying a WAR file larger than 50 MB. * When the Tomcat 7 manager tries to deploy a war file that is larger that 50 MB, it fails with the following exception: {code}
  • When the Tomcat 7 manager tries to deploy a war file that is larger that 50 MB, it fails with the following exception:
Panel

Tomcat 7 manager fails when deploying a WAR file larger than 50 MB.

Panel
Wiki Markup
Code Block
  • 
    HTTP Status 500 - 
    
    --------------------------------------------------------------------------------
    
    type Exception report
    
    message 
    
    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 (63475228) exceeds the configured maximum (52428800)
    	org.apache.catalina.connector.Request.parseParts(Request.java:2780)
    	org.apache.catalina.connector.Request.parseParameters(Request.java:3024)
    	org.apache.catalina.connector.Request.getParameter(Request.java:1139)
    	org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:382)
    	org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:163)
    	org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
    
    root cause 
    
    org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (63475228) exceeds the configured maximum (52428800)
    	org.apache.tomcat.util.http.fileupload.FileUploadBase$FileItemIteratorImpl.<init>(FileUploadBase.java:804)
    	org.apache.tomcat.util.http.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:284)
    	org.apache.tomcat.util.http.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:304)
    	org.apache.tomcat.util.http.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:129)
    	org.apache.catalina.connector.Request.parseParts(Request.java:2718)
    	org.apache.catalina.connector.Request.parseParameters(Request.java:3024)
    	org.apache.catalina.connector.Request.getParameter(Request.java:1139)
    	org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:382)
    	org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:163)
    	org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
    
    note The full stack trace of the root cause is available in the Apache Tomcat/7.0.25 logs.
    
{code} *
  • ANSWER:
* *
  • By
  • default,
  • the
  • maximum
  • file
  • size
  • that
  • can
  • be
  • uploaded
  • by
  • the
  • Tomcat
  • 7
  • manager
  • is
  • 52428800
  • bytes.
&nbsp;&nbsp;Do the following to change the default: *# Edit the
  •   Do the following to change the default:
    1. Edit the web.xml
    1. of
    1. the
    1. Tomcat
    1. manager
    1. application.
&nbsp;&nbsp;You can find the
    1.   You can find the web.xml
    1. file
    1. for
    1. the
    1. Tomcat
    1. manager
    1. application
    1. in
    1. the
    1. *webapps/manager/WEB-INF
    1. directory
    1. of
    1. your
    1. Tomcat
    1. installation.
*#
    1. Find
    1. the
*
    1. <multipart-config>
    1. tag
*
    1. (show
    1. below)
    1. and
    1. increase
    1. the
    1. max-file-size
    1. and
    1. max-request-size
    1. (both
    1. initially
    1. set
    1. at
*
    1. 52428800
*
    1. )
    1. to
    1. something
    1. larger
    1. than
    1. the
    1. war
    1. file
    1. size
    1. you
    1. want
    1. to
    1. deploy.
{
    1. Code Block
}
    1. 
      <multipart-config> 
          <max-file-size>52428800</max-file-size> 
          <max-request-size>52428800</max-request-size> 
          <file-size-threshold>0</file-size-threshold> 
      </multipart-config> 
      
{code} *# When you are satisfied with your changes, save your changes and restart your Tomcat server.
    1. When you are satisfied with your changes, save your changes and restart your Tomcat server.
Panel

How do I block inbound connections on ports 8080 and 8443?

  • Follow this link for instructions on how to block inbound connections for any TCP port.