users@glassfish.java.net

Re: Urgent problem with apache mod_jk and glassfish 3.01

From: <forums_at_java.net>
Date: Wed, 13 Jul 2011 08:32:09 -0500 (CDT)

Amy,

With hindsight my post wasn't very helpful so will try and fill the gaps
here.

After failing miserably with this I did get mod_proxy to work, and feed tah
requests from apache to glassfish and that worked. My requirement is too have
the SSl certificates on the apache server and then just server teh app itself
from glassfish. In your opinion does mod_jk offer anything that mod_proxy
doesn't?

Many thanks for your help!

Here are my config details:-

I have tried both Glassfish 3.01 and 3.1 , both with the same results. Ad
afar as I am aware I am not using a glassfish-jk.properties file

I am linking Apache using the following config:-

httpd.conf

#for glassfish integration
LoadModule    jk_module  modules/mod_jk.so

 JkMount /BordereauxPortal/* worker1
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"

my workers properties file is:-

worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009

my mod_jk.log file looks like this after attempting to connect:-

Jul 12 19:41:46 2011] [4936:4084] [debug]
map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI
'/BordereauxPortal/pages/login.jsf' from 1 maps
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
find_match::jk_uri_worker_map.c (850): Attempting to map context URI
'/BordereauxPortal/*=worker1' source 'JkMount'
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
find_match::jk_uri_worker_map.c (863): Found a wildchar match
'/BordereauxPortal/*=worker1'
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug] jk_handler::mod_jk.c (2522):
Into handler jakarta-servlet worker=worker1 r->proxyreq=0
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
wc_get_worker_for_name::jk_worker.c (116): found a worker worker1
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug] wc_maintain::jk_worker.c
(339): Maintaining worker worker1
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
wc_get_name_for_type::jk_worker.c (293): Found worker type 'ajp13'
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug] init_ws_service::mod_jk.c
(1024): Service protocol=HTTP/1.1 method=GET ssl=false host=(null)
addr=127.0.0.1 name=localhost port=80 auth=(null) user=(null) laddr=127.0.0.1
raddr=127.0.0.1 uri=/BordereauxPortal/pages/login.jsf
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_get_endpoint::jk_ajp_common.c (3161): acquired connection pool slot=0
after 0 retries
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_marshal_into_msgb::jk_ajp_common.c (647): ajp marshaling done
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug] ajp_service::jk_ajp_common.c
(2440): processing worker1 with 2 retries
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
jk_shutdown_socket::jk_connect.c (731): About to shutdown socket 772
[127.0.0.1:4888 -> 127.0.0.1:8009]
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
jk_shutdown_socket::jk_connect.c (802): shutting down the read side of socket
772 [127.0.0.1:4888 -> 127.0.0.1:8009]
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
jk_shutdown_socket::jk_connect.c (813): Shutdown socket 772 [127.0.0.1:4888
-> 127.0.0.1:8009] and read 0 lingering bytes in 0 sec.
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_send_request::jk_ajp_common.c (1548): (worker1) failed sending request,
socket 772 is not connected any more (errno=-10000)
[Tue Jul 12 19:41:46 2011] [4936:4084] [info]
ajp_send_request::jk_ajp_common.c (1619): (worker1) all endpoints are
disconnected, detected by connect check (1), cping (0), send (0)
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug] jk_open_socket::jk_connect.c
(484): socket TCP_NODELAY set to On
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug] jk_open_socket::jk_connect.c
(608): trying to connect socket 772 to 127.0.0.1:8009
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug] jk_open_socket::jk_connect.c
(634): socket 772 [127.0.0.1:4891 -> 127.0.0.1:8009] connected
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): sending to ajp13
pos=4 len=757 max=8192
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0000    12 34 02
F1 02 02 00 08 48 54 54 50 2F 31 2E 31  - .4......HTTP/1.1
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0010    00 00 21
2F 42 6F 72 64 65 72 65 61 75 78 50 6F  - ..!/BordereauxPo
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0020    72 74 61
6C 2F 70 61 67 65 73 2F 6C 6F 67 69 6E  - rtal/pages/login
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0030    2E 6A 73
66 00 00 09 31 32 37 2E 30 2E 30 2E 31  - .jsf...127.0.0.1
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0040    00 FF FF
00 09 6C 6F 63 61 6C 68 6F 73 74 00 00  - .....localhost..
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0050    50 00 00
09 A0 01 00 A3 69 6D 61 67 65 2F 67 69  - P.......image/gi
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0060    66 2C 20
69 6D 61 67 65 2F 78 2D 78 62 69 74 6D  - f,.image/x-xbitm
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0070    61 70 2C
20 69 6D 61 67 65 2F 6A 70 65 67 2C 20  - ap,.image/jpeg,.
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0080    69 6D 61
67 65 2F 70 6A 70 65 67 2C 20 61 70 70  - image/pjpeg,.app
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0090    6C 69 63
61 74 69 6F 6E 2F 78 2D 6D 73 2D 61 70  - lication/x-ms-ap
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 00a0    70 6C 69
63 61 74 69 6F 6E 2C 20 61 70 70 6C 69  - plication,.appli
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 00b0    63 61 74
69 6F 6E 2F 78 2D 6D 73 2D 78 62 61 70  - cation/x-ms-xbap
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 00c0    2C 20 61
70 70 6C 69 63 61 74 69 6F 6E 2F 76 6E  - ,.application/vn
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 00d0    64 2E 6D
73 2D 78 70 73 64 6F 63 75 6D 65 6E 74  - d.ms-xpsdocument
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 00e0    2C 20 61
70 70 6C 69 63 61 74 69 6F 6E 2F 78 61  - ,.application/xa
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 00f0    6D 6C 2B
78 6D 6C 2C 20 2A 2F 2A 00 00 0F 41 63  - ml+xml,.*/*...Ac
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0100    63 65 70
74 2D 4C 61 6E 67 75 61 67 65 00 00 05  - cept-Language...
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0110    65 6E 2D
67 62 00 00 06 55 41 2D 43 50 55 00 00  - en-gb...UA-CPU..
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0120    03 78 38
36 00 00 0F 41 63 63 65 70 74 2D 45 6E  - .x86...Accept-En
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0130    63 6F 64
69 6E 67 00 00 0D 67 7A 69 70 2C 20 64  - coding...gzip,.d
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0140    65 66 6C
61 74 65 00 A0 0E 00 85 4D 6F 7A 69 6C  - eflate.....Mozil
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0150    6C 61 2F
34 2E 30 20 28 63 6F 6D 70 61 74 69 62  - la/4.0.(compatib
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0160    6C 65 3B
20 4D 53 49 45 20 37 2E 30 3B 20 57 69  - le;.MSIE.7.0;.Wi
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0170    6E 64 6F
77 73 20 4E 54 20 35 2E 32 3B 20 2E 4E  - ndows.NT.5.2;..N
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0180    45 54 20
43 4C 52 20 31 2E 31 2E 34 33 32 32 3B  - ET.CLR.1.1.4322;
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0190    20 2E 4E
45 54 20 43 4C 52 20 32 2E 30 2E 35 30  - ..NET.CLR.2.0.50
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 01a0    37 32 37
3B 20 2E 4E 45 54 20 43 4C 52 20 33 2E  - 727;..NET.CLR.3.
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 01b0    30 2E 34
35 30 36 2E 32 31 35 32 3B 20 2E 4E 45  - 0.4506.2152;..NE
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 01c0    54 20 43
4C 52 20 33 2E 35 2E 33 30 37 32 39 29  - T.CLR.3.5.30729)
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 01d0    00 A0 0B
00 09 6C 6F 63 61 6C 68 6F 73 74 00 A0  - .....localhost..
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 01e0    06 00 0A
4B 65 65 70 2D 41 6C 69 76 65 00 A0 09  - ...Keep-Alive...
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 01f0    00 CB 4A
53 45 53 53 49 4F 4E 49 44 3D 34 33 63  - ..JSESSIONID=43c
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0200    35 30 38
65 39 34 35 30 38 33 30 35 65 34 33 64  - 508e94508305e43d
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0210    33 66 36
33 63 31 64 31 65 3B 20 74 72 65 65 46  - 3f63c1d1e;.treeF
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0220    6F 72 6D
3A 74 72 65 65 2D 68 69 3D 74 72 65 65  - orm:tree-hi=tree
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0230    46 6F 72
6D 3A 74 72 65 65 3A 63 6F 6E 66 69 67  - Form:tree:config
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0240    75 72 61
74 69 6F 6E 3A 6E 65 74 77 6F 72 6B 43  - uration:networkC
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0250    6F 6E 66
69 67 3A 70 72 6F 74 6F 63 6F 6C 73 3A  - onfig:protocols:
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0260    61 6D 78
70 70 64 6F 6D 61 69 6E 63 6F 6E 66 69  - amxppdomainconfi
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0270    67 73 63
6F 6E 66 69 67 73 65 72 76 65 72 2D 63  - gsconfigserver-c
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0280    6F 6E 66
69 67 6E 65 74 77 6F 72 6B 2D 63 6F 6E  - onfignetwork-con
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 0290    66 69 67
70 72 6F 74 6F 63 6F 6C 73 74 79 70 65  - figprotocolstype
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 02a0    70 72 6F
74 6F 63 6F 6C 6E 61 6D 65 6A 6B 2D 63  - protocolnamejk-c
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 02b0    6F 6E 6E
65 63 74 6F 72 2D 38 30 30 39 00 A0 08  - onnector-8009...
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 02c0    00 01 30
00 0A 00 0F 41 4A 50 5F 52 45 4D 4F 54  - ..0....AJP_REMOT
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 02d0    45 5F 50
4F 52 54 00 00 04 34 38 39 30 00 0A 00  - E_PORT...4890...
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 02e0    10 4A 4B
5F 4C 42 5F 41 43 54 49 56 41 54 49 4F  - .JK_LB_ACTIVATIO
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1195): 02f0    4E 00 FF
FF FF 00 00 00 00 00 00 00 00 00 00 00  - N...............
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_send_request::jk_ajp_common.c (1684): (worker1) request body to send 0 -
request body to resend 0
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1381): received from ajp13
pos=0 len=19 max=8192
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1381): 0000    04 01 90
00 0B 42 61 64 20 52 65 71 75 65 73 74  - .....Bad.Request
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1381): 0010    00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00  - ................
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_unmarshal_response::jk_ajp_common.c (702): status = 400
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_unmarshal_response::jk_ajp_common.c (709): Number of headers is = 0
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1381): received from ajp13
pos=0 len=2 max=8192
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1381): 0000    05 01 00
00 00 00 00 00 00 00 00 00 00 00 00 00  - ................
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_process_callback::jk_ajp_common.c (2003): AJP13 protocol: Reuse is OK
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug]
ajp_reset_endpoint::jk_ajp_common.c (807): (worker1) resetting endpoint with
socket 772
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug] ajp_done::jk_ajp_common.c
(3078): recycling connection pool slot=0 for worker worker1
[Tue Jul 12 19:41:46 2011] worker1 localhost 0.000000
[Tue Jul 12 19:41:46 2011] [4936:4084] [debug] jk_handler::mod_jk.c (2662):
Service finished with status=400 for worker=worker1
 

 


--
[Message sent by forum member 'oidsman']
View Post: http://forums.java.net/node/821526