1705510 - Tomcat behind a port redirector or NAT

SAP Knowledge Base Article - Public

1705510 - Tomcat behind a port redirector or NAT

Symptom

If you enter a virtual hostname or ip address which redirects or NATs to a background tomcat server the URL changes to the actual tomcat hostname and the browser fails to connect.

Environment

  • Windows or unix
  • Any tomcat version

Cause

Tomcat is redirecting to its own URL to satisfy the request but this URL is inaccessible to the browser because of the network configuration.

Resolution

There are a number of ways to go about fixing this, and they depend on how your company accesses tomcat.  If no one is connecting to tomcat directly you can modify the default listener.  But if some access it directly you will need to create a new connector for the external people.

In the end the goal is to add a proxyName and proxyPort setting to the connector in question.

Example:
Open the tomcat/conf/server.xml
Find this line
<Connector URIEncoding="UTF-8" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150" minSpareThreads="25" port="8080" redirectPort="8443"/>

Copy the above line and create a new 9090 Connector with the new variables

<Connector URIEncoding="UTF-8" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150" minSpareThreads="25" port="9090" proxyName=”yourproxyhostname” proxyPort=”9090” redirectPort="9443"/>

 

For full details on the proxyName and proxyPort variables please see the tomct documentation at http://tomcat.apache.org

 

Keywords

KBA , BI-BIP-DEP , SBOP Web Application Deployment, Wdeploy , How To

Product

Crystal Reports 2008 V1