You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Nicolas Clemeur <nc...@daesim.com> on 2007/11/02 14:06:57 UTC

mod_jk problem for post request ended with a ? (question mark)

Hello all,

I have apache 2.2 in front of tomcat 6.0.13 and I use mod_jk (1.2.25)
as the connector.

It seems that whenever a form containing a question mark at the end of 
the form action parameter is posted,  mod_jk is dying silently (but recover) 
(The resulting url is something like that /mysite/action.do? ).
 No response at all is sent to the client.

Is this something known or is only me experiencing that problem. I know
that the url should not really containts the ending "?", but I can't 
control that.

Cheers

Nicolas


---------------------------------------------------------------------
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


[SOLVED] Re: mod_jk problem for post request ended with a ? (question mark)

Posted by Nicolas Clemeur <nc...@daesim.com>.
Thanks again Rainer for guiding me toward the core/gdb/stacktrace approach. 
After managing to get a meaningfull stacktrace (using gdb httpd core_file)
it was easy to see that the problem was NOT in mod_jk but in another
module (mod_auth_cas). I'll report this problem to them.

Best regards,

Nicolas




---------------------------------------------------------------------
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: mod_jk problem for post request ended with a ? (question mark)

Posted by Nicolas Clemeur <nc...@daesim.com>.
> 
> Your test JSP works fine for me with Apache httpd 2.2.6 and mod_jk
> 1.2.25 on Solaris. Since your jk log file ends very early in the request
> processing, the tomcat version should not matter (I used 5.5).
> 
> I would guess, that something with your build is broken. It would also
> help, if we could see your mod_jk config (you posted parts of it, but it
> looks like things are missing).

The apache mod_jk configuration is this one. Would you need the 
workers.properties?

LoadModule jk_module modules/mod_jk.so

<IfModule mod_jk.c>
    JkWorkersFile /etc/httpd/conf.d/workers.properties
    JkLogFile /var/log/httpd/mod_jk.log
    JkLogLevel debug
    JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
    JkOptions     +ForwardKeySize
    JkMount /app/* ajp13
    JkMount /app ajp13
</IfModule>


These are the exact steps I have taken to build mod_jk:
./configure --enable-debug --with-apxs=/usr/sbin/apxs
make clean
make

and then as root
make install
 
> Does the segmentation fault produce a core dump?
> If no, start Apache httpd as a non-root user (and use ports above 1024)
> and maybe set CoreDumpDirectory. Then it should produce a core, whenever
> a segmentation fault appears in the log file.
> 
> A core can then be inspected with gdb. Using gdb you can issue the
> command "bt" for backtrace. This will show us, in which mod_jk function
> the crash occured.

I managed to produce a core, but it does not look like there are
 any debugging info available. When I run the bt command 
(using gdb -c /path/to_core), have the following:

Using host libthread_db library "/lib/libthread_db.so.1".
Core was generated by `/usr/sbin/httpd'.
Program terminated with signal 11, Segmentation fault.
#0  0x0068dbf2 in ?? ()
(gdb) bt
#0  0x0068dbf2 in ?? ()
#1  0x08506478 in ?? ()
#2  0x0068fb6a in ?? ()
#3  0xbfc5b04c in ?? ()
#4  0x00000000 in ?? ()

Would that mean the problem is not in mod_jk, or would that mean 
I did not compile mod_jk in debug mode?

Thanks again for your help.

Best regards,

Nicolas







---------------------------------------------------------------------
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: mod_jk problem for post request ended with a ? (question mark)

Posted by Rainer Jung <ra...@kippdata.de>.
Your test JSP works fine for me with Apache httpd 2.2.6 and mod_jk
1.2.25 on Solaris. Since your jk log file ends very early in the request
processing, the tomcat version should not matter (I used 5.5).

I would guess, that something with your build is broken. It would also
help, if we could see your mod_jk config (you posted parts of it, but it
looks like things are missing).

Does the segmentation fault produce a core dump?
If no, start Apache httpd as a non-root user (and use ports above 1024)
and maybe set CoreDumpDirectory. Then it should produce a core, whenever
a segmentation fault appears in the log file.

A core can then be inspected with gdb. Using gdb you can issue the
command "bt" for backtrace. This will show us, in which mod_jk function
the crash occured.

Regards,

Rainer


Nicolas Clemeur schrieb:
> I forgot to mention that the request is sent over https. 
> The https is handled by apache httpd. I am not sure If this has an impact
> as it would be difficult for me to test it under http.
> 
> Cheers
> 
> Nicolas

---------------------------------------------------------------------
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: mod_jk problem for post request ended with a ? (question mark)

Posted by Nicolas Clemeur <nc...@daesim.com>.
I forgot to mention that the request is sent over https. 
The https is handled by apache httpd. I am not sure If this has an impact
as it would be difficult for me to test it under http.

Cheers

Nicolas


---------------------------------------------------------------------
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: mod_jk problem for post request ended with a ? (question mark)

Posted by Nicolas Clemeur <nc...@daesim.com>.
Thank you Rainer for taking the time to answer. My comments are below.

> 
> Not a known problem. You can increase log level via "JkLogLevel debug". 
> There should be a line containing "service" or "Service", which includes 
> the URI) we send forward to Tomcat.
> 
> The log will also show you, if any of your JkMount directives match, 
> i.e. if mod_jk thinks it should forward, or it shouldn't.

I have set the log level to debug and when I submit that form the 
only think I can see in the mod_jk log are the following lines:

Mod jk
[Sat Nov 03 11:00:34 2007] [1936:3085977296] [debug]
 map_uri_to_worker::jk_uri_worker_map.c (609): 
Attempting to map context URI '/app/*=ajp13' source 'JkMount'
[Sat Nov 03 11:00:34 2007] [1936:3085977296] [debug]
 map_uri_to_worker::jk_uri_worker_map.c (624): 
Found a wildchar match '/app/*=ajp13'

And then nothing else. Interestingly, at the same time of the request,
in the error log of apache, I always have the following:

[Sat Nov 03 11:00:34 2007] [notice] 
child pid 1936 exit signal Segmentation fault (11)

On successful requests, I indeed observe the "Service finished "
with the status.
 
> You can report your findings back here, but please include configuration 
> used, and some more details, like how exactly does the problematic URL 
> look like.

Sorry, I did not give enough details. So I just create a simple jsp 
to reproduce the problem. If I submit the jsp below 
(which name should be test.jsp), I never receive a response back 
from the server.

(Actually I could observe that the problem is not necessarily linked
 to the post method. You can reproduce it with a get method if there
 are no input in the form.)

I am running httpd 2.2.3 on CentOS 5. I have compiled my-self mod_jk 
as the instruction in the BUILD.txt. Mod_jk is talking to tomcat 6.0.13.


--BEGIN JSP
<%@ page language="java" %>
<html>
<head><title>Test</title></title>
<body>
<br />
<form action="test.jsp?" method="post">
<input type="submit" />
</form>
</body>
--END JSP






---------------------------------------------------------------------
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: mod_jk problem for post request ended with a ? (question mark)

Posted by Rainer Jung <ra...@kippdata.de>.
Not a known problem. You can increase log level via "JkLogLevel debug". 
There should be a line containing "service" or "Service", which includes 
the URI) we send forward to Tomcat.

The log will also show you, if any of your JkMount directives match, 
i.e. if mod_jk thinks it should forward, or it shouldn't.

You can report your findings back here, but please include configuration 
used, and some more details, like how exactly does the problematic URL 
look like.

Regards,

Rainer

Nicolas Clemeur wrote:
> Hello all,
> 
> I have apache 2.2 in front of tomcat 6.0.13 and I use mod_jk (1.2.25)
> as the connector.
> 
> It seems that whenever a form containing a question mark at the end of 
> the form action parameter is posted,  mod_jk is dying silently (but recover) 
> (The resulting url is something like that /mysite/action.do? ).
>  No response at all is sent to the client.
> 
> Is this something known or is only me experiencing that problem. I know
> that the url should not really containts the ending "?", but I can't 
> control that.
> 
> Cheers
> 
> Nicolas

---------------------------------------------------------------------
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