You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Chris Dumoulin <ch...@blaze.io> on 2011/04/06 21:03:55 UTC

No access log for AJP traffic

I'm using tomcat 7.0.11 with the following Connector and Host elements in server.xml:

<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>

<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
    <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t &quot;%r&quot; %s %b" prefix="localhost_access_log." resolveHosts="false" suffix=".txt"/>
    <Context docBase="app1" path="/app1" reloadable="true" source="org.eclipse.jst.jee.server:app1"/>
    <Context docBase="app2" path="/app2" reloadable="true" source="org.eclipse.jst.j2ee.server:app2"/>
</Host>

In the access log I'm seeing the HTTP traffic on port 8080 but not the AJP traffic on port 8009. I've googled around and I don't see any mention of specific Valve settings for AJP.

Any ideas?

Thanks,
Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: No access log for AJP traffic

Posted by Chris Dumoulin <ch...@blaze.io>.
I meant servlet 3.0 async.

This is from CoyoteAdapter.java:

            AsyncContextImpl asyncConImpl = (AsyncContextImpl)request.getAsyncContext();
            if (asyncConImpl != null) {
                async = true;
            } else if (!comet) {
                response.finishResponse();
                if (postParseSuccess) {
                    // Log only if processing was invoked.
                    // If postParseRequest() failed, it has already logged it.
                    ((Context) request.getMappingData().context).logAccess(
                            request, response,
                            System.currentTimeMillis() - req.getStartTime(),
                            false);
                }
                req.action(ActionCode.POST_REQUEST , null);
            }

In the async case logAccess() isn't called here. I've searched through the code and don't see logAccess() being called anywhere else, except in error cases. So, it looks like the async case is missing a call to logAccess() somewhere.

- Chris

On April 6, 2011 04:44:27 pm Mark Thomas wrote:
> On 06/04/2011 20:50, Chris Dumoulin wrote:
> > In looking into this further, it appears that the difference isn't in HTTP vs AJP, the difference is in async vs synchronous.
> 
> When you say asynchronous, do you mean Servlet 3.0 or Comet?
> 
> Mark
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: No access log for AJP traffic

Posted by André Warnier <aw...@ice-sa.com>.
Just in case : have you looked at the 2 earlier [SECURITY] messages on this list, and at 
the Change log for Tomcat 7.0.12 ?  There are some notes there about asynchronous requests 
that may have a bearing on your issue (maybe indirectly).

Chris Dumoulin wrote:
> In looking into this further, it appears that the difference isn't in HTTP vs AJP, the difference is in async vs synchronous.
> 
> The AJP traffic was carrying requests that were being processed asynchronously in Tomcat. If I switch to using the HTTP connector for this same traffic I still don't see anything in the access log. Other requests that are being processed synchronously are showing up in the access logs.
> 
> I'm starting to step through the Tomcat code now, but any thoughts on this would be appreciated.
> 
> - Chris
> 
> On April 6, 2011 03:31:18 pm Chris Dumoulin wrote:
>> Thanks for your response Andre. I'm using AJP between Tomcat and Nginx using this Nginx module: https://github.com/yaoweibin/nginx_ajp_module
>> There is definitely AJP traffic, it's just not showing up in the access log.
>>
>> - Chris
>>
>> On April 6, 2011 03:24:38 pm André Warnier wrote:
>>> Chris Dumoulin wrote:
>>>> I'm using tomcat 7.0.11 with the following Connector and Host elements in server.xml:
>>>>
>>>> <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
>>>> <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>
>>>>
>>>> <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
>>>>     <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t &quot;%r&quot; %s %b" prefix="localhost_access_log." resolveHosts="false" suffix=".txt"/>
>>>>     <Context docBase="app1" path="/app1" reloadable="true" source="org.eclipse.jst.jee.server:app1"/>
>>>>     <Context docBase="app2" path="/app2" reloadable="true" source="org.eclipse.jst.j2ee.server:app2"/>
>>>> </Host>
>>>>
>>>> In the access log I'm seeing the HTTP traffic on port 8080 but not the AJP traffic on port 8009. I've googled around and I don't see any mention of specific Valve settings for AJP.
>>>>
>>>> Any ideas?
>>>>
>>> And are you expecting traffic on the AJP Connector ?
>>> For traffic to show up there, some client would need to connect to your server on port 
>>> 8009.  Is there anything that connects to that port ?
>>>
>>> If not, then there is nothing to worry about, and you could even comment-out that 
>>> <Connector>, since it will never be used.
>>> Like :
>>> <!-- Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/ -->
>>>
>>>
>>> The AJP Connector is used in scenarios where there is another webserver used as a 
>>> front-end to Tomcat, and this other webserver, to pass requests to Tomcat, uses the AJP 
>>> protocol.  For example, a configuration like this one :
>>>
>>> browser <--> Apache httpd server <-----> Tomcat
>>>                 + mod_jk module
>>>              OR + mod_proxy_ajp module
>>>
>>> or
>>>
>>> browser <--> IIS webserver <-----> Tomcat
>>>           + isapi_redirect module
>>>
>>> If you do not use such a configuration, or you do not understand what this is all about, 
>>> then you don't need the AJP <Connector> in Tomcat.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: No access log for AJP traffic

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
The logging now takes place in the CoyoteAdapter
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?r1=1086351&r2=1086352&

Filip

On 4/6/2011 2:26 PM, Filip Hanik - Dev Lists wrote:
> Tomcat 6
> http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java?annotate=1030188
> Look at the invoke() method, it logs the data
>
>
> Tomcat 7
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?view=annotate
> Look at the invoke() method, it does nothing :)
>
> It seems to have happened here
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?r1=1059547&r2=1059548&
>
> Filip
>
> On 4/6/2011 1:50 PM, Chris Dumoulin wrote:
>> In looking into this further, it appears that the difference isn't in HTTP vs AJP, the difference is in async vs synchronous.
>>
>> The AJP traffic was carrying requests that were being processed asynchronously in Tomcat. If I switch to using the HTTP connector for 
>> this same traffic I still don't see anything in the access log. Other requests that are being processed synchronously are showing up in 
>> the access logs.
>>
>> I'm starting to step through the Tomcat code now, but any thoughts on this would be appreciated.
>>
>> - Chris
>>
>> On April 6, 2011 03:31:18 pm Chris Dumoulin wrote:
>>> Thanks for your response Andre. I'm using AJP between Tomcat and Nginx using this Nginx module: 
>>> https://github.com/yaoweibin/nginx_ajp_module
>>> There is definitely AJP traffic, it's just not showing up in the access log.
>>>
>>> - Chris
>>>
>>> On April 6, 2011 03:24:38 pm André Warnier wrote:
>>>> Chris Dumoulin wrote:
>>>>> I'm using tomcat 7.0.11 with the following Connector and Host elements in server.xml:
>>>>>
>>>>> <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
>>>>> <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>
>>>>>
>>>>> <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
>>>>> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t&quot;%r&quot; %s %b" 
>>>>> prefix="localhost_access_log." resolveHosts="false" suffix=".txt"/>
>>>>> <Context docBase="app1" path="/app1" reloadable="true" source="org.eclipse.jst.jee.server:app1"/>
>>>>> <Context docBase="app2" path="/app2" reloadable="true" source="org.eclipse.jst.j2ee.server:app2"/>
>>>>> </Host>
>>>>>
>>>>> In the access log I'm seeing the HTTP traffic on port 8080 but not the AJP traffic on port 8009. I've googled around and I don't see 
>>>>> any mention of specific Valve settings for AJP.
>>>>>
>>>>> Any ideas?
>>>>>
>>>> And are you expecting traffic on the AJP Connector ?
>>>> For traffic to show up there, some client would need to connect to your server on port
>>>> 8009.  Is there anything that connects to that port ?
>>>>
>>>> If not, then there is nothing to worry about, and you could even comment-out that
>>>> <Connector>, since it will never be used.
>>>> Like :
>>>> <!-- Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/ -->
>>>>
>>>>
>>>> The AJP Connector is used in scenarios where there is another webserver used as a
>>>> front-end to Tomcat, and this other webserver, to pass requests to Tomcat, uses the AJP
>>>> protocol.  For example, a configuration like this one :
>>>>
>>>> browser<-->  Apache httpd server<----->  Tomcat
>>>>                  + mod_jk module
>>>>               OR + mod_proxy_ajp module
>>>>
>>>> or
>>>>
>>>> browser<-->  IIS webserver<----->  Tomcat
>>>>            + isapi_redirect module
>>>>
>>>> If you do not use such a configuration, or you do not understand what this is all about,
>>>> then you don't need the AJP<Connector>  in Tomcat.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>> -----
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 10.0.1209 / Virus Database: 1500/3555 - Release Date: 04/06/11
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1209 / Virus Database: 1500/3555 - Release Date: 04/06/11
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: No access log for AJP traffic

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
Tomcat 6
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java?annotate=1030188
Look at the invoke() method, it logs the data


Tomcat 7
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?view=annotate
Look at the invoke() method, it does nothing :)

It seems to have happened here
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?r1=1059547&r2=1059548&

Filip

On 4/6/2011 1:50 PM, Chris Dumoulin wrote:
> In looking into this further, it appears that the difference isn't in HTTP vs AJP, the difference is in async vs synchronous.
>
> The AJP traffic was carrying requests that were being processed asynchronously in Tomcat. If I switch to using the HTTP connector for this same traffic I still don't see anything in the access log. Other requests that are being processed synchronously are showing up in the access logs.
>
> I'm starting to step through the Tomcat code now, but any thoughts on this would be appreciated.
>
> - Chris
>
> On April 6, 2011 03:31:18 pm Chris Dumoulin wrote:
>> Thanks for your response Andre. I'm using AJP between Tomcat and Nginx using this Nginx module: https://github.com/yaoweibin/nginx_ajp_module
>> There is definitely AJP traffic, it's just not showing up in the access log.
>>
>> - Chris
>>
>> On April 6, 2011 03:24:38 pm André Warnier wrote:
>>> Chris Dumoulin wrote:
>>>> I'm using tomcat 7.0.11 with the following Connector and Host elements in server.xml:
>>>>
>>>> <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
>>>> <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>
>>>>
>>>> <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
>>>>      <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t&quot;%r&quot; %s %b" prefix="localhost_access_log." resolveHosts="false" suffix=".txt"/>
>>>>      <Context docBase="app1" path="/app1" reloadable="true" source="org.eclipse.jst.jee.server:app1"/>
>>>>      <Context docBase="app2" path="/app2" reloadable="true" source="org.eclipse.jst.j2ee.server:app2"/>
>>>> </Host>
>>>>
>>>> In the access log I'm seeing the HTTP traffic on port 8080 but not the AJP traffic on port 8009. I've googled around and I don't see any mention of specific Valve settings for AJP.
>>>>
>>>> Any ideas?
>>>>
>>> And are you expecting traffic on the AJP Connector ?
>>> For traffic to show up there, some client would need to connect to your server on port
>>> 8009.  Is there anything that connects to that port ?
>>>
>>> If not, then there is nothing to worry about, and you could even comment-out that
>>> <Connector>, since it will never be used.
>>> Like :
>>> <!-- Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/ -->
>>>
>>>
>>> The AJP Connector is used in scenarios where there is another webserver used as a
>>> front-end to Tomcat, and this other webserver, to pass requests to Tomcat, uses the AJP
>>> protocol.  For example, a configuration like this one :
>>>
>>> browser<-->  Apache httpd server<----->  Tomcat
>>>                  + mod_jk module
>>>               OR + mod_proxy_ajp module
>>>
>>> or
>>>
>>> browser<-->  IIS webserver<----->  Tomcat
>>>            + isapi_redirect module
>>>
>>> If you do not use such a configuration, or you do not understand what this is all about,
>>> then you don't need the AJP<Connector>  in Tomcat.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1209 / Virus Database: 1500/3555 - Release Date: 04/06/11
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: No access log for AJP traffic

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/4/6 Chris Dumoulin <ch...@blaze.io>:
> In looking into this further, it appears that the difference isn't in HTTP vs AJP, the difference is in async vs synchronous.
>
> The AJP traffic was carrying requests that were being processed asynchronously in Tomcat. If I switch to using the HTTP connector for this same traffic I still don't see anything in the access log. Other requests that are being processed synchronously are showing up in the access logs.
>
> I'm starting to step through the Tomcat code now, but any thoughts on this would be appreciated.

In recent TC7 Access Log is being done by  CoyoteAdapter,
e.g. in CoyoteAdapter.service() - see logAccess() call there.

If you see a bug there, please create an issue in bugzilla.


Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: No access log for AJP traffic

Posted by Mark Thomas <ma...@apache.org>.
On 06/04/2011 20:50, Chris Dumoulin wrote:
> In looking into this further, it appears that the difference isn't in HTTP vs AJP, the difference is in async vs synchronous.

When you say asynchronous, do you mean Servlet 3.0 or Comet?

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: No access log for AJP traffic

Posted by Chris Dumoulin <ch...@blaze.io>.
In looking into this further, it appears that the difference isn't in HTTP vs AJP, the difference is in async vs synchronous.

The AJP traffic was carrying requests that were being processed asynchronously in Tomcat. If I switch to using the HTTP connector for this same traffic I still don't see anything in the access log. Other requests that are being processed synchronously are showing up in the access logs.

I'm starting to step through the Tomcat code now, but any thoughts on this would be appreciated.

- Chris

On April 6, 2011 03:31:18 pm Chris Dumoulin wrote:
> Thanks for your response Andre. I'm using AJP between Tomcat and Nginx using this Nginx module: https://github.com/yaoweibin/nginx_ajp_module
> There is definitely AJP traffic, it's just not showing up in the access log.
> 
> - Chris
> 
> On April 6, 2011 03:24:38 pm André Warnier wrote:
> > Chris Dumoulin wrote:
> > > I'm using tomcat 7.0.11 with the following Connector and Host elements in server.xml:
> > > 
> > > <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
> > > <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>
> > > 
> > > <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
> > >     <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t &quot;%r&quot; %s %b" prefix="localhost_access_log." resolveHosts="false" suffix=".txt"/>
> > >     <Context docBase="app1" path="/app1" reloadable="true" source="org.eclipse.jst.jee.server:app1"/>
> > >     <Context docBase="app2" path="/app2" reloadable="true" source="org.eclipse.jst.j2ee.server:app2"/>
> > > </Host>
> > > 
> > > In the access log I'm seeing the HTTP traffic on port 8080 but not the AJP traffic on port 8009. I've googled around and I don't see any mention of specific Valve settings for AJP.
> > > 
> > > Any ideas?
> > > 
> > 
> > And are you expecting traffic on the AJP Connector ?
> > For traffic to show up there, some client would need to connect to your server on port 
> > 8009.  Is there anything that connects to that port ?
> > 
> > If not, then there is nothing to worry about, and you could even comment-out that 
> > <Connector>, since it will never be used.
> > Like :
> > <!-- Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/ -->
> > 
> > 
> > The AJP Connector is used in scenarios where there is another webserver used as a 
> > front-end to Tomcat, and this other webserver, to pass requests to Tomcat, uses the AJP 
> > protocol.  For example, a configuration like this one :
> > 
> > browser <--> Apache httpd server <-----> Tomcat
> >                 + mod_jk module
> >              OR + mod_proxy_ajp module
> > 
> > or
> > 
> > browser <--> IIS webserver <-----> Tomcat
> >           + isapi_redirect module
> > 
> > If you do not use such a configuration, or you do not understand what this is all about, 
> > then you don't need the AJP <Connector> in Tomcat.
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> > 
> > 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: No access log for AJP traffic

Posted by Chris Dumoulin <ch...@blaze.io>.
Thanks for your response Andre. I'm using AJP between Tomcat and Nginx using this Nginx module: https://github.com/yaoweibin/nginx_ajp_module
There is definitely AJP traffic, it's just not showing up in the access log.

- Chris

On April 6, 2011 03:24:38 pm André Warnier wrote:
> Chris Dumoulin wrote:
> > I'm using tomcat 7.0.11 with the following Connector and Host elements in server.xml:
> > 
> > <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
> > <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>
> > 
> > <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
> >     <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t &quot;%r&quot; %s %b" prefix="localhost_access_log." resolveHosts="false" suffix=".txt"/>
> >     <Context docBase="app1" path="/app1" reloadable="true" source="org.eclipse.jst.jee.server:app1"/>
> >     <Context docBase="app2" path="/app2" reloadable="true" source="org.eclipse.jst.j2ee.server:app2"/>
> > </Host>
> > 
> > In the access log I'm seeing the HTTP traffic on port 8080 but not the AJP traffic on port 8009. I've googled around and I don't see any mention of specific Valve settings for AJP.
> > 
> > Any ideas?
> > 
> 
> And are you expecting traffic on the AJP Connector ?
> For traffic to show up there, some client would need to connect to your server on port 
> 8009.  Is there anything that connects to that port ?
> 
> If not, then there is nothing to worry about, and you could even comment-out that 
> <Connector>, since it will never be used.
> Like :
> <!-- Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/ -->
> 
> 
> The AJP Connector is used in scenarios where there is another webserver used as a 
> front-end to Tomcat, and this other webserver, to pass requests to Tomcat, uses the AJP 
> protocol.  For example, a configuration like this one :
> 
> browser <--> Apache httpd server <-----> Tomcat
>                 + mod_jk module
>              OR + mod_proxy_ajp module
> 
> or
> 
> browser <--> IIS webserver <-----> Tomcat
>           + isapi_redirect module
> 
> If you do not use such a configuration, or you do not understand what this is all about, 
> then you don't need the AJP <Connector> in Tomcat.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: No access log for AJP traffic

Posted by André Warnier <aw...@ice-sa.com>.
Chris Dumoulin wrote:
> I'm using tomcat 7.0.11 with the following Connector and Host elements in server.xml:
> 
> <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
> <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>
> 
> <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
>     <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t &quot;%r&quot; %s %b" prefix="localhost_access_log." resolveHosts="false" suffix=".txt"/>
>     <Context docBase="app1" path="/app1" reloadable="true" source="org.eclipse.jst.jee.server:app1"/>
>     <Context docBase="app2" path="/app2" reloadable="true" source="org.eclipse.jst.j2ee.server:app2"/>
> </Host>
> 
> In the access log I'm seeing the HTTP traffic on port 8080 but not the AJP traffic on port 8009. I've googled around and I don't see any mention of specific Valve settings for AJP.
> 
> Any ideas?
> 

And are you expecting traffic on the AJP Connector ?
For traffic to show up there, some client would need to connect to your server on port 
8009.  Is there anything that connects to that port ?

If not, then there is nothing to worry about, and you could even comment-out that 
<Connector>, since it will never be used.
Like :
<!-- Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/ -->


The AJP Connector is used in scenarios where there is another webserver used as a 
front-end to Tomcat, and this other webserver, to pass requests to Tomcat, uses the AJP 
protocol.  For example, a configuration like this one :

browser <--> Apache httpd server <-----> Tomcat
                + mod_jk module
             OR + mod_proxy_ajp module

or

browser <--> IIS webserver <-----> Tomcat
          + isapi_redirect module

If you do not use such a configuration, or you do not understand what this is all about, 
then you don't need the AJP <Connector> in Tomcat.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org