You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Patrick Middleton <pa...@onestep.co.uk> on 2012/11/29 13:33:24 UTC

Logfile noise, mod_jk, Apache 2.2, "Uri * is invalid. Uri must start with /"

Hi folks,

I'm working with recent builds/installations of
Apache 2.2.22 with mod_jk 1.2.37 on MacOSX 10.4.11/PPC
Apache 2.2.22 with mod_jk 1.2.37 on MacOSX 10.8.2/x86_64
connecting to Tomcat 5.5.7 (from binary distribution) running on  
MacOSX 10.4.11.

What I am finding is lots of log entries such as this one in /var/log/ 
apache2/mod_jk.log:
[Thu Nov 29 12:17:14.422 2012] [38496:140733193388032] [warn]  
map_uri_to_worker_ext::jk_uri_worker_map.c (1057): Uri * is invalid.  
Uri must start with /

corresponding to this one in /var/log/apache2/access_log:
::1 - - [29/Nov/2012:12:17:14 +0000] - - - "OPTIONS * HTTP/1.0" 200 -  
"-" "Apache/2.2.22 (Unix) DAV/2 mod_jk/1.2.37 mod_ssl/2.2.22 OpenSSL/ 
0.9.8x (internal dummy connection)"


My understanding is that this is the Apache master instance running  
as root is polling its spare/worker processes to check that they're  
alive and I have tracked this down to server/mpm_common.c in the  
Apache 2.2 sources.

I'm not an Apache internals expert.  I'm not really even that good at  
configuring Apache.  I have:
<IfModule jk_module>
     JkWorkersFile /etc/apache2/workers.properties
     JkShmFile /private/var/run/jk-apache2.shm
     JkLogFile /private/var/log/apache2/mod_jk.log
     JkLogLevel info
     JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
     JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
     JkRequestLogFormat "%w %V %T %s %r"
     JKMount "/TomcatApplications/*" worker1
     JkMountCopy All
</IfModule>

so I don't see how the heartbeat request is being processed by the  
jk_module handler.  Possibly my diligent use of Google to find how to  
configure apache 2.2 to stop this has not been diligent enough.   
Suggestions for additional Apache configuration directives are welcome.

Would it be reasonable to change the sources for mod_jk to not log a  
warning when the URI is * and the method is OPTIONS and the remote  
address is localhost?

-- Patrick

This email, including any attachments, is confidential and intended solely
for the person or organisation to whom it is addressed. If you are not the
intended recipient you must not disseminate, distribute or copy any part 
of this email nor take any action in reliance on it.
 
If you have received this in error please notify the sender immediately by
email or phone +44 (0)1702 426400 and delete this email and any attachments
from your system.
 
Email transmission cannot be guaranteed to be secure or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive
late or incomplete, or contain viruses. The sender therefore does not
accept liability for any errors or omissions in the contents of this
message which arise as a result of email transmission. If verification
is required please request a hard-copy version.
 
OneStep Solutions LLP is registered in England and Wales under registration
number OC337173 and has its registered office at 44 The Pantiles, Tunbridge
Wells, Kent, TN2 5TN.

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


Re: Logfile noise, mod_jk, Apache 2.2, "Uri * is invalid. Uri must start with /"

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin,

On 11/29/12 6:50 PM, Martin Gainty wrote:
> 
> assume this Apache 
> URLhttp://systemname:port/server1/example/samples/ExampleServlet
> then to map ALL subdomains and pages under example to SystemWorker1
> (To Tomcat) issue this JKMount JkMount /example/* System1worker on 
> ApacheServer be careful to chmod +r+x for ALL urls 
> underhttp://systemname:port/server1/example/ 
> http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/rzaie/rzaiemod_jk.htm
>
> 
Cheers

That's an entirely different Apache httpd module.

Once again, you have posted something wrong, confusing, and completely
unhelpful.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlC4vwEACgkQ9CaO5/Lv0PCdqwCfakKiv8Kx2ozj4jKzotAZGapM
3twAn3TVgqy83QXQRh5jHoMi1/g56BxS
=bgO7
-----END PGP SIGNATURE-----

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


RE: Logfile noise, mod_jk, Apache 2.2, "Uri * is invalid. Uri must start with /"

Posted by Martin Gainty <mg...@hotmail.com>.
assume this Apache URLhttp://systemname:port/server1/example/samples/ExampleServlet then to map ALL subdomains and pages under example to SystemWorker1 (To Tomcat) issue this JKMount
JkMount /example/* System1worker on ApacheServer be careful to chmod +r+x for ALL urls underhttp://systemname:port/server1/example/ http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/rzaie/rzaiemod_jk.htm Cheers
Martin 
______________________________________________ 
Please do not alter or disrupt this communication..Thank You
 > Date: Thu, 29 Nov 2012 15:33:59 +0100
> From: aw@ice-sa.com
> To: users@tomcat.apache.org
> Subject: Re: Logfile noise, mod_jk, Apache 2.2, "Uri * is invalid. Uri must start with /"
> 
> Patrick Middleton wrote:
> > Hi folks,
> > 
> > I'm working with recent builds/installations of
> > Apache 2.2.22 with mod_jk 1.2.37 on MacOSX 10.4.11/PPC
> > Apache 2.2.22 with mod_jk 1.2.37 on MacOSX 10.8.2/x86_64
> > connecting to Tomcat 5.5.7 (from binary distribution) running on MacOSX 
> > 10.4.11.
> > 
> > What I am finding is lots of log entries such as this one in 
> > /var/log/apache2/mod_jk.log:
> > [Thu Nov 29 12:17:14.422 2012] [38496:140733193388032] [warn] 
> > map_uri_to_worker_ext::jk_uri_worker_map.c (1057): Uri * is invalid. Uri 
> > must start with /
> > 
> > corresponding to this one in /var/log/apache2/access_log:
> > ::1 - - [29/Nov/2012:12:17:14 +0000] - - - "OPTIONS * HTTP/1.0" 200 - 
> > "-" "Apache/2.2.22 (Unix) DAV/2 mod_jk/1.2.37 mod_ssl/2.2.22 
> > OpenSSL/0.9.8x (internal dummy connection)"
> > 
> > 
> > My understanding is that this is the Apache master instance running as 
> > root is polling its spare/worker processes to check that they're alive 
> > and I have tracked this down to server/mpm_common.c in the Apache 2.2 
> > sources.
> > 
> > I'm not an Apache internals expert.  I'm not really even that good at 
> > configuring Apache.  I have:
> > <IfModule jk_module>
> >     JkWorkersFile /etc/apache2/workers.properties
> >     JkShmFile /private/var/run/jk-apache2.shm
> >     JkLogFile /private/var/log/apache2/mod_jk.log
> >     JkLogLevel info
> >     JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> >     JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
> >     JkRequestLogFormat "%w %V %T %s %r"
> >     JKMount "/TomcatApplications/*" worker1
> >     JkMountCopy All
> > </IfModule>
> > 
> > so I don't see how the heartbeat request is being processed by the 
> > jk_module handler.  Possibly my diligent use of Google to find how to 
> > configure apache 2.2 to stop this has not been diligent enough.  
> > Suggestions for additional Apache configuration directives are welcome.
> > 
> > Would it be reasonable to change the sources for mod_jk to not log a 
> > warning when the URI is * and the method is OPTIONS and the remote 
> > address is localhost?
> > 
> 
> Hi.
> Thanks for the detailed and complete info, it simplifies responses.
> I basically agree with you in not understanding why mod_jk, with the single mapping
>  >     JKMount "/TomcatApplications/*" worker1
> would believe that a request "OPTIONS *" applies to it, and would consequently mumble in 
> the logfile.
> 
> I would let the resident mod_jk expert answer that one.
> 
> But to avoid the messages in the meantime, you could try the following :
> 
> 1) comment out the following JkMount and JkMountCopy lines :
>  > <IfModule jk_module>
>  >     JkWorkersFile /etc/apache2/workers.properties
>  >     JkShmFile /private/var/run/jk-apache2.shm
>  >     JkLogFile /private/var/log/apache2/mod_jk.log
>  >     JkLogLevel info
>  >     JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
>  >     JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
>  >     JkRequestLogFormat "%w %V %T %s %r"
> #     JKMount "/TomcatApplications/*" worker1
> #     JkMountCopy All
>  > </IfModule>
> 
> 2) add a section to your Apache httpd configuration :
> <Location /TomcatApplications/>
>    <Limit GET POST>
>      SetHandler jakarta-servlet
>      SetEnv JK_WORKER_NAME worker1
>    </Limit>
> </Location>
> 
> Honestly, I have no idea if a <Limit> section would do the trick here. But you can always 
> try it.
> If it works like I expect, the above means :
> - for any request URL which matches ^/TomcatApplications/
> - only if the method is GET or POST
> - set mod_jk as the Apache response handler
> - and set the mod_jk "worker" to worker1
> If the method is not GET or POST, do nothing, meaning let the request be served by the 
> default Apache response handler (which would complain if this was other than OPTIONS, 
> because it would not find the path on disk).
> 
> 
> 
> Reference : http://tomcat.apache.org/connectors-doc/reference/apache.html
> Section : Using SetHandler and Environment Variables
> and
> http://httpd.apache.org/docs/2.2/mod/core.html#limit
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
 		 	   		  

Re: Logfile noise, mod_jk, Apache 2.2, "Uri * is invalid. Uri must start with /"

Posted by André Warnier <aw...@ice-sa.com>.
Patrick Middleton wrote:
> Hi folks,
> 
> I'm working with recent builds/installations of
> Apache 2.2.22 with mod_jk 1.2.37 on MacOSX 10.4.11/PPC
> Apache 2.2.22 with mod_jk 1.2.37 on MacOSX 10.8.2/x86_64
> connecting to Tomcat 5.5.7 (from binary distribution) running on MacOSX 
> 10.4.11.
> 
> What I am finding is lots of log entries such as this one in 
> /var/log/apache2/mod_jk.log:
> [Thu Nov 29 12:17:14.422 2012] [38496:140733193388032] [warn] 
> map_uri_to_worker_ext::jk_uri_worker_map.c (1057): Uri * is invalid. Uri 
> must start with /
> 
> corresponding to this one in /var/log/apache2/access_log:
> ::1 - - [29/Nov/2012:12:17:14 +0000] - - - "OPTIONS * HTTP/1.0" 200 - 
> "-" "Apache/2.2.22 (Unix) DAV/2 mod_jk/1.2.37 mod_ssl/2.2.22 
> OpenSSL/0.9.8x (internal dummy connection)"
> 
> 
> My understanding is that this is the Apache master instance running as 
> root is polling its spare/worker processes to check that they're alive 
> and I have tracked this down to server/mpm_common.c in the Apache 2.2 
> sources.
> 
> I'm not an Apache internals expert.  I'm not really even that good at 
> configuring Apache.  I have:
> <IfModule jk_module>
>     JkWorkersFile /etc/apache2/workers.properties
>     JkShmFile /private/var/run/jk-apache2.shm
>     JkLogFile /private/var/log/apache2/mod_jk.log
>     JkLogLevel info
>     JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
>     JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
>     JkRequestLogFormat "%w %V %T %s %r"
>     JKMount "/TomcatApplications/*" worker1
>     JkMountCopy All
> </IfModule>
> 
> so I don't see how the heartbeat request is being processed by the 
> jk_module handler.  Possibly my diligent use of Google to find how to 
> configure apache 2.2 to stop this has not been diligent enough.  
> Suggestions for additional Apache configuration directives are welcome.
> 
> Would it be reasonable to change the sources for mod_jk to not log a 
> warning when the URI is * and the method is OPTIONS and the remote 
> address is localhost?
> 

Hi.
Thanks for the detailed and complete info, it simplifies responses.
I basically agree with you in not understanding why mod_jk, with the single mapping
 >     JKMount "/TomcatApplications/*" worker1
would believe that a request "OPTIONS *" applies to it, and would consequently mumble in 
the logfile.

I would let the resident mod_jk expert answer that one.

But to avoid the messages in the meantime, you could try the following :

1) comment out the following JkMount and JkMountCopy lines :
 > <IfModule jk_module>
 >     JkWorkersFile /etc/apache2/workers.properties
 >     JkShmFile /private/var/run/jk-apache2.shm
 >     JkLogFile /private/var/log/apache2/mod_jk.log
 >     JkLogLevel info
 >     JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
 >     JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
 >     JkRequestLogFormat "%w %V %T %s %r"
#     JKMount "/TomcatApplications/*" worker1
#     JkMountCopy All
 > </IfModule>

2) add a section to your Apache httpd configuration :
<Location /TomcatApplications/>
   <Limit GET POST>
     SetHandler jakarta-servlet
     SetEnv JK_WORKER_NAME worker1
   </Limit>
</Location>

Honestly, I have no idea if a <Limit> section would do the trick here. But you can always 
try it.
If it works like I expect, the above means :
- for any request URL which matches ^/TomcatApplications/
- only if the method is GET or POST
- set mod_jk as the Apache response handler
- and set the mod_jk "worker" to worker1
If the method is not GET or POST, do nothing, meaning let the request be served by the 
default Apache response handler (which would complain if this was other than OPTIONS, 
because it would not find the path on disk).



Reference : http://tomcat.apache.org/connectors-doc/reference/apache.html
Section : Using SetHandler and Environment Variables
and
http://httpd.apache.org/docs/2.2/mod/core.html#limit


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