Bug 1029491 - Attribute resolve-host of access log has no effect
Attribute resolve-host of access log has no effect
Status: VERIFIED
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web (Show other bugs)
6.2.0
Unspecified Unspecified
unspecified Severity medium
: DR1
: EAP 6.4.0
Assigned To: Rémy Maucherat
Radim Hatlapatka
:
Depends On: 1138672
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-12 08:28 EST by Jan Blizňák
Modified: 2017-10-09 20:17 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
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)

  None (edit)
Description Jan Blizňák 2013-11-12 08:28:45 EST
Description of problem:
When enabling host resolution for access log there is no change at log records, so it seems that this setting is not effective at all.


Version-Release number of selected component (if applicable):
EAP 6.2.0.ER7, JBoss Web 7.2.2.Final-redhat-1, JBoss Application Server: Web Subsystem 7.3.0.Final-redhat-SNAPSHOT

How reproducible:
always

Steps to Reproduce:
0. default instalation of EAP with default config started as standalone
1. Enable access log with resolving disabled: /subsystem=web/virtual-server=default-host/access-log=configuration:add(resolve-hosts=false)
2. perform several web accesses at localhost:8080 or if you can, do external access to your public IP
3. check log at <eap-dir>/standalone/log/default-host and see that IP is in first field of each record.
4. Enable resolving: /subsystem=web/virtual-server=default-host/access-log=configuration:write-attribute(name=resolve-hosts,value=false)
5. again perform several web accesses the same way as in step 2)
6. check log again and check if hostname is in first field of each new record.


Actual results:
Resolving hostnames is not seem to work, there are only IPs in log.

Expected results:
Resolving hostnames works.


Additional info:
Since JBoss Web has very poor docs and is based on Tomcat, I found at
http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/valves/AccessLogValve.html where it says "Remote host name (or IP address if enableLookups for the connector is false)" for request hostname.
So I try to turn it on /subsystem=web/connector=http:write-attribute(name=enable-lookups,value=true)
and it starts to resolving hosts no matter what the value of resolve-host attribute is.
Comment 1 Radim Hatlapatka 2013-11-12 12:18:51 EST
If I look to JBoss Web documentation (version used in EAP 6.2) [1], I see, that information regarding resolveHosts are the same as for Tomcat 6.0 => should still work and is not marked deprecated as is in Tomcat 7.

[1]
http://anonsvn.jboss.org/repos/jbossweb/branches/7.2.x/webapps/docs/config/valve.xml
Comment 2 Martin Velas 2014-08-04 08:08:18 EDT
Issue is still valid for the EAP 6.3.0.ER10 bits.
Comment 3 Rémy Maucherat 2014-09-04 09:09:36 EDT
The pattern uses something different for the address and the host, so the setting is obviously useless. Now since it is there, I'll use it as an additional override ... Indeed resolving hosts will also need resolveHosts on the connector. r2501 in web.

Note that it is likely a bad idea to actually enable host resolution on a real server.
Comment 4 Kabir Khan 2014-09-08 07:54:18 EDT
Fixed by component upgrade to JBoss Web 7.5.0.Beta1: https://bugzilla.redhat.com/show_bug.cgi?id=1138672
Comment 5 Radim Hatlapatka 2014-09-23 09:41:52 EDT
Verified in EAP 6.4.0.DR1.1

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