Re: Re: Re: Re: Re: Re: Re: Jonas 5.2.1 and Apache mod_jk
Celinio Fernandes <[email protected]> Mon, 3 Oct 2011 18:26:04 -0700 (PDT)
| Newsgroups | gmane.comp.java.objectweb.jonas |
|---|---|
| Message-ID | <[email protected]> |
---321410911-1851406511-1317691564=:75616 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi all,=0Athanks for helping.=0A=0AI changed the log level to debug and her= e it what it says in /etc/httpd/logs/mod_jk.log :=0A=0A[info] init_jk::mod_= jk.c (3198): mod_jk/1.2.31 (1026297) initialized=0A[debug] wc_get_worker_fo= r_name::jk_worker.c (116): found a worker worker1=0A[debug] wc_get_name_for= _type::jk_worker.c (293): Found worker type 'ajp13'=0A[debug] uri_worker_ma= p_ext::jk_uri_worker_map.c (512): Checking extension for worker 0: worker1 = of type ajp13 (2)=0A[debug] wc_get_worker_for_name::jk_worker.c (116): foun= d a worker worker1=0A[debug] wc_get_name_for_type::jk_worker.c (293): Found= worker type 'ajp13'=0A[debug] uri_worker_map_ext::jk_uri_worker_map.c (512= ): Checking extension for worker 1: worker1 of type ajp13 (2)=0A[debug] wc_= get_worker_for_name::jk_worker.c (116): found a worker worker1=0A[debug] wc= _get_name_for_type::jk_worker.c (293): Found worker type 'ajp13'=0A[debug] = uri_worker_map_ext::jk_uri_worker_map.c (512): Checking extension for worke= r 2: worker1 of type ajp13 (2)=0A[debug] wc_get_worker_for_name::jk_worker.= c (116): found a worker worker1=0A[debug] wc_get_name_for_type::jk_worker.c= (293): Found worker type 'ajp13'=0A[debug] uri_worker_map_ext::jk_uri_work= er_map.c (512): Checking extension for worker 3: worker1 of type ajp13 (2)= =0A[debug] uri_worker_map_dump::jk_uri_worker_map.c (171): uri map dump aft= er extension stripping: index=3D0 file=3D'(null)' reject_unsafe=3D0 reload= =3D60 modified=3D0 checked=3D0=0A[debug] uri_worker_map_dump::jk_uri_worker= _map.c (176): generation 0: size=3D0 nosize=3D0 capacity=3D0=0A[debug] uri_= worker_map_dump::jk_uri_worker_map.c (176): generation 1: size=3D4 nosize= =3D0 capacity=3D4=0A[debug] uri_worker_map_dump::jk_uri_worker_map.c (186):= NEXT (1) map #0: uri=3D/voltage-gestion/* worker=3Dworker1 context=3D/volt= age-gestion/* source=3DJkMount type=3DWildchar len=3D18=0A[debug] uri_worke= r_map_dump::jk_uri_worker_map.c (186): NEXT (1) map #1: uri=3D/voltage-gest= ion/ worker=3Dworker1 context=3D/voltage-gestion/ source=3DJkMount type=3DE= xact len=3D17=0A[debug] uri_worker_map_dump::jk_uri_worker_map.c (186): NEX= T (1) map #2: uri=3D/voltage-gestion* worker=3Dworker1 context=3D/voltage-g= estion* source=3DJkMount type=3DWildchar len=3D17=0A[debug] uri_worker_map_= dump::jk_uri_worker_map.c (186): NEXT (1) map #3: uri=3D/voltage-gestion wo= rker=3Dworker1 context=3D/voltage-gestion source=3DJkMount type=3DExact len= =3D16=0Aetc ...=0A[debug] do_shm_open_lock::jk_shm.c (353): Duplicated shar= ed memory lock /etc/httpd/logs/mod_jk.shm.27847.lock=0A[debug] jk_child_ini= t::mod_jk.c (3082): Initialized mod_jk/1.2.31 (1026297)=0A[debug] jk_transl= ate::mod_jk.c (3434): missing uri map for default:/voltage-gestion=0A[debug= ] jk_map_to_storage::mod_jk.c (3593): missing uri map for default:/voltage-= gestion=0A=0AHere is my configuration again :=0A=0AI changed my /etc/httpd/= conf/httpd.conf (I added 4 contexts for voltage-gestion):=0A=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =0A<IfMo= dule jk_module>=A0=A0=A0=A0=A0=A0=A0=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=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 =0AjkMount /voltage-gestion worker1=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 =0AjkMount /voltage-gestion/ worker1=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 =0A</IfModule>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 =0A=0A=0AI am not running any Virtual Host.=A0=A0 =0A=0A/et= c/httpd/conf/workers.properties :=0A=0Aworker.list=3Dworker1=0A# Define wor= ker1=0Aworker.worker1.port=3D8009=0Aworker.worker1.host=3Dlocalhost=0Aworke= r.worker1.type=3Dajp13=0A=0A=0AAnd regarding Jonas,=0Athis is the line that= i uncommented both on tomcat6-server.xml and tomcat7-server.xml :=0A=0A<!-= - Define an AJP 1.3 Connector on port 9009 -->=0A=A0=A0=A0 <Connector port= =3D"8009" protocol=3D"AJP/1.3" redirectPort=3D"9043" />=0A=0A=0AApache and = Jonas are running on the same remote server. So I just use localhost as the= host.=0ANot the IP, not the domain name. Anyways, even if i try these it d= oes not work. The URI is not mapped.=0A=0AThe URLs that i am trying to hit = is :=0Ahttp://<IP>:80/voltage-gestion=0Ahttp://<hostname>:80/voltage-gestio= n=0A=0A=0ANone works, I get the same error : missing uri map for default:/v= oltage-gestion=0A=0AAny idea ? Thanks=0A=0A=0A=0A=0A_______________________= _________=0AFrom: Benoit Pelletier <[email protected]>=0ATo: jonas@= ow2.org=0ASent: Monday, October 3, 2011 9:39 AM=0ASubject: [jonas] Re: Re: = Re: Re: Re: Re: Jonas 5.2.1 and Apache mod_jk=0A=0A=0AHi All,=0A=0AHi Celin= io=0A>=0A>Hmm... Where did you read that?=0A>=0A>Anyhow, based on your desc= ription of the situation I guess your=0Aworkers.properties file is not good= . I think:=0A>=0A>=0A>JkMount /toto*/* worker1=0A>>=0A>Has to be corrected = with:=0A>=0A>=0A>JkMount /toto* worker1=0A>>=0AYou should add both=0A=0AJkM= ount /toto worker1=0A>JkMount /toto/* worker1=0A>JkMountCopy Allou can=0A>= =0A>=0ABTW, did you take a look to the mod_jk's logs ? See=0A/etc/httpd/log= s/mod_jk.log. If needed, you may enable the debug level.=0A=0ARegards=0A=0A= =0A=0A>or=0A>=0A>=0A>JkMount /toto/* worker1=0A>>=0A>Also, try visiting htt= p://blabla.com:80/toto/=0A(with the final slash)=0A>=0A>Thank you=0A>=0A>= =0A>S. Ali Tokmen=0Ahttp://ali.tokmen.com/ GSM (ch): +41 79 207 29 22 [Swis= scom]=0AGSM (fr): +33 66 43 00 555 [Orange]=0AGSM (tr): +90 555 266 52 73 [= Avea] My AIM, ICQ, MSN Messenger and Yahoo IM=0Acontact details are on http= ://contact.ali.tokmen.com=0A>On 2011/10/02 15:16, Celinio Fernandes wrote: = =0A>Really ? I read that when it comes to load balancing and=0Afailure dete= ction, mod_jk is better than mod_proxy. =0A>>=0A>>Anyways, back to my probl= em :=0A>>If i hit the URL http://blabla.com:80/toto=0A(port 80) it does not= work. I get a "Not found" error: "The requested=0AURL /toto/ was not found= on this server."=0A>>=0A>>The URL http://blabla.com:80/works.=A0=A0=0ASame= thing whether i use the IP or the hostname in worker's host=0Adefinition:= =0A>>worker.worker1.host=0A>>=0A>>I made another change in both tomcat6-ser= ver.xml and=0Atomcat7-server.xml, I added the jvmRoute to the worker :=0A>>= =A0<Engine name=3D"JOnAS" defaultHost=3D"localhost" jvmRoute=3D"worker1">= =0A>>=A0=0A>>=A0=0A>>So, am i missing something ? =0A>>I do not want to do = any load-balancing at the moment (i only have one=0Ainstance of Jonas anywa= ys), I just want=0A>>Apache to redirect the request so that Jonas handles i= t.=0A>>Thanks for helping.=0A>>=0A>>=0A>>=0A>>_____________________________= ___=0A>>From: S. Ali Tokmen <[email protected]>=0A>>To: [email protected]= =0A>>Sent: Sunday,=0AOctober 2, 2011 1:02 AM=0A>>Subject: [jonas] Re:=0ARe:= Re: Jonas 5.2.1 and Apache mod_jk=0A>>=0A>>=0A>>Hi Celinio=0A>>=0A>>OK, we= ll my personal recommendation is mod_proxy_ajp. It is officially=0Amaintain= ed by the httpd project and has a great number of stability and=0Aperforman= ce improvements.=0A>>=0A>>If you want to hit the AJP port, you should conne= ct to the Apache httpd=0Aserver; i.e. not visit on the 9000 port but the 80= (or whatever other=0AApache httpd) port.=0A>>=0A>>Cheers=0A>>=0A>>=0A>>S. = Ali Tokmen http://ali.tokmen.com/ GSM (ch): +41 79 207 29 22 [Swisscom]=0AG= SM (fr): +33 66 43 00 555 [Orange]=0AGSM (tr): +90 555 266 52 73 [Avea] My = AIM, ICQ, MSN Messenger and Yahoo IM=0Acontact details are on http://contac= t.ali.tokmen.com=0A>>On 2011/10/01 19:26, Celinio Fernandes wrote: =0A>>Hi = Ali,=0A>>>there is no specific reason.=0A>>>=0A>>>=0A>>>Anyways, how can i = make sure my webapp is using the=0Amod_jk connector ?=0A>>>I have installed= and configured it in Apache and I=0Ahave also configured it in Jonas.=0A>>= >I can also see the AJP/JK connector configured=0Aon port 8009 in the Jonas= console admin.=0A>>>=0A>>>=0A>>>Now how do i make sure my request hits Apa= che first and that=0AApache redirects it to Jonas then ?=0A>>>=0A>>>=0A>>>= =0A>>>=0A>>>________________________________=0A>>>From: S. Ali Tokmen <nosp= [email protected]>=0A>>>To: [email protected]=0A>>>Sent: Saturday,=0AOctober = 1, 2011 5:49 PM=0A>>>Subject: [jonas]=0ARe: Jonas 5.2.1 and Apache mod_jk= =0A>>>=0A>>>=0A>>>Hi Celinio=0A>>>=0A>>>Is there a spacific reason why you'= re using mod_jk under Apache httpd=0A2.2 as opposed to the already embedded= mod_proxy_ajp?=0A>>>=0A>>>Thank you=0A>>>=0A>>>=0A>>>S. Ali Tokmen http://= ali.tokmen.com/ GSM (ch): +41 79 207 29 22 [Swisscom]=0AGSM (fr): +33 66 43= 00 555 [Orange]=0AGSM (tr): +90 555 266 52 73 [Avea] My AIM, ICQ, MSN Mess= enger and Yahoo IM=0Acontact details are on http://contact.ali.tokmen.com= =0A>>>On 2011/10/01 18:37, Celinio Fernandes wrote: =0A>>>Hi,=0A>>>>I am tr= ying to interface my instance of Jonas 5.2.1 with=0Athe connector mod_jk, i= n a Linux environment (CentOS).=0A>>>>=0A>>>>I have added the module mod_jk= .so to /usr/lib64/httpd/modules.=0A>>>>=0A>>>>=0A>>>>My version of Apache i= s 2.2=0A>>>>=0A>>>>=0A>>>>I have configured /etc/httpd/conf/httpd.conf as t= he=0Afollowing :=0A>>>>=0A>>>>=0A>>>>LoadModule jk_module modules/mod_jk.so= =0A>>>>=0A>>>><IfModule jk_module>=0A>>>># Ou trouver workers.properties ?= =0A>>>>JkWorkersFile /etc/httpd/conf/workers.properties=0A>>>># Ou mettre l= a memoire partagee de jk=0A>>>>JkShmFile /etc/httpd/logs/mod_jk.shm=0A>>>>#= Ou mettre les logs jk=0A>>>>JkLogFile /etc/httpd/logs/mod_jk.log=0A>>>># P= ositionner le niveau des logs jk [debug/error/info]=0A>>>>JkLogLevel info= =0A>>>># Selectionner lef ormat des logs pour le timestamp=0A>>>>JkLogStamp= Format "[%a %b %d %H:%M:%S %Y] "=0A>>>>#Format des logs=0A>>>>JkRequestLogF= ormat "%w %m %V %T"=0A>>>># Envoyer les contextes dont le nom commence par = test : /toto* vers le=0Aworker nomm=E9 worker1=0A>>>>JkMount /toto*/* worke= r1=0A>>>># On peut placer ici plusieurs JkMount si on a plusieurs contextes= =0Atraites=0A>>>># par des workers differents=0A>>>></IfModule>=0A>>>>=0A>>= >>=0A>>>>I have added the following worker in=0A/etc/httpd/conf/worker.prop= erties :=0A>>>>=0A>>>>=0A>>>>=A0#Define 1 worker=0A>>>>=A0worker.list=3Dwor= ker1=0A>>>>=A0=0A>>>>=A0#Set properties for worker1 (ajp13)=0A>>>>=A0worker= .worker1.type=3Dajp13=0A>>>>=A0worker.worker1.host=3Dblabla.com=0A>>>>=A0wo= rker.worker1.port=3D8009=0A>>>>=0A>>>>=0A>>>>=0A>>>>Under /home/test/jonas-= full-5.2.1/conf/=A0 I have configured=0Aboth tomcat6-server.xml and tomcat7= -server.xml (since I do not know=0Awhich one is used). I have uncommented t= he following line (changed port=0A9009 to 8009)=0A>>>>=0A>>>>=0A>>>>=0A>>>>= =A0 <Connector port=3D"8009" protocol=3D"AJP/1.3"=0AredirectPort=3D"9043" /= >=0A>>>>=0A>>>>=0A>>>>My web app HTTP port in Jonas is configured to 9000.= =0A>>>>When I hit the URL http://blabla.com:9000/toto=0AI can see in the Jo= nas logs that Jonas is listening to that connector=0Abut I have no idea whe= ther Apache has handled the request or not.=0A>>>>=0A>>>>=0A>>>>What can i = do ? Am i missing something ?=0A>>>>Thanks for helping.=0A>>>=0A>>>=0A>>=0A= >>=0A=0A=0A-- ------------------------------------------------------------= ----=0ABenoit Pelletier=0Ahttp://jonas.ow2.org=0ABull, Architect of an Open= World TM=0Ahttp://www.bull.com ---321410911-1851406511-1317691564=:75616 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable <html><body><div style=3D"color:#000; background-color:#fff; font-family:ti= mes new roman, new york, times, serif;font-size:12pt"><div><span>Hi all,</s= pan></div><div><span>thanks for helping.<br></span></div><div><span>I chang= ed the log level to debug and here it what it says in /etc/httpd/logs/mod_j= k.log :</span></div><div><br><span></span></div><div><span>[info] init_jk::= mod_jk.c (3198): mod_jk/1.2.31 (1026297) initialized<br>[debug] wc_get_work= er_for_name::jk_worker.c (116): found a worker worker1<br>[debug] wc_get_na= me_for_type::jk_worker.c (293): Found worker type 'ajp13'<br>[debug] uri_wo= rker_map_ext::jk_uri_worker_map.c (512): Checking extension for worker 0: w= orker1 of type ajp13 (2)<br>[debug] wc_get_worker_for_name::jk_worker.c (11= 6): found a worker worker1<br>[debug] wc_get_name_for_type::jk_worker.c (29= 3): Found worker type 'ajp13'<br>[debug] uri_worker_map_ext::jk_uri_worker_= map.c (512): Checking extension for worker 1: worker1 of type ajp13 (2)<br>[debug] wc_get_worker_for_name::jk_worker.c (116): found a worker w= orker1<br>[debug] wc_get_name_for_type::jk_worker.c (293): Found worker typ= e 'ajp13'<br>[debug] uri_worker_map_ext::jk_uri_worker_map.c (512): Checkin= g extension for worker 2: worker1 of type ajp13 (2)<br>[debug] wc_get_worke= r_for_name::jk_worker.c (116): found a worker worker1<br>[debug] wc_get_nam= e_for_type::jk_worker.c (293): Found worker type 'ajp13'<br>[debug] uri_wor= ker_map_ext::jk_uri_worker_map.c (512): Checking extension for worker 3: wo= rker1 of type ajp13 (2)<br>[debug] uri_worker_map_dump::jk_uri_worker_map.c= (171): uri map dump after extension stripping: index=3D0 file=3D'(null)' r= eject_unsafe=3D0 reload=3D60 modified=3D0 checked=3D0<br>[debug] uri_worker= _map_dump::jk_uri_worker_map.c (176): generation 0: size=3D0 nosize=3D0 cap= acity=3D0<br>[debug] uri_worker_map_dump::jk_uri_worker_map.c (176): genera= tion 1: size=3D4 nosize=3D0 capacity=3D4<br>[debug] uri_worker_map_dump::jk= _uri_worker_map.c (186): NEXT (1) map #0: uri=3D/voltage-gestion/* worker=3Dworker1 context= =3D/voltage-gestion/* source=3DJkMount type=3DWildchar len=3D18<br>[debug] = uri_worker_map_dump::jk_uri_worker_map.c (186): NEXT (1) map #1: uri=3D/vol= tage-gestion/ worker=3Dworker1 context=3D/voltage-gestion/ source=3DJkMount= type=3DExact len=3D17<br>[debug] uri_worker_map_dump::jk_uri_worker_map.c = (186): NEXT (1) map #2: uri=3D/voltage-gestion* worker=3Dworker1 context=3D= /voltage-gestion* source=3DJkMount type=3DWildchar len=3D17<br>[debug] uri_= worker_map_dump::jk_uri_worker_map.c (186): NEXT (1) map #3: uri=3D/voltage= -gestion worker=3Dworker1 context=3D/voltage-gestion source=3DJkMount type= =3DExact len=3D16<br>etc ...<br>[debug] do_shm_open_lock::jk_shm.c (353): D= uplicated shared memory lock /etc/httpd/logs/mod_jk.shm.27847.lock<br>[debu= g] jk_child_init::mod_jk.c (3082): Initialized mod_jk/1.2.31 (1026297)<br>[= debug] jk_translate::mod_jk.c (3434): missing uri map for default:/voltage-= gestion<br>[debug] jk_map_to_storage::mod_jk.c (3593): missing uri map for default:/voltage-g= estion<br><br>Here is my configuration again :<br><br>I changed my /etc/htt= pd/conf/httpd.conf (I added 4 contexts for voltage-gestion):<br>  = ; &n= bsp;  = ; &n= bsp;  = ; &n= bsp;  = ; <br><IfModule jk_module> &= nbsp; &nbs= p; &= nbsp; &nbs= p; &= nbsp; &nbs= p; <br>JkWorkersFile /etc/httpd/conf/workers.properties &n= bsp;  = ; &n= bsp;  = ; <br>JkShmFile /etc/httpd/logs/mod_jk.shm = &nb= sp; = &nb= sp; = <br>JkLogFile /etc/httpd/logs/mod_jk.log &nbs= p; &= nbsp; &nbs= p; &= nbsp; &nbs= p; <br>JkLogLevel debug &nb= sp; = &nb= sp; = &nb= sp; = <br>JkLogStampFormat "[%a %b %d %H:%M:%S %Y]= " &= nbsp; &nbs= p; &= nbsp; &nbs= p; <br>JkRequestLogFormat "%w %m %V %T"  = ; &n= bsp;  = ; &n= bsp;  = ; <br>JKMountCopy On &= nbsp; &nbs= p; &= nbsp; &nbs= p; &= nbsp; &nbs= p; <br>JkMount = /voltage-gestion/* worker1 &= nbsp; &nbs= p; &= nbsp; &nbs= p; = <br>jkMount /voltage-gestion* worker1 &n= bsp;  = ; &n= bsp;  = ; &n= bsp; <br>jkMount /voltage-gestion worker1 &= nbsp; &nbs= p; &= nbsp; &nbs= p; &= nbsp; <br>jkMount /voltage-gestion/ worker1 &n= bsp;  = ; &n= bsp;  = ; &n= bsp; <br></IfModule> &= nbsp; &nbs= p; <br><br><br>I am not running any Virtual Host. <br><br>/etc/httpd/conf/workers.properties :<br><br>work= er.list=3Dworker1<br># Define worker1<br>worker.worker1.port=3D8009<br>work= er.worker1.host=3Dlocalhost<br>worker.worker1.type=3Dajp13<br><br><br>And r= egarding Jonas,<br>this is the line that i uncommented both on tomcat6-serv= er.xml and tomcat7-server.xml :<br><br><!-- Define an AJP 1.3 Connector = on port 9009 --><br> <Connector port=3D"8009" proto= col=3D"AJP/1.3" redirectPort=3D"9043" /><br><br><br>Apache and Jonas are= running on the same remote server. So I just use localhost as the host.<br= >Not the IP, not the domain name. Anyways, even if i try these it does not = work. The URI is not mapped.</span></div><div><br><span></span></div><div>T= he URLs that i am trying to hit is :</div><div>http://<IP>:80/voltage= -gestion</div><div>http://<hostname>:80/voltage-gestion<br><span></sp= an></div><div><br><span></span></div><div><span>None works, I get the same = error : missing uri map for default:/voltage-gestion</span></div><div><span><br></= span></div><div><span>Any idea ? Thanks<br></span></div><div><span></span><= /div><div><br></div><div style=3D"font-family: times new roman, new york, t= imes, serif; font-size: 12pt;"><div style=3D"font-family: times new roman, = new york, times, serif; font-size: 12pt;"><font size=3D"2" face=3D"Arial"><= hr size=3D"1"><b><span style=3D"font-weight:bold;">From:</span></b> Benoit = Pelletier <[email protected]><br><b><span style=3D"font-weigh= t: bold;">To:</span></b> [email protected]<br><b><span style=3D"font-weight: bo= ld;">Sent:</span></b> Monday, October 3, 2011 9:39 AM<br><b><span style=3D"= font-weight: bold;">Subject:</span></b> [jonas] Re: Re: Re: Re: Re: Re: Jon= as 5.2.1 and Apache mod_jk<br></font><br>=0A<div id=3D"yiv1046174275">=0A= =0A=0A =0A=0A<div>=0AHi All,<br>=0A<blockquote type=3D"cite">=0A=0A =0AHi= Celinio<br>=0A <br>=0AHmm... Where did you read that?<br>=0A <br>=0AAnyh= ow, based on your description of the situation I guess your=0Aworkers.prope= rties file is not good. I think:<br>=0A <br>=0A <blockquote>JkMount /toto= */* worker1<br>=0A </blockquote>=0A <br>=0AHas to be corrected with:<br>= =0A <br>=0A <blockquote>JkMount /toto* worker1<br>=0A </blockquote>=0A</= blockquote>=0AYou should add both<br>=0A<blockquote><tt>JkMount /toto worke= r1</tt><br>=0A <tt>JkMount /toto/* worker1<br>=0AJkMountCopy Allou can<br>= =0A <br>=0A </tt></blockquote>=0ABTW, did you take a look to the mod_jk's= logs ? See=0A/etc/httpd/logs/mod_jk.log. If needed, you may enable the deb= ug level.<br>=0A<br>=0ARegards<br>=0A<br>=0A<blockquote type=3D"cite">=0A = <blockquote> </blockquote>=0A <br>=0Aor<br>=0A <br>=0A <blockquote>JkMou= nt /toto/* worker1<br>=0A </blockquote>=0A <br>=0AAlso, try visiting <spa= n>http://blabla.com:80/toto/=0A(with the final slash)</span><br>=0A <br>= =0AThank you<br>=0A <br>=0A <pre class=3D"yiv1046174275moz-signature">S. = Ali Tokmen=0Ahttp://ali.tokmen.com/=0A=0AGSM (ch): +41 79 207 29 22 [Swissc= om]=0AGSM (fr): +33 66 43 00 555 [Orange]=0AGSM (tr): +90 555 266 52 73 [Av= ea]=0A=0AMy AIM, ICQ, MSN Messenger and Yahoo IM=0Acontact details are on h= ttp://contact.ali.tokmen.com</pre>=0A <br>=0AOn 2011/10/02 15:16, Celinio = Fernandes wrote:=0A <blockquote type=3D"cite">=0A <div style=3D"color:r= gb(0, 0, 0);background-color:rgb(255, 255, 255);font-family:times new roman= , new york, times, serif;font-size:12pt;">=0A <div><span>Really ? I read= that when it comes to load balancing and=0Afailure detection, mod_jk is be= tter than mod_proxy. <br>=0A <br>=0AAnyways, back to my problem :<br>=0A= If i hit the URL http://blabla.com:80/toto=0A(port 80) it does not work. I = get a "Not found" error: "The requested=0AURL /toto/ was not found on this = server."<br>=0A <br>=0AThe URL http://blabla.com:80/works. = =0ASame thing whether i use the IP or the hostname in worker's host=0Adefin= ition:<br>=0Aworker.worker1.host<br>=0A <br>=0AI made another change in = both tomcat6-server.xml and=0Atomcat7-server.xml, I added the jvmRoute to t= he worker :<br>=0A <Engine name=3D"JOnAS" defaultHost=3D"localhost"= jvmRoute=3D"worker1"><br>=0A <br>=0A <br>=0ASo, am i missing = something ? <br>=0AI do not want to do any load-balancing at the moment (i = only have one=0Ainstance of Jonas anyways), I just want<br>=0AApache to red= irect the request so that Jonas handles it.<br>=0AThanks for helping.</span= ></div>=0A <div><br>=0A </div>=0A <div style=3D"font-family:times = new roman, new york, times, serif;font-size:12pt;">=0A <div style=3D"fon= t-family:times new roman, new york, times, serif;font-size:12pt;"><font siz= e=3D"2" face=3D"Arial">=0A <hr size=3D"1"><b><span style=3D"font-weight:= bold;">From:</span></b>=0AS. Ali Tokmen <a rel=3D"nofollow" class=3D"yiv104= 6174275moz-txt-link-rfc2396E" ymailto=3D"mailto:[email protected]" ta= rget=3D"_blank" href=3D"mailto:[email protected]"><nospam@alishome= page.com></a><br>=0A <b><span style=3D"font-weight:bold;">To:</span><= /b> <a rel=3D"nofollow" class=3D"yiv1046174275moz-txt-link-abbreviated" yma= ilto=3D"mailto:[email protected]" target=3D"_blank" href=3D"mailto:[email protected]= g">[email protected]</a><br>=0A <b><span style=3D"font-weight:bold;">Sent:</= span></b> Sunday,=0AOctober 2, 2011 1:02 AM<br>=0A <b><span style=3D"fon= t-weight:bold;">Subject:</span></b> [jonas] Re:=0ARe: Re: Jonas 5.2.1 and A= pache mod_jk<br>=0A </font><br>=0A <div id=3D"yiv1046174275">=0A <= div> Hi Celinio<br>=0A <br>=0AOK, well my personal recommendation is mod= _proxy_ajp. It is officially=0Amaintained by the httpd project and has a gr= eat number of stability and=0Aperformance improvements.<br>=0A <br>=0AIf= you want to hit the AJP port, you should connect to the Apache httpd=0Aser= ver; i.e. not visit on the 9000 port but the 80 (or whatever other=0AApache= httpd) port.<br>=0A <br>=0ACheers<br>=0A <br>=0A <pre class=3D"yi= v1046174275moz-signature">S. Ali Tokmen=0A<a rel=3D"nofollow" class=3D"yiv1= 046174275moz-txt-link-freetext" target=3D"_blank" href=3D"http://ali.tokmen= .com/">http://ali.tokmen.com/</a>=0A=0AGSM (ch): +41 79 207 29 22 [Swisscom= ]=0AGSM (fr): +33 66 43 00 555 [Orange]=0AGSM (tr): +90 555 266 52 73 [Avea= ]=0A=0AMy AIM, ICQ, MSN Messenger and Yahoo IM=0Acontact details are on <a = rel=3D"nofollow" class=3D"yiv1046174275moz-txt-link-freetext" target=3D"_bl= ank" href=3D"http://contact.ali.tokmen.com">http://contact.ali.tokmen.com</= a></pre>=0A <br>=0AOn 2011/10/01 19:26, Celinio Fernandes wrote:=0A <= blockquote type=3D"cite">=0A <div style=3D"color:rgb(0, 0, 0);backgrou= nd-color:rgb(255, 255, 255);font-family:times new roman, new york, times, s= erif;font-size:12pt;">=0A <div><span>Hi Ali,</span></div>=0A <div= ><span>there is no specific reason.</span></div>=0A <div><br>=0A = <span></span></div>=0A <div><span>Anyways, how can i make sure my weba= pp is using the=0Amod_jk connector ?</span></div>=0A <div><span>I have= installed and configured it in Apache and I=0Ahave also configured it in J= onas.</span></div>=0A <div><span>I can also see the </span>AJP/JK conn= ector configured=0Aon port 8009 in the Jonas console admin.</div>=0A <= div><br>=0A </div>=0A <div>Now how do i make sure my request hits= Apache first and that=0AApache redirects it to Jonas then ?<br>=0A </= div>=0A <div><br>=0A </div>=0A <div style=3D"font-family:tim= es new roman, new york, times, serif;font-size:12pt;">=0A <div style= =3D"font-family:times new roman, new york, times, serif;font-size:12pt;"><f= ont size=3D"2" face=3D"Arial">=0A <hr size=3D"1"><b><span style=3D"fon= t-weight:bold;">From:</span></b>=0AS. Ali Tokmen <a rel=3D"nofollow" class= =3D"yiv1046174275moz-txt-link-rfc2396E" ymailto=3D"mailto:nospam@alishomepa= ge.com" target=3D"_blank" href=3D"mailto:[email protected]"><nospa= [email protected]></a><br>=0A <b><span style=3D"font-weight:bold;"= >To:</span></b> <a rel=3D"nofollow" class=3D"yiv1046174275moz-txt-link-abbr= eviated" ymailto=3D"mailto:[email protected]" target=3D"_blank" href=3D"mailto:= [email protected]">[email protected]</a><br>=0A <b><span style=3D"font-weight:= bold;">Sent:</span></b> Saturday,=0AOctober 1, 2011 5:49 PM<br>=0A <b>= <span style=3D"font-weight:bold;">Subject:</span></b> [jonas]=0ARe: Jonas 5= .2.1 and Apache mod_jk<br>=0A </font><br>=0A <div id=3D"yiv104617= 4275">=0A <div> Hi Celinio<br>=0A <br>=0AIs there a spacific reas= on why you're using mod_jk under Apache httpd=0A2.2 as opposed to the alrea= dy embedded mod_proxy_ajp?<br>=0A <br>=0AThank you<br>=0A <br>=0A= <pre class=3D"yiv1046174275moz-signature">S. Ali Tokmen=0A<a rel=3D"n= ofollow" class=3D"yiv1046174275moz-txt-link-freetext" target=3D"_blank" hre= f=3D"http://ali.tokmen.com/">http://ali.tokmen.com/</a>=0A=0AGSM (ch): +41 = 79 207 29 22 [Swisscom]=0AGSM (fr): +33 66 43 00 555 [Orange]=0AGSM (tr): += 90 555 266 52 73 [Avea]=0A=0AMy AIM, ICQ, MSN Messenger and Yahoo IM=0Acont= act details are on <a rel=3D"nofollow" class=3D"yiv1046174275moz-txt-link-f= reetext" target=3D"_blank" href=3D"http://contact.ali.tokmen.com">http://co= ntact.ali.tokmen.com</a></pre>=0A <br>=0AOn 2011/10/01 18:37, Celinio = Fernandes wrote:=0A <blockquote type=3D"cite">=0A <div style=3D= "color:rgb(0, 0, 0);background-color:rgb(255, 255, 255);font-family:times n= ew roman, new york, times, serif;font-size:12pt;">=0A <div>Hi,</div>= =0A <div>I am trying to interface my instance of Jonas 5.2.1 with=0A= the connector mod_jk, in a Linux environment (CentOS).<br>=0A </div>= =0A <div>I have added the module <a rel=3D"nofollow" target=3D"_blan= k" href=3D"http://mod_jk.so">mod_jk.so</a>=0Ato /usr/lib64/httpd/modules.</= div>=0A <div><br>=0A </div>=0A <div>My version of Apac= he is 2.2</div>=0A <div><br>=0A </div>=0A <div>I have = configured /etc/httpd/conf/httpd.conf as the=0Afollowing :</div>=0A = <div><br>=0A </div>=0A <div>LoadModule jk_module modules/mod_= jk.so <br>=0A <br>=0A<IfModule jk_module><br>=0A# Ou trouver w= orkers.properties ?<br>=0AJkWorkersFile /etc/httpd/conf/workers.properties<= br>=0A# Ou mettre la memoire partagee de jk<br>=0AJkShmFile /etc/httpd/logs= /mod_jk.shm<br>=0A# Ou mettre les logs jk<br>=0AJkLogFile /etc/httpd/logs/m= od_jk.log<br>=0A# Positionner le niveau des logs jk [debug/error/info]<br>= =0AJkLogLevel info<br>=0A# Selectionner lef ormat des logs pour le timestam= p<br>=0AJkLogStampFormat "[%a %b %d %H:%M:%S %Y] "<br>=0A#Format des logs<b= r>=0AJkRequestLogFormat "%w %m %V %T"<br>=0A# Envoyer les contextes dont le= nom commence par test : /toto* vers le=0Aworker nomm=E9 worker1<br>=0AJkMo= unt /toto*/* worker1<br>=0A# On peut placer ici plusieurs JkMount si on a p= lusieurs contextes=0Atraites<br>=0A# par des workers differents<br>=0A</= IfModule></div>=0A <div><br>=0A </div>=0A <div>I ha= ve added the following worker in=0A/etc/httpd/conf/worker.properties :</div= >=0A <div><br>=0A </div>=0A <div> #Define 1 worke= r<br>=0A worker.list=3Dworker1<br>=0A <br>=0A #Set propertie= s for worker1 (ajp13)<br>=0A worker.worker1.type=3Dajp13<br>=0A w= orker.worker1.host=3Dblabla.com<br>=0A worker.worker1.port=3D8009<br>= =0A </div>=0A <div><br>=0A </div>=0A <div>Under= /home/test/jonas-full-5.2.1/conf/ I have configured=0Aboth tomcat6-s= erver.xml and tomcat7-server.xml (since I do not know=0Awhich one is used).= I have uncommented the following line (changed port=0A9009 to 8009)<br>=0A= </div>=0A <div><br>=0A </div>=0A <div> &= lt;Connector port=3D"8009" protocol=3D"AJP/1.3"=0AredirectPort=3D"9043" /&g= t;</div>=0A <div><br>=0A </div>=0A <div>My web app HTT= P port in Jonas is configured to 9000.</div>=0A <div>When I hit the = URL http://blabla.com:9000/toto=0AI can see in the Jonas logs that Jonas is= listening to that connector=0Abut I have no idea whether Apache has handle= d the request or not.</div>=0A <div><br>=0A </div>=0A = <div>What can i do ? Am i missing something ?</div>=0A <div>Thanks f= or helping.</div>=0A </div>=0A </blockquote>=0A </div>=0A = </div>=0A <br>=0A <br>=0A </div>=0A </div>=0A = </div>=0A </blockquote>=0A </div>=0A </div>=0A <br>=0A <br>= =0A </div>=0A </div>=0A </div>=0A </blockquote>=0A</blockquote>= =0A<br>=0A<br>=0A<pre class=3D"yiv1046174275moz-signature">-- =0A=0A-------= ---------------------------------------------------------=0ABenoit Pelletie= r=0Ahttp://jonas.ow2.org=0ABull, Architect of an Open World TM=0Ahttp://www= .bull.com =0A</pre>=0A</div>=0A=0A</div><br><br></div></div></div></body></= html> ---321410911-1851406511-1317691564=:75616--