Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 821659

Summary: getLocalAddr() method returns null in Tomcat 5.5.23
Product: Red Hat Enterprise Linux 5 Reporter: Musharraf Hussain <mhussain>
Component: tomcat5Assignee: David Knox <dknox>
Status: CLOSED WONTFIX QA Contact: tomcat-qe
Severity: high Docs Contact:
Priority: high    
Version: 5.8CC: jclere, jpechane, lmiksik, mhasko, mhussain
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Red Hat Enterprise Linux 5.8 Tomcat 5.5.23 Apache 2.2.3 (Red Hat) mod_jk 1.2.23 mod_ssl 2.2.3 OpenSSL 0.9.8e-fips-rhel5 Oracle JDK 1.6.0_23
Last Closed: 2014-06-02 13:22:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
server.xml
none
httpd-jk.conf
none
ssl.conf
none
workers.properties none

Description Musharraf Hussain 2012-05-15 09:51:23 UTC
Description of problem:
- Using the "getLocalAddr()" method in a JSP returns 'null' where the web-application is deployed in Tomcat 5.5.23 . The Tomcat server is fronted with Apache 2.2.3 which is configured to use mod_jk 1.2.23, mod_ssl 2.2.3 .

Version-Release number of selected component (if applicable):
- Tomcat 5.5.23

How reproducible:
- write a small JSP where you have to use the following method and print the value returned from it.

request.getLocalAddr()


Steps to Reproduce:
1. Configure Apache so that it forwards the requests to the back-end Tomcat server using mod_jk connector. Attached "httpd-jk.conf" and "workers.properties" files would help you configure it. Also, make sure your Apache is listening to server's I.P. Address. You can have this entry in httpd.conf file to ensure it.

Listen xx.xx.xx.xx:80

 Make sure the Apache listens to the HTTPS requests and also it forwards the HTTPS traffic to the back-end Tomcat server like the configuration given in attached "ssl.conf" file.

2. Start Tomcat and ensure that it is listening to 8009 port which is used by AJP connector. Attached "server.xml" file could be taken as an example.

3. Create a JSP which where you need to call the below method and print it's out-put.

request.getLocalAddr()
  
Actual results:
- It returns 'null'
Expected results:
- You should get the IP address of the interface on which the request was received.


Additional info:

Comment 1 Musharraf Hussain 2012-05-15 09:51:50 UTC
Created attachment 584613 [details]
server.xml

Comment 2 Musharraf Hussain 2012-05-15 09:55:04 UTC
Created attachment 584620 [details]
httpd-jk.conf

Comment 3 Musharraf Hussain 2012-05-15 09:56:30 UTC
Created attachment 584623 [details]
ssl.conf

Comment 4 Musharraf Hussain 2012-05-15 09:58:24 UTC
Created attachment 584625 [details]
workers.properties

Comment 5 Musharraf Hussain 2012-05-15 10:00:24 UTC
Just to share one observation. I have tested the same set-up with Tomcat 5.5.28.0 which is provided with JBoss EWS 1.0.x and the issues does seem not occur there.

Comment 8 RHEL Program Management 2012-09-18 18:04:37 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 9 RHEL Program Management 2012-10-30 06:09:25 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 10 David Knox 2013-02-28 18:45:38 UTC
The patch is applied to rhel-5.10 and waiting for the rhel-5.10+ flag before it can be commited.

Comment 13 RHEL Program Management 2014-02-25 00:17:29 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 14 RHEL Program Management 2014-03-07 12:17:48 UTC
Thank you for submitting this request for inclusion in Red Hat Enterprise Linux 5. We've carefully evaluated the request, but are unable to include it in the  last planned RHEL5 minor release. This Bugzilla will soon be CLOSED as WONTFIX. To request that Red Hat re-consider this request, please re-open the bugzilla via  appropriate support channels and provide additional business and/or technical details about its importance to you.

Comment 15 RHEL Program Management 2014-06-02 13:22:17 UTC
Thank you for submitting this request for inclusion in Red Hat Enterprise Linux 5. We've carefully evaluated the request, but are unable to include it in RHEL5 stream. If the issue is critical for your business, please provide additional business justification through the appropriate support channels (https://access.redhat.com/site/support).