Bug 821659 - getLocalAddr() method returns null in Tomcat 5.5.23
getLocalAddr() method returns null in Tomcat 5.5.23
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: tomcat5 (Show other bugs)
5.8
All Linux
high Severity high
: ---
: ---
Assigned To: David Knox
tomcat-qe
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-15 05:51 EDT by Musharraf Hussain
Modified: 2015-11-01 19:17 EST (History)
5 users (show)

See Also:
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 09:22:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
server.xml (18.36 KB, text/xml)
2012-05-15 05:51 EDT, Musharraf Hussain
no flags Details
httpd-jk.conf (200 bytes, application/octet-stream)
2012-05-15 05:55 EDT, Musharraf Hussain
no flags Details
ssl.conf (667 bytes, application/octet-stream)
2012-05-15 05:56 EDT, Musharraf Hussain
no flags Details
workers.properties (391 bytes, application/octet-stream)
2012-05-15 05:58 EDT, Musharraf Hussain
no flags Details

  None (edit)
Description Musharraf Hussain 2012-05-15 05:51:23 EDT
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 05:51:50 EDT
Created attachment 584613 [details]
server.xml
Comment 2 Musharraf Hussain 2012-05-15 05:55:04 EDT
Created attachment 584620 [details]
httpd-jk.conf
Comment 3 Musharraf Hussain 2012-05-15 05:56:30 EDT
Created attachment 584623 [details]
ssl.conf
Comment 4 Musharraf Hussain 2012-05-15 05:58:24 EDT
Created attachment 584625 [details]
workers.properties
Comment 5 Musharraf Hussain 2012-05-15 06:00:24 EDT
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 Product and Program Management 2012-09-18 14:04:37 EDT
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 Product and Program Management 2012-10-30 02:09:25 EDT
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 13:45:38 EST
The patch is applied to rhel-5.10 and waiting for the rhel-5.10+ flag before it can be commited.
Comment 13 RHEL Product and Program Management 2014-02-24 19:17:29 EST
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 Product and Program Management 2014-03-07 07:17:48 EST
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 Product and Program Management 2014-06-02 09:22:17 EDT
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).

Note You need to log in before you can comment on or make changes to this bug.