users@glassfish.java.net

Re: Apache Glassfish and mod_jk

From: Amy Roh <Amelia.Roh_at_Sun.COM>
Date: Mon, 18 Sep 2006 14:04:21 -0700

Martyn wrote:
> Hi Amy,
> What I found is that when I just start glassfish v1 build 48 it seems to
> ignore the jvm options for enableJK, now if I log in to the web admin GUI
> It then loads it and all works as expected, Even if I log out once it is
> loaded it is ok.

Have you restarted GlassFish after adding the jvm option to enableJK?
You need to restart GlassFish in order for the jvm option to work.

> I have another question for you it seems that setting this up on Linux there
> does not seem to be a mod_jk version for apache 2.2.x so I can not get it to
> work on Linux setup, I am led to believe that the mod_proxy_ajp module
> replaces this even though you can get one for windows system. Reading your
> blog, where you write that it is now possible to configure AJP Connector in
> glassfish with parameters kept in file glassfish-jk.properties
> Would this have anything to do with the proxy_ajp? Or does this just add
> extra parameters.

The jvm option 'com.sun.enterprise.web.connector.enableJK.propertyFile'
allows you to configure the AJP 1.3 protocol. You can see
configuration attributes from
http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html.

Thanks,
Amy

>
> Kind regards Chainy.
>
> -----Original Message-----
> From: Amelia.Roh_at_Sun.COM [mailto:Amelia.Roh_at_Sun.COM]
> Sent: 18 September 2006 19:37
> To: users_at_glassfish.dev.java.net
> Subject: Re: Apache Glassfish and mod_jk
>
> Hi Chainy,
>
> Which GlassFish build are you using? I just tried on Win XP with
> GlassFish v1 and it works as expected.
>
> Thanks,
> Amy
>
> Martyn wrote:
>
>>Hi
>>
>>I am new to glassfish and I would like to use the mod_jk with apache and
>>glassfish. Although I have followed the instructions on setting this up
>>I can not get the correct results. I have read all I can find in the
>>list archives but none have resolved the problem for me. When I request
>>the page it seems if apache is passing on the reqest but I just get a
>>blank page with no code in the source at all. On viewing the server log
>>for glassfish I find this:
>>
>>
>>
>>
>>
>>
>
> [#|2006-09-16T03:44:13.109+0100|INFO|sun-appserver-pe9.1|org.apache.jk.serve
> r.JkMain|_ThreadID=11;_ThreadName=Thread-4;|Can't
>
>>find home, jk2.properties not loaded|#]
>>
>>
>>
>>
>
> [#|2006-09-16T03:44:13.109+0100|INFO|sun-appserver-pe9.1|org.apache.jk.commo
> n.ChannelSocket|_ThreadID=11;_ThreadName=Thread-4;|JK:
>
>>ajp13 listening on /0.0.0.0:8009|#]
>>
>>
>>
>>
>
> [#|2006-09-16T03:44:13.140+0100|INFO|sun-appserver-pe9.1|org.apache.jk.serve
> r.JkMain|_ThreadID=11;_ThreadName=Thread-4;|Jk
>
>>running ID=0 time=0/47 config=null|#]
>>
>>
>>
>>And In the mod_jk log I have this
>>
>>
>>
>>[Sat Sep 16 03:43:18 2006] [3260:4108] [debug] jk_uri_worker_map.c
>>(508): Attempting to map URI '/mypage.jsp' from 2 maps
>>
>>[Sat Sep 16 03:43:18 2006] [3260:4108] [debug] jk_uri_worker_map.c
>>(520): Attempting to map context URI '/glassfish-test/*'
>>
>>[Sat Sep 16 03:43:18 2006] [3260:4108] [debug] jk_uri_worker_map.c
>>(520): Attempting to map context URI '/*.jsp'
>>
>>[Sat Sep 16 03:43:18 2006] [3260:4108] [debug] jk_uri_worker_map.c
>>(534): Found a wildchar match worker1 -> /*.jsp
>>
>>[Sat Sep 16 03:43:18 2006] [3260:4108] [debug] mod_jk.c (1832): Into
>>handler jakarta-servlet worker=worker1 r->proxyreq=0
>>
>>[Sat Sep 16 03:43:18 2006] [3260:4108] [debug] jk_worker.c (111): found
>>a worker worker1
>>
>>[Sat Sep 16 03:43:18 2006] [3260:4108] [debug] mod_jk.c (531): Service
>>protocol=HTTP/1.1 method=GET host=(null) addrr=192.168.0.3 name=stompy
>>port=80 auth=(null) user=(null) laddr=192.168.0.3 raddr=192.168.0.3
>>
>>[Sat Sep 16 03:43:18 2006] [3260:4108] [debug] jk_ajp_common.c (2164):
>>acquired connection pool slot=0
>>
>>[Sat Sep 16 03:43:18 2006] [3260:4108] [debug] jk_ajp_common.c (566):
>>ajp marshaling done
>>
>>[Sat Sep 16 03:43:18 2006] [3260:4108] [debug] jk_ajp_common.c (1698):
>>processing worker1 with 2 retries
>>
>>[Sat Sep 16 03:43:18 2006] [3260:4108] [debug] jk_connect.c (329):
>>socket TCP_NODELAY set to On
>>
>>[Sat Sep 16 03:43:18 2006] [3260:4108] [debug] jk_connect.c (427):
>>trying to connect socket 1544 to 192.168.0.3:8009
>>
>>[Sat Sep 16 03:43:19 2006] [3260:4108] [info] jk_connect.c (445):
>>connect to 192.168.0.3:8009 failed with errno=61
>>
>>[Sat Sep 16 03:43:19 2006] [3260:4108] [info] jk_ajp_common.c (889):
>>Failed opening socket to (192.168.0.3:8009) with (errno=61)
>>
>>[Sat Sep 16 03:43:19 2006] [3260:4108] [info] jk_ajp_common.c (1251):
>>Error connecting to the backend server.
>>
>>[Sat Sep 16 03:43:19 2006] [3260:4108] [info] jk_ajp_common.c (1783):
>>Sending request to tomcat failed, recoverable operation attempt=1
>>
>>[Sat Sep 16 03:43:19 2006] [3260:4108] [debug] jk_connect.c (329):
>>socket TCP_NODELAY set to On
>>
>>[Sat Sep 16 03:43:19 2006] [3260:4108] [debug] jk_connect.c (427):
>>trying to connect socket 1544 to 192.168.0.3:8009
>>
>>[Sat Sep 16 03:43:20 2006] [3260:4108] [info] jk_connect.c (445):
>>connect to 192.168.0.3:8009 failed with errno=61
>>
>>[Sat Sep 16 03:43:20 2006] [3260:4108] [info] jk_ajp_common.c (889):
>>Failed opening socket to (192.168.0.3:8009) with (errno=61)
>>
>>[Sat Sep 16 03:43:20 2006] [3260:4108] [info] jk_ajp_common.c (1251):
>>Error connecting to the backend server.
>>
>>[Sat Sep 16 03:43:20 2006] [3260:4108] [info] jk_ajp_common.c (1783):
>>Sending request to tomcat failed, recoverable operation attempt=2
>>
>>[Sat Sep 16 03:43:20 2006] [3260:4108] [error] jk_ajp_common.c (1794):
>>Error connecting to tomcat. Tomcat is probably not started or is
>>listening on the wrong port. worker=worker1 failed
>>
>>[Sat Sep 16 03:43:20 2006] [3260:4108] [debug] jk_ajp_common.c (704):
>>reset socket with sd = -1
>>
>>[Sat Sep 16 03:43:20 2006] [3260:4108] [debug] jk_ajp_common.c (2107):
>>recycling connection pool slot=0 for worker worker1
>>
>>[Sat Sep 16 03:43:20 2006] worker1 stompy 1.906000
>>
>>[Sat Sep 16 03:43:20 2006] [3260:4108] [info] mod_jk.c (1978): Service
>>error=0 for worker=worker1
>>
>>
>>
>>I have entered the jvm option
>>-Dcom.sun.enterprise.web.connector.enableJK=8009
>>
>>
>>
>>I have installed the latest copy of the mod_jk
>>
>>And apache 2.2.3 the tomcat-ajp file I copied is from version 5.5.17 as
>>well as the commons jars.
>>
>>All on windows xp pro
>>
>>I would be really greatfull if someone could help me sort the issue out
>>
>>Kind regards Chainy.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>