Re: Re: Re: Re: Re: Jonas 5.2.1 and Apache mod_jk
Celinio Fernandes <[email protected]> Sun, 2 Oct 2011 05:18:04 -0700 (PDT)
| Newsgroups | gmane.comp.java.objectweb.jonas |
|---|---|
| Message-ID | <[email protected]> |
--1844943856-616157934-1317557884=:7479 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable I forgot to mention that Apache and Jonas are running on the same remote se= rver.=0A=0A=0A=0A________________________________=0AFrom: Celinio Fernandes= <[email protected]>=0ATo: "[email protected]" <[email protected]>=0ASent: Sunday, O= ctober 2, 2011 2:16 PM=0ASubject: [jonas] Re: Re: Re: Re: Jonas 5.2.1 and A= pache mod_jk=0A=0A=0AReally ? I read that when it comes to load balancing a= nd failure detection, mod_jk is better than mod_proxy. =0A=0AAnyways, back = to my problem :=0AIf i hit the URL http://blabla.com:80/toto (port 80) it d= oes not work. I get a "Not found" error: "The requested URL /toto/ was not = found on this server."=0A=0AThe URL http://blabla.com:80/works.=A0=A0 Same = thing whether i use the IP or the hostname in worker's host definition:=0Aw= orker.worker1.host=0A=0AI made another change in both tomcat6-server.xml an= d tomcat7-server.xml, I added the jvmRoute to the worker :=0A=A0<Engine nam= e=3D"JOnAS" defaultHost=3D"localhost" jvmRoute=3D"worker1">=0A=A0=0A=A0=0AS= o, am i missing something ? =0AI do not want to do any load-balancing at th= e moment (i only have one instance of Jonas anyways), I just=0A want=0AApac= he to redirect the request so that Jonas handles it.=0AThanks for helping.= =0A=0A=0A________________________________=0AFrom: S. Ali Tokmen <nospam@ali= shomepage.com>=0ATo: [email protected]=0ASent: Sunday, October 2, 2011 1:02 AM= =0ASubject: [jonas] Re: Re: Re: Jonas 5.2.1 and Apache mod_jk=0A=0A=0AHi Ce= linio=0A=0AOK, well my personal recommendation is mod_proxy_ajp. It is=0A = officially maintained by the httpd project and has a great number of=0A = stability and performance improvements.=0A=0AIf you want to hit the AJP p= ort, you should connect to the Apache=0A httpd server; i.e. not visit on= the 9000 port but the 80 (or=0A whatever other Apache httpd) port.=0A= =0ACheers=0A=0A=0AS. Ali Tokmen=0Ahttp://ali.tokmen.com/ GSM (ch): +41 79 2= 07 29 22 [Swisscom]=0AGSM (fr): +33 66 43 00 555 [Orange]=0AGSM (tr): +90 5= 55 266 52 73 [Avea] My AIM, ICQ, MSN Messenger and Yahoo IM=0Acontact detai= ls are on http://contact.ali.tokmen.com=0AOn 2011/10/01 19:26, Celinio Fern= andes wrote: =0AHi Ali,=0A>there is no specific reason.=0A>=0A>=0A>Anyways,= how can i make sure my webapp is using the mod_jk connector ?=0A>I have in= stalled and configured it in Apache and I have also configured it in Jonas.= =0A>I can also see the AJP/JK connector configured on port 8009 in the Jona= s console admin.=0A>=0A>=0A>Now how do i make sure my request hits Apache f= irst and that Apache redirects it to Jonas then ?=0A>=0A>=0A>=0A>=0A>______= __________________________=0A>From: S. Ali Tokmen <[email protected]>= =0A>To: [email protected]=0A>Sent: Saturday, October 1, 2011 5:49 PM=0A>Subject= : [jonas] Re: 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=0A Ap= ache httpd 2.2 as opposed to the already embedded=0A mod_pro= xy_ajp?=0A>=0A>Thank you=0A>=0A>=0A>S. Ali Tokmen http://ali.tokmen.com/ GS= M (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 Messenger 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 trying to interface my ins= tance of Jonas 5.2.1 with the connector mod_jk, in a Linux environment (Cen= tOS).=0A>>=0A>>I have added the module mod_jk.so to /usr/lib64/httpd/module= s.=0A>>=0A>>=0A>>My version of Apache is 2.2=0A>>=0A>>=0A>>I have configure= d /etc/httpd/conf/httpd.conf as the following :=0A>>=0A>>=0A>>LoadModule jk= _module modules/mod_jk.so =0A>>=0A>><IfModule jk_module>=0A>># Ou trouver w= orkers.properties ?=0A>>JkWorkersFile /etc/httpd/conf/workers.properties=0A= >># Ou mettre la memoire partagee de jk=0A>>JkShmFile /etc/httpd/logs/mod_j= k.shm=0A>># Ou mettre les logs jk=0A>>JkLogFile /etc/httpd/logs/mod_jk.log= =0A>># Positionner le niveau des logs jk=0A [debug/err= or/info]=0A>>JkLogLevel info=0A>># Selectionner lef ormat des logs pour le= =0A timestamp=0A>>JkLogStampFormat "[%a %b %d %H:%M:%S= %Y] "=0A>>#Format des logs=0A>>JkRequestLogFormat "%w %m %V %T"=0A>># Envo= yer les contextes dont le nom commence par=0A test : /= toto* vers le worker nomm=E9 worker1=0A>>JkMount /toto*/* worker1=0A>># On = peut placer ici plusieurs JkMount si on a=0A plusieurs= contextes traites=0A>># par des workers differents=0A>></IfModule>=0A>>=0A= >>=0A>>I have added the following worker in /etc/httpd/conf/worker.properti= es :=0A>>=0A>>=0A>>=A0#Define 1 worker=0A>>=A0worker.list=3Dworker1=0A>>=A0= =0A>>=A0#Set properties for worker1 (ajp13)=0A>>=A0worker.worker1.type=3Daj= p13=0A>>=A0worker.worker1.host=3Dblabla.com=0A>>=A0worker.worker1.port=3D80= 09=0A>>=0A>>=0A>>=0A>>Under /home/test/jonas-full-5.2.1/conf/=A0 I have con= figured both tomcat6-server.xml and tomcat7-server.xml (since I do not know= which one is used). I have uncommented the following line (changed port 90= 09 to 8009)=0A>>=0A>>=0A>>=0A>>=A0 <Connector port=3D"8009" protocol=3D"AJP= /1.3" redirectPort=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 I= can see in the Jonas logs that Jonas is listening to that connector but I = have no idea whether Apache has handled the request or not.=0A>>=0A>>=0A>>W= hat can i do ? Am i missing something ?=0A>>Thanks for helping.=0A>=0A> --1844943856-616157934-1317557884=:7479 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>I forgot t= o mention that Apache and Jonas are running on the same remote server.<br><= /span></div><div><br></div><div style=3D"font-family: times new roman, new = york, times, serif; font-size: 12pt;"><div style=3D"font-family: times new = roman, new york, times, serif; font-size: 12pt;"><font face=3D"Arial" size= =3D"2"><hr size=3D"1"><b><span style=3D"font-weight:bold;">From:</span></b>= Celinio Fernandes <[email protected]><br><b><span style=3D"font-weigh= t: bold;">To:</span></b> "[email protected]" <[email protected]><br><b><span = style=3D"font-weight: bold;">Sent:</span></b> Sunday, October 2, 2011 2:16 = PM<br><b><span style=3D"font-weight: bold;">Subject:</span></b> [jonas] Re:= Re: Re: Re: Jonas 5.2.1 and Apache mod_jk<br></font><br>=0A<div id=3D"yiv1= 551226409"><div><div style=3D"color:#000;background-color:#fff;font-family:= times new roman, new york, times, serif;font-size:12pt;"><div><span>Really = ? I read that when it comes to load balancing and failure detection, mod_jk= is better than mod_proxy. <br><br>Anyways, back to my problem :<br>If i hi= t the URL http://blabla.com:80/toto (port 80) it does not work. I get a "No= t found" error: "The requested URL /toto/ was not found on this server."<br= ><br>The URL http://blabla.com:80/works. Same thing whether i u= se the IP or the hostname in worker's host definition:<br>worker.worker1.ho= st<br><br>I made another change in both tomcat6-server.xml and tomcat7-serv= er.xml, I added the jvmRoute to the worker :<br> <Engine name=3D"JO= nAS" defaultHost=3D"localhost" jvmRoute=3D"worker1"><br> <br> = <br>So, am i missing something ? <br>I do not want to do any load-balancing= at the moment (i only have one instance of Jonas anyways), I just=0A want<br>Apache to redirect the request so that Jonas handles it.<b= r>Thanks for helping.</span></div><div><br></div><div style=3D"font-family:= times new roman, new york, times, serif;font-size:12pt;"><div style=3D"font= -family:times new roman, new york, times, serif;font-size:12pt;"><font face= =3D"Arial" size=3D"2"><hr size=3D"1"><b><span style=3D"font-weight:bold;">F= rom:</span></b> S. Ali Tokmen <[email protected]><br><b><span s= tyle=3D"font-weight:bold;">To:</span></b> [email protected]<br><b><span style= =3D"font-weight:bold;">Sent:</span></b> Sunday, October 2, 2011 1:02 AM<br>= <b><span style=3D"font-weight:bold;">Subject:</span></b> [jonas] Re: Re: Re= : Jonas 5.2.1 and Apache mod_jk<br></font><br>=0A<div id=3D"yiv1551226409">= =0A =0A=0A =0A =0A <div>=0A Hi Celinio<br>=0A <br>=0A OK, we= ll my personal recommendation is mod_proxy_ajp. It is=0A officially main= tained by the httpd project and has a great number of=0A stability and p= erformance improvements.<br>=0A <br>=0A If you want to hit the AJP po= rt, you should connect to the Apache=0A httpd server; i.e. not visit on = the 9000 port but the 80 (or=0A whatever other Apache httpd) port.<br>= =0A <br>=0A Cheers<br>=0A <br>=0A <pre class=3D"yiv1551226409mo= z-signature">S. Ali Tokmen=0Ahttp://ali.tokmen.com/=0A=0AGSM (ch): +41 79 2= 07 29 22 [Swisscom]=0AGSM (fr): +33 66 43 00 555 [Orange]=0AGSM (tr): +90 5= 55 266 52 73 [Avea]=0A=0AMy AIM, ICQ, MSN Messenger and Yahoo IM=0Acontact = details are on http://contact.ali.tokmen.com</pre>=0A <br>=0A On 2011= /10/01 19:26, Celinio Fernandes wrote:=0A <blockquote type=3D"cite">=0A = <div style=3D"color:#000;background-color:#fff;font-family:times new r= oman, new york, times, serif;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 webapp is using the=0A mod_jk co= nnector ?</span></div>=0A <div><span>I have installed and configured= it in Apache and I=0A have also configured it in Jonas.</span><= /div>=0A <div><span>I can also see the </span>AJP/JK connector=0A = configured on 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=0A that Apache redirects it to Jonas then ?= <br>=0A </div>=0A <div><br>=0A </div>=0A <div s= tyle=3D"font-family:times 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;"><font face=3D"Arial" size=3D"2">=0A <hr= size=3D"1"><b><span style=3D"font-weight:bold;">From:</span></b>=0A = S. Ali Tokmen <a rel=3D"nofollow" class=3D"yiv1551226409moz-txt-link= -rfc2396E" ymailto=3D"mailto:[email protected]" target=3D"_blank" hre= f=3D"mailto:[email protected]"><[email protected]></a><br= >=0A <b><span style=3D"font-weight:bold;">To:</span></b>=0A = <a rel=3D"nofollow" class=3D"yiv1551226409moz-txt-link-abbreviat= ed" ymailto=3D"mailto:[email protected]" target=3D"_blank" href=3D"mailto:jonas= @ow2.org">[email protected]</a><br>=0A <b><span style=3D"font-weig= ht:bold;">Sent:</span></b>=0A Saturday, October 1, 2011 5:49 P= M<br>=0A <b><span style=3D"font-weight:bold;">Subject:</span><= /b>=0A [jonas] Re: Jonas 5.2.1 and Apache mod_jk<br>=0A = </font><br>=0A <div id=3D"yiv1551226409">=0A <= div> Hi Celinio<br>=0A <br>=0A Is there a spa= cific reason why you're using mod_jk under=0A Apache httpd 2= .2 as opposed to the already embedded=0A mod_proxy_ajp?<br>= =0A <br>=0A Thank you<br>=0A <= br>=0A <pre class=3D"yiv1551226409moz-signature">S. Ali Tokm= en=0A<a rel=3D"nofollow" class=3D"yiv1551226409moz-txt-link-freetext" targe= t=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 [Oran= ge]=0AGSM (tr): +90 555 266 52 73 [Avea]=0A=0AMy AIM, ICQ, MSN Messenger an= d Yahoo IM=0Acontact details are on <a rel=3D"nofollow" class=3D"yiv1551226= 409moz-txt-link-freetext" target=3D"_blank" href=3D"http://contact.ali.tokm= en.com">http://contact.ali.tokmen.com</a></pre>=0A <br>=0A = On 2011/10/01 18:37, Celinio Fernandes wrote:=0A = <blockquote type=3D"cite">=0A <div style=3D"color:#000;= background-color:#fff;font-family:times new roman, new york, times, serif;f= ont-size:12pt;">=0A <div>Hi,</div>=0A = <div>I am trying to interface my instance of Jonas=0A = 5.2.1 with the connector mod_jk, in a Linux=0A enviro= nment (CentOS).<br>=0A </div>=0A <div= >I have added the module <a rel=3D"nofollow" target=3D"_blank" href=3D"http= ://mod_jk.so">mod_jk.so</a> to=0A /usr/lib64/httpd/mod= ules.</div>=0A <div><br>=0A </div>=0A= <div>My version of Apache is 2.2</div>=0A = <div><br>=0A </div>=0A <div>I h= ave configured /etc/httpd/conf/httpd.conf as=0A the fo= llowing :</div>=0A <div><br>=0A </div= >=0A <div>LoadModule jk_module modules/mod_jk.so <br>=0A= <br>=0A <IfModule jk_module&g= t;<br>=0A # Ou trouver workers.properties ?<br>=0A = JkWorkersFile /etc/httpd/conf/workers.properties<br>=0A = # Ou mettre la memoire partagee de jk<br>=0A = JkShmFile /etc/httpd/logs/mod_jk.shm<br>=0A = # Ou mettre les logs jk<br>=0A JkLogFile /etc/httpd/l= ogs/mod_jk.log<br>=0A # Positionner le niveau des logs= jk=0A [debug/error/info]<br>=0A = JkLogLevel info<br>=0A # Selectionner lef ormat des lo= gs pour le=0A timestamp<br>=0A Jk= LogStampFormat "[%a %b %d %H:%M:%S %Y] "<br>=0A #Forma= t des logs<br>=0A JkRequestLogFormat "%w %m %V %T"<br>= =0A # Envoyer les contextes dont le nom commence par= =0A test : /toto* vers le worker nomm=E9 worker1<br>= =0A JkMount /toto*/* worker1<br>=0A = # On peut placer ici plusieurs JkMount si on a=0A p= lusieurs contextes traites<br>=0A # par des workers di= fferents<br>=0A </IfModule></div>=0A = <div><br>=0A </div>=0A <div>I= have added the following worker in=0A /etc/httpd/conf= /worker.properties :</div>=0A <div><br>=0A = </div>=0A <div> #Define 1 worker<br>=0A = worker.list=3Dworker1<br>=0A &nb= sp;<br>=0A #Set properties for worker1 (ajp13)<b= r>=0A worker.worker1.type=3Dajp13<br>=0A = worker.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=0A = configured both tomcat6-server.xml and=0A = tomcat7-server.xml (since I do not know which one=0A i= s used). I have uncommented the following line=0A (cha= nged port 9009 to 8009)<br>=0A </div>=0A = <div><br>=0A </div>=0A <div> = ; <Connector port=3D"8009" protocol=3D"AJP/1.3"=0A = redirectPort=3D"9043" /></div>=0A <div><br>=0A = </div>=0A <div>My web app HTTP port in Jona= s is configured to=0A 9000.</div>=0A = <div>When I hit the URL http://blabla.com:9000/toto=0A = I can see in the Jonas logs that Jonas is=0A listen= ing to that connector but I have no idea=0A whether Ap= ache has handled the request or not.</div>=0A <div><br>= =0A </div>=0A <div>What can i do ? Am= i missing something ?</div>=0A <div>Thanks for 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=0A</div><br><br></div></div></div></div></div><br><br></div></div><= /div></body></html> --1844943856-616157934-1317557884=:7479--