You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Gilberto E. Espinoza" <ge...@gmail.com> on 2006/11/15 03:09:57 UTC
JkMountFile not working
Hi -
I am running Geronimo+Tomcat (1.1.1). I have apache2 in front of it and
I use the JkMountFile directive to map the webapp context to the apache
server space. I am not sure that the file I use for the JkMountFile
gets reloaded every time I update it. I do not know where to start
troubleshooting the issue.
I know my mount points work because they are mapped when I restart apache2.
Below are the conf files.
Thanks,
### apache mod_jk conf ###
# Load mod_jk module
# Update this path to match your modules location
<IfModule !mod_jk.c>
LoadModule jk_module /usr/lib/apache2/mod_jk.so
</IfModule>
# Declare the module for <IfModule directive> (remove this line on
Apache 2.x)
# AddModule mod_jk.c
# Where to put jk logs
# Update this path to match your logs directory location (put mod_jk.log
next to access_log)
JkLogFile /var/log/apache2/mod_jk.log
# Where to find workers.properties
JkWorkersFile /somwhere/workers.properties
# Set the jk log level [debug/error/info]
JkLogLevel debug
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"
# To automatically load the webapps
JkAutoAlias /<>/geronimo/webapps
JkMountFile /<>/geronimo/uriworkermap.properties
# For Tomcat within Geronimo
JkAutoAlias /<>/geronimo-1.1.1/var/catalina/work/
JkAutoAlias /<>/geronimo-1.1.1/config-store/
<Location "/servlets-examples/WEB-INF/">
AllowOverride None
deny from all
</Location>
<Location "/jsp-examples/WEB-INF/">
AllowOverride None
deny from all
</Location>
<Location "/tomcat-docs/WEB-INF/">
AllowOverride None
deny from all
</Location>
### end ###
### uriworkermap.properties ###
# URI Mappings
/=ajp13
/*=ajp13
/*.jsp=ajp13
/servlets-examples/=ajp13
/jsp-examples/=ajp13
/servlets-examples/servlet/*=ajp13
/servlets-examples/*.jsp=ajp13
/jsp-examples/*.jsp=ajp13
/jsp-examples/*.jspx=ajp13
/jsp-examples/servlet/*=ajp13
/jsp-examples/*.html=ajp13
/jsp-examples/*.htm=ajp13
/jsp-examples/*.png=ajp13
/jsp-examples/*.jpg=ajp13
/jsp-examples/*.jpeg=ajp13
/jsp-examples/*.gif=ajp13
!/servlets-examples/*.html=ajp13
!/servlets-examples/*.htm=ajp13
!/servlets-examples/*.png=ajp13
!/servlets-examples/*.jpg=ajp13
!/servlets-examples/*.jpeg=ajp13
!/servlets-examples/*.gif=ajp13
### end ###
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JkMountFile not working
Posted by "Gilberto E. Espinoza" <ge...@gmail.com>.
Hi Mladen:
I built mod_jk from the svn trunk and I keep having the same problem. I
will follow Rainer's suggestion and open a bug report.
Thanks,
Gilberto
Mladen Turk wrote:
> Gilberto E. Espinoza wrote:
>>
>> I changed the file tonight and checked that the modified time was
>> tonight's. The update did not work and the server continued to map
>> to the same webapp context. I again restarted the apache2 server and
>> the new mappings worked well. Is there a way to see were the
>> modification time is stored so that I can manually inspect it.
>
> Can you build the mod_jk from SVN trunk and check?
> On some systems the the time_t math gives wrong results,
> so I modified the code to use the difftime.
>
> Regards,
> Mladen.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JkMountFile not working
Posted by Gilberto Espinoza <ge...@gmail.com>.
Thanks for the help. I will try Mladen's suggestion over the weekend and
post the outcome then.
On 11/16/06, Rainer Jung <ra...@kippdata.de> wrote:
>
> Ah sorry, I didn't notice Mladen's changes when I wrote my answer a
> minute ago. So yes, could you please try with his patch (build
> 1.2.20-dev) and try again and if the problem persists, open a bugzilla
> as described.
>
> Mladen Turk schrieb:
> > Gilberto E. Espinoza wrote:
> >>
> >> I changed the file tonight and checked that the modified time was
> >> tonight's. The update did not work and the server continued to map to
> >> the same webapp context. I again restarted the apache2 server and the
> >> new mappings worked well. Is there a way to see were the modification
> >> time is stored so that I can manually inspect it.
> >
> > Can you build the mod_jk from SVN trunk and check?
> > On some systems the the time_t math gives wrong results,
> > so I modified the code to use the difftime.
> >
> > Regards,
> > Mladen.
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: JkMountFile not working
Posted by Rainer Jung <ra...@kippdata.de>.
Ah sorry, I didn't notice Mladen's changes when I wrote my answer a
minute ago. So yes, could you please try with his patch (build
1.2.20-dev) and try again and if the problem persists, open a bugzilla
as described.
Mladen Turk schrieb:
> Gilberto E. Espinoza wrote:
>>
>> I changed the file tonight and checked that the modified time was
>> tonight's. The update did not work and the server continued to map to
>> the same webapp context. I again restarted the apache2 server and the
>> new mappings worked well. Is there a way to see were the modification
>> time is stored so that I can manually inspect it.
>
> Can you build the mod_jk from SVN trunk and check?
> On some systems the the time_t math gives wrong results,
> so I modified the code to use the difftime.
>
> Regards,
> Mladen.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JkMountFile not working
Posted by Mladen Turk <ml...@jboss.com>.
Gilberto E. Espinoza wrote:
>
> I changed the file tonight and checked that the modified time was
> tonight's. The update did not work and the server continued to map to
> the same webapp context. I again restarted the apache2 server and the
> new mappings worked well. Is there a way to see were the modification
> time is stored so that I can manually inspect it.
Can you build the mod_jk from SVN trunk and check?
On some systems the the time_t math gives wrong results,
so I modified the code to use the difftime.
Regards,
Mladen.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JkMountFile not working
Posted by Rainer Jung <ra...@kippdata.de>.
No way to look at the modification time inside mod_jk. The module will
log the followinf when loading the file during request processing:
Log-Level info: Reloaded urimaps from FILENAME
And a little later one can see the usual request mapping (Log-Level debug):
Attempting to map URI 'REQUEST_URL' from NUM_OF_ENTIES maps
Please open a bugzilla and attach all your config files (including the
JkMountfile before and after the change). If you can easily reproduce
the problem, it would also be helpful, if you set your log level to
trace and attach the complete JkLogFile.
Regards,
Rainer
Gilberto E. Espinoza schrieb:
> Hi Rainer-
>
> I changed the file tonight and checked that the modified time was
> tonight's. The update did not work and the server continued to map to
> the same webapp context. I again restarted the apache2 server and the
> new mappings worked well. Is there a way to see were the modification
> time is stored so that I can manually inspect it.
>
> Thanks for your help.
>
> Gilberto
>
> Rainer Jung wrote:
>> Hi Gilberto,
>>
>> automatic reloading of JkMountFile after changes happens only every 60
>> seconds. More precisely, if a request comes in later than 60 seconds
>> after the last check, mod_jk updates it's last check time and looks for
>> the modification time of the file. If this is more trecent, than the
>> modification time when it hass been loaded, it will be loaded again and
>> the modification time gets saved.
>>
>> So the update of the mounts after the change to the file can happen any
>> time between immediately and 60 seconds after your changes, assuming
>> that requests are coming in.
>>
>> If this doesn't fit your experience: are the modification times of the
>> file OK?
>>
>> Regards,
>>
>> Rainer
>>
>> Gilberto E. Espinoza schrieb:
>>
>>> Hi -
>>>
>>> I am running Geronimo+Tomcat (1.1.1). I have apache2 in front of it and
>>> I use the JkMountFile directive to map the webapp context to the apache
>>> server space. I am not sure that the file I use for the JkMountFile
>>> gets reloaded every time I update it. I do not know where to start
>>> troubleshooting the issue.
>>>
>>> I know my mount points work because they are mapped when I restart
>>> apache2.
>>>
>>> Below are the conf files.
>>>
>>> Thanks,
>>>
>>> ### apache mod_jk conf ###
>>> # Load mod_jk module
>>> # Update this path to match your modules location
>>> <IfModule !mod_jk.c>
>>> LoadModule jk_module /usr/lib/apache2/mod_jk.so
>>> </IfModule>
>>>
>>> # Declare the module for <IfModule directive> (remove this line on
>>> Apache 2.x)
>>> # AddModule mod_jk.c
>>>
>>> # Where to put jk logs
>>> # Update this path to match your logs directory location (put mod_jk.log
>>> next to access_log)
>>> JkLogFile /var/log/apache2/mod_jk.log
>>>
>>> # Where to find workers.properties
>>> JkWorkersFile /somwhere/workers.properties
>>>
>>> # Set the jk log level [debug/error/info]
>>> JkLogLevel debug
>>>
>>> # Select the log format
>>> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
>>>
>>> # JkOptions indicate to send SSL KEY SIZE,
>>> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
>>>
>>> # JkRequestLogFormat set the request format
>>> JkRequestLogFormat "%w %V %T"
>>>
>>> # To automatically load the webapps
>>> JkAutoAlias /<>/geronimo/webapps
>>> JkMountFile /<>/geronimo/uriworkermap.properties
>>>
>>> # For Tomcat within Geronimo
>>> JkAutoAlias /<>/geronimo-1.1.1/var/catalina/work/
>>> JkAutoAlias /<>/geronimo-1.1.1/config-store/
>>>
>>> <Location "/servlets-examples/WEB-INF/">
>>> AllowOverride None
>>> deny from all
>>> </Location>
>>>
>>> <Location "/jsp-examples/WEB-INF/">
>>> AllowOverride None
>>> deny from all
>>> </Location>
>>>
>>> <Location "/tomcat-docs/WEB-INF/">
>>> AllowOverride None
>>> deny from all
>>> </Location>
>>>
>>> ### end ###
>>>
>>> ### uriworkermap.properties ###
>>> # URI Mappings
>>>
>>> /=ajp13
>>> /*=ajp13
>>> /*.jsp=ajp13
>>>
>>> /servlets-examples/=ajp13
>>> /jsp-examples/=ajp13
>>>
>>> /servlets-examples/servlet/*=ajp13
>>> /servlets-examples/*.jsp=ajp13
>>> /jsp-examples/*.jsp=ajp13
>>> /jsp-examples/*.jspx=ajp13
>>> /jsp-examples/servlet/*=ajp13
>>>
>>> /jsp-examples/*.html=ajp13
>>> /jsp-examples/*.htm=ajp13
>>> /jsp-examples/*.png=ajp13
>>> /jsp-examples/*.jpg=ajp13
>>> /jsp-examples/*.jpeg=ajp13
>>> /jsp-examples/*.gif=ajp13
>>>
>>> !/servlets-examples/*.html=ajp13
>>> !/servlets-examples/*.htm=ajp13
>>> !/servlets-examples/*.png=ajp13
>>> !/servlets-examples/*.jpg=ajp13
>>> !/servlets-examples/*.jpeg=ajp13
>>> !/servlets-examples/*.gif=ajp13
>>>
>>> ### end ###
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JkMountFile not working
Posted by "Gilberto E. Espinoza" <ge...@gmail.com>.
Hi Rainer-
I changed the file tonight and checked that the modified time was
tonight's. The update did not work and the server continued to map to
the same webapp context. I again restarted the apache2 server and the
new mappings worked well. Is there a way to see were the modification
time is stored so that I can manually inspect it.
Thanks for your help.
Gilberto
Rainer Jung wrote:
> Hi Gilberto,
>
> automatic reloading of JkMountFile after changes happens only every 60
> seconds. More precisely, if a request comes in later than 60 seconds
> after the last check, mod_jk updates it's last check time and looks for
> the modification time of the file. If this is more trecent, than the
> modification time when it hass been loaded, it will be loaded again and
> the modification time gets saved.
>
> So the update of the mounts after the change to the file can happen any
> time between immediately and 60 seconds after your changes, assuming
> that requests are coming in.
>
> If this doesn't fit your experience: are the modification times of the
> file OK?
>
> Regards,
>
> Rainer
>
> Gilberto E. Espinoza schrieb:
>
>> Hi -
>>
>> I am running Geronimo+Tomcat (1.1.1). I have apache2 in front of it and
>> I use the JkMountFile directive to map the webapp context to the apache
>> server space. I am not sure that the file I use for the JkMountFile
>> gets reloaded every time I update it. I do not know where to start
>> troubleshooting the issue.
>>
>> I know my mount points work because they are mapped when I restart apache2.
>>
>> Below are the conf files.
>>
>> Thanks,
>>
>> ### apache mod_jk conf ###
>> # Load mod_jk module
>> # Update this path to match your modules location
>> <IfModule !mod_jk.c>
>> LoadModule jk_module /usr/lib/apache2/mod_jk.so
>> </IfModule>
>>
>> # Declare the module for <IfModule directive> (remove this line on
>> Apache 2.x)
>> # AddModule mod_jk.c
>>
>> # Where to put jk logs
>> # Update this path to match your logs directory location (put mod_jk.log
>> next to access_log)
>> JkLogFile /var/log/apache2/mod_jk.log
>>
>> # Where to find workers.properties
>> JkWorkersFile /somwhere/workers.properties
>>
>> # Set the jk log level [debug/error/info]
>> JkLogLevel debug
>>
>> # Select the log format
>> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
>>
>> # JkOptions indicate to send SSL KEY SIZE,
>> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
>>
>> # JkRequestLogFormat set the request format
>> JkRequestLogFormat "%w %V %T"
>>
>> # To automatically load the webapps
>> JkAutoAlias /<>/geronimo/webapps
>> JkMountFile /<>/geronimo/uriworkermap.properties
>>
>> # For Tomcat within Geronimo
>> JkAutoAlias /<>/geronimo-1.1.1/var/catalina/work/
>> JkAutoAlias /<>/geronimo-1.1.1/config-store/
>>
>> <Location "/servlets-examples/WEB-INF/">
>> AllowOverride None
>> deny from all
>> </Location>
>>
>> <Location "/jsp-examples/WEB-INF/">
>> AllowOverride None
>> deny from all
>> </Location>
>>
>> <Location "/tomcat-docs/WEB-INF/">
>> AllowOverride None
>> deny from all
>> </Location>
>>
>> ### end ###
>>
>> ### uriworkermap.properties ###
>> # URI Mappings
>>
>> /=ajp13
>> /*=ajp13
>> /*.jsp=ajp13
>>
>> /servlets-examples/=ajp13
>> /jsp-examples/=ajp13
>>
>> /servlets-examples/servlet/*=ajp13
>> /servlets-examples/*.jsp=ajp13
>> /jsp-examples/*.jsp=ajp13
>> /jsp-examples/*.jspx=ajp13
>> /jsp-examples/servlet/*=ajp13
>>
>> /jsp-examples/*.html=ajp13
>> /jsp-examples/*.htm=ajp13
>> /jsp-examples/*.png=ajp13
>> /jsp-examples/*.jpg=ajp13
>> /jsp-examples/*.jpeg=ajp13
>> /jsp-examples/*.gif=ajp13
>>
>> !/servlets-examples/*.html=ajp13
>> !/servlets-examples/*.htm=ajp13
>> !/servlets-examples/*.png=ajp13
>> !/servlets-examples/*.jpg=ajp13
>> !/servlets-examples/*.jpeg=ajp13
>> !/servlets-examples/*.gif=ajp13
>>
>> ### end ###
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
Re: JkMountFile not working
Posted by Rainer Jung <ra...@kippdata.de>.
Hi Gilberto,
automatic reloading of JkMountFile after changes happens only every 60
seconds. More precisely, if a request comes in later than 60 seconds
after the last check, mod_jk updates it's last check time and looks for
the modification time of the file. If this is more trecent, than the
modification time when it hass been loaded, it will be loaded again and
the modification time gets saved.
So the update of the mounts after the change to the file can happen any
time between immediately and 60 seconds after your changes, assuming
that requests are coming in.
If this doesn't fit your experience: are the modification times of the
file OK?
Regards,
Rainer
Gilberto E. Espinoza schrieb:
> Hi -
>
> I am running Geronimo+Tomcat (1.1.1). I have apache2 in front of it and
> I use the JkMountFile directive to map the webapp context to the apache
> server space. I am not sure that the file I use for the JkMountFile
> gets reloaded every time I update it. I do not know where to start
> troubleshooting the issue.
>
> I know my mount points work because they are mapped when I restart apache2.
>
> Below are the conf files.
>
> Thanks,
>
> ### apache mod_jk conf ###
> # Load mod_jk module
> # Update this path to match your modules location
> <IfModule !mod_jk.c>
> LoadModule jk_module /usr/lib/apache2/mod_jk.so
> </IfModule>
>
> # Declare the module for <IfModule directive> (remove this line on
> Apache 2.x)
> # AddModule mod_jk.c
>
> # Where to put jk logs
> # Update this path to match your logs directory location (put mod_jk.log
> next to access_log)
> JkLogFile /var/log/apache2/mod_jk.log
>
> # Where to find workers.properties
> JkWorkersFile /somwhere/workers.properties
>
> # Set the jk log level [debug/error/info]
> JkLogLevel debug
>
> # Select the log format
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
>
> # JkOptions indicate to send SSL KEY SIZE,
> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
>
> # JkRequestLogFormat set the request format
> JkRequestLogFormat "%w %V %T"
>
> # To automatically load the webapps
> JkAutoAlias /<>/geronimo/webapps
> JkMountFile /<>/geronimo/uriworkermap.properties
>
> # For Tomcat within Geronimo
> JkAutoAlias /<>/geronimo-1.1.1/var/catalina/work/
> JkAutoAlias /<>/geronimo-1.1.1/config-store/
>
> <Location "/servlets-examples/WEB-INF/">
> AllowOverride None
> deny from all
> </Location>
>
> <Location "/jsp-examples/WEB-INF/">
> AllowOverride None
> deny from all
> </Location>
>
> <Location "/tomcat-docs/WEB-INF/">
> AllowOverride None
> deny from all
> </Location>
>
> ### end ###
>
> ### uriworkermap.properties ###
> # URI Mappings
>
> /=ajp13
> /*=ajp13
> /*.jsp=ajp13
>
> /servlets-examples/=ajp13
> /jsp-examples/=ajp13
>
> /servlets-examples/servlet/*=ajp13
> /servlets-examples/*.jsp=ajp13
> /jsp-examples/*.jsp=ajp13
> /jsp-examples/*.jspx=ajp13
> /jsp-examples/servlet/*=ajp13
>
> /jsp-examples/*.html=ajp13
> /jsp-examples/*.htm=ajp13
> /jsp-examples/*.png=ajp13
> /jsp-examples/*.jpg=ajp13
> /jsp-examples/*.jpeg=ajp13
> /jsp-examples/*.gif=ajp13
>
> !/servlets-examples/*.html=ajp13
> !/servlets-examples/*.htm=ajp13
> !/servlets-examples/*.png=ajp13
> !/servlets-examples/*.jpg=ajp13
> !/servlets-examples/*.jpeg=ajp13
> !/servlets-examples/*.gif=ajp13
>
> ### end ###
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org