Re: 404 with mod_jk

2010-07-15 Thread Michael Powe


On Thu, Jul 15, 2010 at 01:52:17AM -0400, Michael Powe wrote:
 On Thu, Jul 15, 2010 at 02:28:52AM +0200, André Warnier wrote:
  Michael Powe wrote:
 
  To install mod_jk, I resorted to my good friend Google, and used a
  tutorial to set up the connector.  In that tutorial, the method used
  was to create a properties file (workers.properties) which set up the
  worker `worker1'.  
  ...
  I'm installing a clean version of Apache, built from httpd.apache.org
  sources, in /usr/local in order to get around all the weird (IMO)
  configuration for the version installed in Ubuntu by default.  At this
  point, I've fiddled so many things I've lost track of where I'm at.
  Sometimes, when you can't get something to work, it's best to return
  to first principles.
 
  I will not often say this, but I believe your problems may stem from the 
  above, and that you would do better by using the pre-packaged versions of 
  things (except Tomcat)
 
  1) it is hard to judge the correctness of a tutorial found on Google.
  The mod_jk instructions on the mod_jk pages of the Tomcat website are 
  pretty good, and they are at least accurate and up-to-date.
 
 True.  One of them was the `quick start for the impatient' on the
 mod_jk doc page.
  
  2) the standard Apache packages for Debian and Ubuntu are quite good, and a 
  lot easier to install and maintain than working everything out from scratch.
  I suggest the following order :
  apt-get install sun-java6-jdk
  (then Tomcat, but for Tomcat, I suggest installing it from the Tomcat site 
  distribution)
  apt-get install apache2
  apt-get install libapache2-mod-jk
  (the last 2 work out of the box and take max. 3 minutes altogether)

Well, it never rains but it pours.  After doing `sudo apt-get purge
apache2':

po...@ubuntu:~$ sudo apt-get install apache2
Reading package lists... Done
Building dependency tree   
Reading state information... Done
The following extra packages will be installed:
  apache2-mpm-worker
The following NEW packages will be installed:
  apache2 apache2-mpm-worker
0 upgraded, 2 newly installed, 0 to remove and 221 not upgraded.
Need to get 0B/3,846B of archives.
After this operation, 119kB of additional disk space will be used.
Do you want to continue [Y/n]? 
Selecting previously deselected package apache2-mpm-worker.
(Reading database ... 166454 files and directories currently
installed.)
Unpacking apache2-mpm-worker (from
.../apache2-mpm-worker_2.2.14-5ubuntu8_i386.deb) ...
Selecting previously deselected package apache2.
Unpacking apache2 (from .../apache2_2.2.14-5ubuntu8_i386.deb) ...
Setting up apache2-mpm-worker (2.2.14-5ubuntu8) ...
No apache MPM package installed

Now, the Apache installation is completely broken and will not install
properly.  That's the problem with these package systems:  no error
messages to indicate what might have gone wrong and nontrivial to
figure it out.  We'll see what they say over in ubuntu forums.  I
could shoot myself or go to bed.  I choose bed.

Thanks.

mp

-- 
Michael Powemich...@trollope.orgNaugatuck CT USA

He speaks well, he's well-read, but he's an idiot.
  -- N.D. Kalu, describing Rush Limbaugh


pgplCYZ1R46Yl.pgp
Description: PGP signature


Re: 404 with mod_jk

2010-07-15 Thread Michael Powe
Hello,

Thank you!  I did compile the module myself, wanting to be sure it was
properly compatible with my target environments.

I'll mod the code and see what new information is logged.

Thanks.

mp

On Thu, Jul 15, 2010 at 01:54:48PM +0200, Rainer Jung wrote:
 On 13.07.2010 23:17, Michael Powe wrote:
 Hello,
 
 I asked this question in the httpd list but no joy.
 
 I have set up tomcat 6 and IBM httpd server to proxy requests using
 mod_jk.
 
 IBM_HTTP_Server/6.0.2 Apache/2.0.47 (Unix) mod_jk/1.2.30 Server at
 localhost Port 80
 
 I have followed all instructions as nearly as I can make
 out.
 
 The mod_jk log shows:
 
 [Tue Jul 13 16:41:02 2010] [7639:50215792] [trace]
 map_uri_to_worker_ext::jk_uri_worker_map.c (951): enter
 [Tue Jul 13 16:41:02 2010] [7639:50215792] [debug]
 map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map
 URI '/TlTaggerTest/target.jsp' from 9 maps
 [Tue Jul 13 16:41:02 2010] [7639:50215792] [trace]
 find_match::jk_uri_worker_map.c (839): enter
 [Tue Jul 13 16:41:02 2010] [7639:50215792] [debug]
 find_match::jk_uri_worker_map.c (850): Attempting to map context URI
 '/TlTaggerTest/*.jsp=worker1' source 'JkMount'
 [Tue Jul 13 16:41:02 2010] [7639:50215792] [debug]
 find_match::jk_uri_worker_map.c (863): Found a wildchar match
 '/TlTaggerTest/*.jsp=worker1'
 [Tue Jul 13 16:41:02 2010] [7639:50215792] [trace]
 find_match::jk_uri_worker_map.c (866): exit
 [Tue Jul 13 16:41:02 2010] [7639:50215792] [trace]
 map_uri_to_worker_ext::jk_uri_worker_map.c (1065): exit
 
 The next lines should have been:
 
 ... [7639:50215792] [trace] jk_handler::mod_jk.c (2383): enter
 ... [7639:50215792] [debug] jk_handler::mod_jk.c (2462): Into handler 
 jakarta-servlet worker=worker1 r-proxyreq=0
 
 It seems there is some other module, that handles the request instead of 
 mod_jk or the handler is not set correctly. If you compiled to module 
 yourself, you can easily find out by applying a little change:
 
 2366 static int jk_handler(request_rec * r)
 2367 {
 2368 const char *worker_name;
 2369 jk_server_conf_t *xconf;
 2370 int rc, dmt = 1;
 2371
 2372 /* We do DIR_MAGIC_TYPE here to make sure TC gets all requests, 
 even
 2373  * if they are directory requests, in case there are no static 
 files
 2374  * visible to Apache and/or DirectoryIndex was not used. This 
 is only
 2375  * used when JkOptions has ForwardDirectories set. */
 2376 /* Not for me, try next handler */
 2377 if (strcmp(r-handler, JK_HANDLER)
 2378  (dmt = strcmp(r-handler, DIR_MAGIC_TYPE)))
 2379 return DECLINED;
 2380
 
 Before line 2372 add the following lines:
 
 if (JK_IS_DEBUG_LEVEL(xconf-log)) {
 jk_log(xconf-log, JK_LOG_DEBUG,
Starting jk handler, Apache thinks it should use '%s',
r-handler ? r-handler : NULL);
 }
 
 Regards,
 
 Rainer
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org

-- 
Michael Powemich...@trollope.orgNaugatuck CT USA
In every country and in every age, the priest has been hostile to
liberty.  He is always in alliance with the despot, abetting his
abuses in return for protection to his own. -- Thomas Jefferson to
Horatio G. Spafford, 1814. ME 14:119


pgpbbwaSM5eFq.pgp
Description: PGP signature


Re: 404 with mod_jk

2010-07-14 Thread Michael Powe
Hello,

Thanks again for looking at this.  Here are the log entries
corresponding to a jsp page request.

[Wed Jul 14 05:42:57 2010] [15992:48036720] [trace] 
map_uri_to_worker_ext::jk_uri_worker_map.c (951): enter
[Wed Jul 14 05:42:57 2010] [15992:48036720] [debug] 
map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI 
'/TlTaggerTest/target.jsp' from 1 maps 
[Wed Jul 14 05:42:57 2010] [15992:48036720] [trace] 
find_match::jk_uri_worker_map.c (839): enter
[Wed Jul 14 05:42:57 2010] [15992:48036720] [debug] 
find_match::jk_uri_worker_map.c (850): Attempting to map context URI 
'/TlTaggerTest/*.jsp=worker1' source 'JkMount' 
[Wed Jul 14 05:42:57 2010] [15992:48036720] [debug] 
find_match::jk_uri_worker_map.c (863): Found a wildchar match 
'/TlTaggerTest/*.jsp=worker1'
[Wed Jul 14 05:42:57 2010] [15992:48036720] [trace] 
find_match::jk_uri_worker_map.c (866): exit
[Wed Jul 14 05:42:57 2010] [15992:48036720] [trace] 
map_uri_to_worker_ext::jk_uri_worker_map.c (1065): exit
[Wed Jul 14 05:43:00 2010] [15992:48036720] [trace] 
map_uri_to_worker_ext::jk_uri_worker_map.c (951): enter
[Wed Jul 14 05:43:00 2010] [15992:48036720] [debug] 
map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI 
'/favicon.ico' from 1 maps
[Wed Jul 14 05:43:00 2010] [15992:48036720] [trace] 
find_match::jk_uri_worker_map.c (839): enter
[Wed Jul 14 05:43:00 2010] [15992:48036720] [debug] 
find_match::jk_uri_worker_map.c (850): Attempting to map context URI 
'/TlTaggerTest/*.jsp=worker1' source 'JkMount'
[Wed Jul 14 05:43:00 2010] [15992:48036720] [trace] 
find_match::jk_uri_worker_map.c (882): exit
[Wed Jul 14 05:43:00 2010] [15992:48036720] [trace] 
map_uri_to_worker_ext::jk_uri_worker_map.c (1068): exit
[Wed Jul 14 05:43:00 2010] [15992:48036720] [debug] jk_translate::mod_jk.c 
(3542): no match for /favicon.ico found
[Wed Jul 14 05:43:00 2010] [15992:48036720] [trace] 
map_uri_to_worker_ext::jk_uri_worker_map.c (951): enter
[Wed Jul 14 05:43:00 2010] [15992:48036720] [debug] 
map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI 
'/favicon.ico' from 1 maps
[Wed Jul 14 05:43:00 2010] [15992:48036720] [trace] 
find_match::jk_uri_worker_map.c (839): enter
[Wed Jul 14 05:43:00 2010] [15992:48036720] [debug] 
find_match::jk_uri_worker_map.c (850): Attempting to map context URI 
'/TlTaggerTest/*.jsp=worker1' source 'JkMount'
[Wed Jul 14 05:43:00 2010] [15992:48036720] [trace] 
find_match::jk_uri_worker_map.c (882): exit
[Wed Jul 14 05:43:00 2010] [15992:48036720] [trace] 
map_uri_to_worker_ext::jk_uri_worker_map.c (1068): exit
[Wed Jul 14 05:43:00 2010] [15992:48036720] [debug] jk_map_to_storage::mod_jk.c 
(3609): no match for /favicon.ico found

I hate top-posting but these log entries have made this email
ridiculously long; plus, I'm ssh'ed into a terminal window and some
emacs key strokes are intercepted locally, so editing is somewhat
limited. 

Thanks again.

mp

On Wed, Jul 14, 2010 at 11:09:19AM +0200, Rainer Jung wrote:
 On 14.07.2010 04:57, Michael Powe wrote:
 Hello,
 
 Thank you for the reply.
 
 See below for comments.
 
 On Wed, Jul 14, 2010 at 12:37:05AM +0200, Rainer Jung wrote:
 
 On 13.07.2010 23:17, Michael Powe wrote:
 Hello,
 
 I asked this question in the httpd list but no joy.
 
 I have set up tomcat 6 and IBM httpd server to proxy requests using
 mod_jk.
 
 IBM_HTTP_Server/6.0.2 Apache/2.0.47 (Unix) mod_jk/1.2.30 Server at
 localhost Port 80
 
 I have followed all instructions as nearly as I can make
 out.
 
 
 
 Since you already have trace logging enabled:
 
 - is this all that gets logged in the jk log file for the request?
 
 I rotated the mod_jk log and restarted the server.  I get a huge trace
 log, 33K.  It appears to me to be initializing correctly, in the sense
 that there are no error messages.
 
 - can you see your worker worker1 getting configured during startup
 (debug log messages)?
 
 [Tue Jul 13 22:21:00 2010] [12002:3987136] [trace] 
 uri_worker_map_dump::jk_uri_worker_map.c (195): exit
 [Tue Jul 13 22:21:00 2010] [12002:3987136] [trace] 
 uri_worker_map_open::jk_uri_worker_map.c (830): exit
 [Tue Jul 13 22:21:00 2010] [12002:3987136] [trace] 
 uri_worker_map_alloc::jk_uri_worker_map.c (240): exit
 [Tue Jul 13 22:21:00 2010] [12002:3987136] [debug] init_jk::mod_jk.c 
 (3112): Using fcntl() for locking.
 [Tue Jul 13 22:21:00 2010] [12002:3987136] [debug] init_jk::mod_jk.c 
 (3128): Setting default connection pool max size to 25
 [Tue Jul 13 22:21:00 2010] [12002:3987136] [debug] 
 jk_map_read_property::jk_map.c (491): Adding property 'worker.list' with 
 value 'worker1' to map.
 [Tue Jul 13 22:21:00 2010] [12002:3987136] [debug] 
 jk_map_read_property::jk_map.c (491): Adding property 
 'worker.worker1.type' with value 'ajp13' to map.
 [Tue Jul 13 22:21:00 2010] [12002:3987136] [debug] 
 jk_map_read_property::jk_map.c (491): Adding property 
 'worker.worker1.host' with value 'localhost' to map.
 [Tue Jul 13 22:21:00 2010] [12002:3987136] [debug

Re: 404 with mod_jk

2010-07-14 Thread Michael Powe
Hello,

See below.

On Wed, Jul 14, 2010 at 12:13:11PM +0200, André Warnier wrote:

 Mmmm. Taking into account all previous communications, this looks really 
 strange.  It looks as if mod_jk is being called, is finding a match with 
 its URI map, but then is not even making any attempt at contacting the 
 Tomcat worker...
 
 On the other hand, assuming that your IBM webserver is some clone of Apache 
 (which is what the configuration looks like), then I find your 
 VirtualHost section rather strange.
 One would normally expect something like
 
 Listen 80
 NameVirtualHosts *:80
 ...
 VirtualHost *:80
   ServerName localhost
 ...
 /VirtualHost
 
 I don't know if this could interfere with mod_jk, but maybe it does.
 

The VirtualHost section was created by the ApacheConfig option in
Tomcat.  It actually creates a separate mod_jk.conf file that is to be
included via an Include line, but I copied it into the httpd.conf file
because I made some modifications to the original.  That is just
because unless I disable the auto config in server.xml, the conf file
is regenerated every time Tomcat is restarted.

The modifications were to comment out the mounts I didn't want to use,
and add a DocumentRoot for local (non-jsp) files, as well as change
the JkMount directive to point only to .jsp files.

Thanks.

mp

 
 Michael Powe wrote:
 Hello,
 
 Thanks again for looking at this.  Here are the log entries
 corresponding to a jsp page request.
 
 [Wed Jul 14 05:42:57 2010] [15992:48036720] [trace] 
 map_uri_to_worker_ext::jk_uri_worker_map.c (951): enter
 [Wed Jul 14 05:42:57 2010] [15992:48036720] [debug] 
 map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI 
 '/TlTaggerTest/target.jsp' from 1 maps [Wed Jul 14 05:42:57 2010] 
 [15992:48036720] [trace] find_match::jk_uri_worker_map.c (839): enter
 [Wed Jul 14 05:42:57 2010] [15992:48036720] [debug] 
 find_match::jk_uri_worker_map.c (850): Attempting to map context URI 
 '/TlTaggerTest/*.jsp=worker1' source 'JkMount' [Wed Jul 14 05:42:57 2010] 
 [15992:48036720] [debug] find_match::jk_uri_worker_map.c (863): Found a 
 wildchar match '/TlTaggerTest/*.jsp=worker1'
 [Wed Jul 14 05:42:57 2010] [15992:48036720] [trace] 
 find_match::jk_uri_worker_map.c (866): exit
 [Wed Jul 14 05:42:57 2010] [15992:48036720] [trace] 
 map_uri_to_worker_ext::jk_uri_worker_map.c (1065): exit
 [Wed Jul 14 05:43:00 2010] [15992:48036720] [trace] 
 map_uri_to_worker_ext::jk_uri_worker_map.c (951): enter
 [Wed Jul 14 05:43:00 2010] [15992:48036720] [debug] 
 map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI 
 '/favicon.ico' from 1 maps
 [Wed Jul 14 05:43:00 2010] [15992:48036720] [trace] 
 find_match::jk_uri_worker_map.c (839): enter
 [Wed Jul 14 05:43:00 2010] [15992:48036720] [debug] 
 find_match::jk_uri_worker_map.c (850): Attempting to map context URI 
 '/TlTaggerTest/*.jsp=worker1' source 'JkMount'
 [Wed Jul 14 05:43:00 2010] [15992:48036720] [trace] 
 find_match::jk_uri_worker_map.c (882): exit
 [Wed Jul 14 05:43:00 2010] [15992:48036720] [trace] 
 map_uri_to_worker_ext::jk_uri_worker_map.c (1068): exit
 [Wed Jul 14 05:43:00 2010] [15992:48036720] [debug] jk_translate::mod_jk.c 
 (3542): no match for /favicon.ico found
 [Wed Jul 14 05:43:00 2010] [15992:48036720] [trace] 
 map_uri_to_worker_ext::jk_uri_worker_map.c (951): enter
 [Wed Jul 14 05:43:00 2010] [15992:48036720] [debug] 
 map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI 
 '/favicon.ico' from 1 maps
 [Wed Jul 14 05:43:00 2010] [15992:48036720] [trace] 
 find_match::jk_uri_worker_map.c (839): enter
 [Wed Jul 14 05:43:00 2010] [15992:48036720] [debug] 
 find_match::jk_uri_worker_map.c (850): Attempting to map context URI 
 '/TlTaggerTest/*.jsp=worker1' source 'JkMount'
 [Wed Jul 14 05:43:00 2010] [15992:48036720] [trace] 
 find_match::jk_uri_worker_map.c (882): exit
 [Wed Jul 14 05:43:00 2010] [15992:48036720] [trace] 
 map_uri_to_worker_ext::jk_uri_worker_map.c (1068): exit
 [Wed Jul 14 05:43:00 2010] [15992:48036720] [debug] 
 jk_map_to_storage::mod_jk.c (3609): no match for /favicon.ico found
 
 I hate top-posting but these log entries have made this email
 ridiculously long; plus, I'm ssh'ed into a terminal window and some
 emacs key strokes are intercepted locally, so editing is somewhat
 limited. 
 
 Thanks again.
 
 mp
 
 On Wed, Jul 14, 2010 at 11:09:19AM +0200, Rainer Jung wrote:
 On 14.07.2010 04:57, Michael Powe wrote:
 Hello,
 
 Thank you for the reply.
 
 See below for comments.
 
 On Wed, Jul 14, 2010 at 12:37:05AM +0200, Rainer Jung wrote:
 
 On 13.07.2010 23:17, Michael Powe wrote:
 Hello,
 
 I asked this question in the httpd list but no joy.
 
 I have set up tomcat 6 and IBM httpd server to proxy requests using
 mod_jk.
 
 IBM_HTTP_Server/6.0.2 Apache/2.0.47 (Unix) mod_jk/1.2.30 Server at
 localhost Port 80
 
 I have followed all instructions as nearly as I can make
 out.
 
 Since you already have trace logging enabled:
 
 - is this all that gets

Re: 404 with mod_jk

2010-07-14 Thread Michael Powe
On Wed, Jul 14, 2010 at 04:37:17PM +0200, Rainer Jung wrote:
 On 14.07.2010 14:37, Konstantin Kolinko wrote:
 2010/7/14 Michael Powemich...@trollope.org:
 VirtualHost localhost
 (...)
 #JkMount /host-manager ajp13
 #JkMount /host-manager/* ajp13
 
 JkMount /TlTaggerTest/*.jsp worker1
 /VirtualHost
 
 
 The VirtualHost section was created by the ApacheConfig option in
 Tomcat.
 
 Trivial question:  are you sure, that your worker name is correct
 (worker1 vs. ajp13).  I am curious, why Tomcat-generated
 configuration has different worker name.
 
 The auto configuration feature of Tomcat should be deprecated. It is of 
 no real use except for a trivial starter configuration. It *always* uses 
 a single worker named ajp13.
 
 Because of this feature (I guess because) mod_jk has a builtin worker 
 named ajp13, which even if no worker named ajp13 is explicitely 
 defined tries to contact localhost at 8009 if the a URL is mounted to a 
 worker named ajp13. Legacy stuff.
 
 Nevertheless, although the config the OP uses is not sufficient for 
 prime time, it should work. I didn't yet have the time to compare, where 
 exactly the log lines stop compared with a working request.

Hello,

The evolution of this process is as follows.  I am updating an Apache
module with some additional functionality.  This module is installed
in two places, one an Apache 2.0 server and the other an IBM httpd
server.  In both instances, Apache is serving pages in front of a
Tomcat server.  Additionally, the module needs to run in multiple
virtual hosts.  Therefore, I have to recreate the production design
locally, in order to be able to install my module and test my new
additions.

To install mod_jk, I resorted to my good friend Google, and used a
tutorial to set up the connector.  In that tutorial, the method used
was to create a properties file (workers.properties) which set up the
worker `worker1'.  

Failing to get that process working, I fell back to the ApacheConfig
directive, given the possibility that I might be leaving out something
simple yet critical in my `hand-rolled' method.  I just changed the
worker name back to `worker1' because I didn't want to keep fiddling
with the conf files, and `worker1' was already in place.  Really, I
just used ApacheConfig to get something to compare to my existing
setup.

I really appreciate your taking time to look at this.  It is such a
huge time-waster for me.  I'm spending more time setting up the test
environment than on my code.

I'm installing a clean version of Apache, built from httpd.apache.org
sources, in /usr/local in order to get around all the weird (IMO)
configuration for the version installed in Ubuntu by default.  At this
point, I've fiddled so many things I've lost track of where I'm at.
Sometimes, when you can't get something to work, it's best to return
to first principles.

Thanks.

mp

-- 
Michael Powemich...@trollope.orgNaugatuck CT USA


And your crybaby whiny opinion would be.?


pgpZDJceFOHaq.pgp
Description: PGP signature


Re: 404 with mod_jk

2010-07-14 Thread Michael Powe
On Thu, Jul 15, 2010 at 02:28:52AM +0200, André Warnier wrote:
 Michael Powe wrote:

 To install mod_jk, I resorted to my good friend Google, and used a
 tutorial to set up the connector.  In that tutorial, the method used
 was to create a properties file (workers.properties) which set up the
 worker `worker1'.  
 ...
 I'm installing a clean version of Apache, built from httpd.apache.org
 sources, in /usr/local in order to get around all the weird (IMO)
 configuration for the version installed in Ubuntu by default.  At this
 point, I've fiddled so many things I've lost track of where I'm at.
 Sometimes, when you can't get something to work, it's best to return
 to first principles.

 I will not often say this, but I believe your problems may stem from the 
 above, and that you would do better by using the pre-packaged versions of 
 things (except Tomcat)

 1) it is hard to judge the correctness of a tutorial found on Google.
 The mod_jk instructions on the mod_jk pages of the Tomcat website are 
 pretty good, and they are at least accurate and up-to-date.

True.  One of them was the `quick start for the impatient' on the
mod_jk doc page.
 
 2) the standard Apache packages for Debian and Ubuntu are quite good, and a 
 lot easier to install and maintain than working everything out from scratch.
 I suggest the following order :
 apt-get install sun-java6-jdk
 (then Tomcat, but for Tomcat, I suggest installing it from the Tomcat site 
 distribution)
 apt-get install apache2
 apt-get install libapache2-mod-jk
 (the last 2 work out of the box and take max. 3 minutes altogether)
 
 Then you just need to add a workers.properties file and your JkMount 
 mappings, and you'll be up and running in no time.
 
 The weird configuration things you are mentioning for Apache, are quite 
 easy to follow once you get over the initial surprise, and are actually a 
 clever way to facilitate enabling/disabling modules and virtual hosts.
 I offer to explain summarily, maybe off-list, if you have trouble there.

Well, it can't hurt for me to uninstall/reinstall to get things back
to a clean configuration.

Also, there's more to the weirdness of the Apache installation than
just the module/vh setup.  First, they've arbitrarily renamed some
elements (e.g., replaced `httpd' with `apache2' in various places),
which serves no useful purpose.  Second, `apxs' (renamed to `apxs2')
does not work correctly for compiling and installing my existing
module.  Maybe it works if you create one from scratch, I don't
know. Nor does `apachectl' (renamed to `apache2ctl').  `apache2ctl'
fails sometimes with the weird message `bad user name
${APACHE_RUN_USER}', meaning I take it that this variable is not
properly exported unless you run `/etc/init.d/apache2'.  Which only
takes `start|stop|restart|reload' for arguments.  (And setting the var
in the shell does not work.)  Third, you have files needed for
development/admin work in /etc/apache2, /var/lib/apache2 and
/usr/share/apache2 -- I mean, WTF?

For me, the summary of all that is that I installed the IBM server
into /opt and all the module-related stuff (apxs) and control stuff
(apachectl) just works.  And I'm not giving props to IBM so much as
I'm saying that the design of the installation for Ubuntu was not
intended for usage as a development package.  

/rant

I'll do as you suggest regarding the OOB installation and see where I
get.  I spent most of today working on my module, so at least I have a
feeling of progress.

Thanks.

mp 
 
-- 
Michael Powemich...@trollope.orgNaugatuck CT USA
I'll carry your books, I'll carry a tune, I'll carry on, carry over,
carry forward, Cary Grant, cash  carry, Carry Me Back To Old
Virginia, I'll even Hara Kari if you show me how, but I will *not*
carry a gun.  -- Hawkeye, M*A*S*H


pgpA74AJDIOI1.pgp
Description: PGP signature


404 with mod_jk

2010-07-13 Thread Michael Powe
Hello,

I asked this question in the httpd list but no joy.

I have set up tomcat 6 and IBM httpd server to proxy requests using
mod_jk.  

IBM_HTTP_Server/6.0.2 Apache/2.0.47 (Unix) mod_jk/1.2.30 Server at
localhost Port 80

I have followed all instructions as nearly as I can make
out. 

The mod_jk log shows:

[Tue Jul 13 16:41:02 2010] [7639:50215792] [trace]
map_uri_to_worker_ext::jk_uri_worker_map.c (951): enter
[Tue Jul 13 16:41:02 2010] [7639:50215792] [debug]
map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map
URI '/TlTaggerTest/target.jsp' from 9 maps
[Tue Jul 13 16:41:02 2010] [7639:50215792] [trace]
find_match::jk_uri_worker_map.c (839): enter
[Tue Jul 13 16:41:02 2010] [7639:50215792] [debug]
find_match::jk_uri_worker_map.c (850): Attempting to map context URI
'/TlTaggerTest/*.jsp=worker1' source 'JkMount'
[Tue Jul 13 16:41:02 2010] [7639:50215792] [debug]
find_match::jk_uri_worker_map.c (863): Found a wildchar match
'/TlTaggerTest/*.jsp=worker1'
[Tue Jul 13 16:41:02 2010] [7639:50215792] [trace]
find_match::jk_uri_worker_map.c (866): exit
[Tue Jul 13 16:41:02 2010] [7639:50215792] [trace]
map_uri_to_worker_ext::jk_uri_worker_map.c (1065): exit

The Apache access log shows:

localhost - - [13/Jul/2010:16:41:02 -0400] GET
/TlTaggerTest/target.jsp  404 332 - Mozilla/5.0 (X11; U; Linux
i686; en-US; rv:1.9.2.3) Gecko/20100423 Ubuntu/10.04 (lucid)
Firefox/3.6.3 -

No indication on the Tomcat side of any activity.

The ajp13 connector is enabled.  Both mod_jk and ajp13 connector are
on port 8009.

The files are available directly from Tomcat through port 8080.

The local files (in htdocs) are properly served.

localhost - - [13/Jul/2010:16:58:01 -0400] GET
/TlTaggerTest/target.html  200 67 - Mozilla/5.0 (X11; U; Linux
i686; en-US; rv:1.9.2.3) Gecko/20100423 Ubuntu/10.04 (lucid)
Firefox/3.6.3 -

I sure would appreciate any pointers for troubleshooting or
resolution. 

Thanks.

mp

-- 
Michael Powemich...@trollope.orgNaugatuck CT USA


47.3% of all statistics are made up on the spot. - Steven Wright


pgpqpMwrTG7dh.pgp
Description: PGP signature


Re: 404 with mod_jk

2010-07-13 Thread Michael Powe
Hello,

Thank you for the reply.

See below for comments.

On Wed, Jul 14, 2010 at 12:37:05AM +0200, Rainer Jung wrote:

 On 13.07.2010 23:17, Michael Powe wrote:
 Hello,
 
 I asked this question in the httpd list but no joy.
 
 I have set up tomcat 6 and IBM httpd server to proxy requests using
 mod_jk.
 
 IBM_HTTP_Server/6.0.2 Apache/2.0.47 (Unix) mod_jk/1.2.30 Server at
 localhost Port 80
 
 I have followed all instructions as nearly as I can make
 out.
 

 
 Since you already have trace logging enabled:
 
 - is this all that gets logged in the jk log file for the request?

I rotated the mod_jk log and restarted the server.  I get a huge trace
log, 33K.  It appears to me to be initializing correctly, in the sense
that there are no error messages.  
 
 - can you see your worker worker1 getting configured during startup
 (debug log messages)?

[Tue Jul 13 22:21:00 2010] [12002:3987136] [trace] 
uri_worker_map_dump::jk_uri_worker_map.c (195): exit
[Tue Jul 13 22:21:00 2010] [12002:3987136] [trace] 
uri_worker_map_open::jk_uri_worker_map.c (830): exit
[Tue Jul 13 22:21:00 2010] [12002:3987136] [trace] 
uri_worker_map_alloc::jk_uri_worker_map.c (240): exit
[Tue Jul 13 22:21:00 2010] [12002:3987136] [debug] init_jk::mod_jk.c (3112): 
Using fcntl() for locking.
[Tue Jul 13 22:21:00 2010] [12002:3987136] [debug] init_jk::mod_jk.c (3128): 
Setting default connection pool max size to 25
[Tue Jul 13 22:21:00 2010] [12002:3987136] [debug] 
jk_map_read_property::jk_map.c (491): Adding property 'worker.list' with value 
'worker1' to map.
[Tue Jul 13 22:21:00 2010] [12002:3987136] [debug] 
jk_map_read_property::jk_map.c (491): Adding property 'worker.worker1.type' 
with value 'ajp13' to map.
[Tue Jul 13 22:21:00 2010] [12002:3987136] [debug] 
jk_map_read_property::jk_map.c (491): Adding property 'worker.worker1.host' 
with value 'localhost' to map.
[Tue Jul 13 22:21:00 2010] [12002:3987136] [debug] 
jk_map_read_property::jk_map.c (491): Adding property 'worker.worker1.port' 
with value '8009' to map.
[Tue Jul 13 22:21:00 2010] [12002:3987136] [trace] 
jk_map_resolve_references::jk_map.c (766): enter 
[Tue Jul 13 22:21:00 2010] [12002:3987136] [debug] 
jk_map_resolve_references::jk_map.c (774): Checking for references with prefix 
worker. with wildcard (recursion 1)
[Tue Jul 13 22:21:00 2010] [12002:3987136] [trace] 
jk_map_resolve_references::jk_map.c (830): exit
[Tue Jul 13 22:21:00 2010] [12002:3987136] [trace] 
jk_shm_calculate_size::jk_shm.c (97): enter
[Tue Jul 13 22:21:00 2010] [12002:3987136] [debug] 
jk_shm_calculate_size::jk_shm.c (132): shared memory will contain 1 ajp workers 
of size 256 and 0 lb workers of size 320 with 0 members of size 320+256
[Tue Jul 13 22:21:00 2010] [12002:3987136] [trace] 
jk_shm_calculate_size::jk_shm.c (139): exit

[ ... ]

[Tue Jul 13 22:21:00 2010] [12002:3987136] [trace] wc_open::jk_worker.c (50): 
enter
[Tue Jul 13 22:21:00 2010] [12002:3987136] [debug] jk_map_dump::jk_map.c (589): 
Dump of map: 'ServerRoot' - '/opt/IBMIHS'
[Tue Jul 13 22:21:00 2010] [12002:3987136] [debug] jk_map_dump::jk_map.c (589): 
Dump of map: 'worker.list' - 'worker1'
[Tue Jul 13 22:21:00 2010] [12002:3987136] [debug] jk_map_dump::jk_map.c (589): 
Dump of map: 'worker.worker1.type' - 'ajp13'
[Tue Jul 13 22:21:00 2010] [12002:3987136] [debug] jk_map_dump::jk_map.c (589): 
Dump of map: 'worker.worker1.host' - 'localhost'
[Tue Jul 13 22:21:00 2010] [12002:3987136] [debug] jk_map_dump::jk_map.c (589): 
Dump of map: 'worker.worker1.port' - '8009'
[Tue Jul 13 22:21:00 2010] [12002:3987136] [trace] 
build_worker_map::jk_worker.c (236): enter
[Tue Jul 13 22:21:00 2010] [12002:3987136] [debug] 
build_worker_map::jk_worker.c (242): creating worker worker1
[Tue Jul 13 22:21:00 2010] [12002:3987136] [trace] 
wc_create_worker::jk_worker.c (126): enter
[Tue Jul 13 22:21:00 2010] [12002:3987136] [debug] 
wc_create_worker::jk_worker.c (146): about to create instance worker1 of ajp13
[Tue Jul 13 22:21:00 2010] [12002:3987136] [trace] 
ajp13_worker_factory::jk_ajp13_worker.c (80): enter
[Tue Jul 13 22:21:00 2010] [12002:3987136] [trace] 
ajp_worker_factory::jk_ajp_common.c (2892): enter
[Tue Jul 13 22:21:00 2010] [12002:3987136] [trace] 
ajp_worker_factory::jk_ajp_common.c (2934): exit
[Tue Jul 13 22:21:00 2010] [12002:3987136] [trace] 
ajp13_worker_factory::jk_ajp13_worker.c (92): exit
[Tue Jul 13 22:21:00 2010] [12002:3987136] [debug] 
wc_create_worker::jk_worker.c (159): about to validate and init worker1
[Tue Jul 13 22:21:00 2010] [12002:3987136] [trace] validate::jk_ajp13_worker.c 
(35): enter
[Tue Jul 13 22:21:00 2010] [12002:3987136] [trace] 
ajp_validate::jk_ajp_common.c (2579): enter
[Tue Jul 13 22:21:00 2010] [12002:3987136] [debug] 
ajp_validate::jk_ajp_common.c (2605): worker worker1 contact is 'localhost:8009'
[Tue Jul 13 22:21:00 2010] [12002:3987136] [trace] jk_resolve::jk_connect.c 
(329): enter
[Tue Jul 13 22:21:00 2010] [12002:3987136] [trace] jk_resolve::jk_connect.c 
(406): exit
[Tue Jul 13 22:21:00

Request Processing by Apache httpd for Tomcat

2010-07-12 Thread Michael Powe
Hello,

I am working on an Apache module.  The module is installed in an
Apache http server that handles requests for a Tomcat server.  When
requests come from a mobile device, the jsessionid parameter is
appended to the URI in the usual manner, e.g.

/i/n_my_page.jsp;jsessionid=123adsfadsfsadf

The above is how the URI appears in the apache server log file.

My question is, Is this how the URI is stored in the request_rec
object?  I need to apply some logic based on the value of the URI
stored in request_rec, so I want to be sure I understand how this
value is created when Apache is running in front of Tomcat.

Thanks for any help.

mp

-- 
Michael Powemich...@trollope.orgNaugatuck CT USA


 Which is worse: ignorance or apathy?  Who knows?  Who cares?


pgpdTmppkN8G1.pgp
Description: PGP signature


Re: Is it possible to delete a jar file from ../WEB-INF/lib when Tomcat is running?

2010-03-04 Thread Michael Powe
On Thu, Mar 04, 2010 at 06:26:50PM +0530, Chinmoy Chakraborty wrote:

 Actually I want to update the jar with the latest one inside 'lib'...and
 want to make our app hot-updatable. what would be a good idea for that?

Hello,

See: 

http://tomcat.apache.org/tomcat-5.5-doc/config/context.html 
 
in particular, the section on antiResourceLocking.  Note the caveats.

Otherwise, undeploy the app, update your jars, and redeploy.  

Thanks.

mp

 On Thu, Mar 4, 2010 at 5:23 PM, Pid p...@pidster.com wrote:
 
  On 04/03/2010 10:53, Chinmoy Chakraborty wrote:
 
  Hi All,
 
  Is it possible to delete a jar file from ../WEB-INF/lib when Tomcat is
  running? I tried to delete the jar from 'lib' after putting following
  entry
  in catalina.policy:
 
 
  It might be possible, but it would be a *very* bad idea.
 
 
   grant codeBase file:${catalina.home}/webapps/abcd/WEB-INF/lib {
  permission java.io.FilePermission read, write, delete;
  };
 
  but it was giving following error:
 
   java.io.FileNotFoundException:
  C:\AppServer\Tomcat\apache-tomcat-6.0.10\webapps\
  abcd\WEB-INF\lib (Access is denied)...
 
 
  Guess not then.
 
  Is it smart for the application to try and delete it's own jar files?
 
 
  p
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 

-- 
Michael Powemich...@trollope.orgNaugatuck CT USA

 Any fool can paint a picture, but it takes a wise person to be able to
 sell it.


pgpkStMKn1dbz.pgp
Description: PGP signature