Re: Re: Re: Re: Re: Re: Re: Re: Re: Jonas 5.2.1 and Apache mod_jk
Celinio Fernandes <[email protected]> Tue, 4 Oct 2011 00:40:01 -0700 (PDT)
| Newsgroups | gmane.comp.java.objectweb.jonas |
|---|---|
| Message-ID | <[email protected]> |
---1895320495-774324884-1317714001=:61904 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable I did that too, I forgot to mention it.=0AAny idea what's wrong ?=0AThanks.= =0A=0A=0A=0A________________________________=0AFrom: Son Tung Nguyen <snguy= [email protected]>=0ATo: [email protected]=0ASent: Tuesday, October 4, 2011 9:09= AM=0ASubject: [jonas] Re: Re: Re: Re: Re: Re: Re: Re: Jonas 5.2.1 and Apac= he mod_jk=0A=0A=0AIn jonas's tomcat6-server.xml ... =0ALe 4 oct. 2011 08:58= , "Son Tung Nguyen" <[email protected]> a =E9crit=A0:=0A>=0A> Hi, you m= ust also configure your engine for that. =0A> In your config of the Engine,= you have to precise what's the name of your jvmroute. Typically, "worker1"= in your case.=0A>=0A> Le 4 oct. 2011 03:26, "Celinio Fernandes" <cel975@ya= hoo.com> a =E9crit=A0:=0A>=0A> > Hi all,=0A> > thanks for helping.=0A> > = =0A> > I changed the log level to debug and here it what it says in /etc/ht= tpd/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_for_name::jk_worke= r.c (116): found a worker worker1=0A> > [debug] wc_get_name_for_type::jk_wo= rker.c (293): Found worker type 'ajp13'=0A> > [debug] uri_worker_map_ext::j= k_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): 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 worker 1: worker1 of type ajp13 (2)=0A> > [de= bug] 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 ext= ension for worker 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_na= me_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 3= : worker1 of type ajp13 (2)=0A> > [debug] uri_worker_map_dump::jk_uri_worke= r_map.c (171): uri map dump after extension stripping: index=3D0 file=3D'(n= ull)' 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 nosi= ze=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_wor= ker_map_dump::jk_uri_worker_map.c (186): NEXT (1) map #0: uri=3D/voltage-ge= stion/* worker=3Dworker1 context=3D/voltage-gestion/* source=3DJkMount type= =3DWildchar len=3D18=0A> > [debug] uri_worker_map_dump::jk_uri_worker_map.c= (186): NEXT (1) map #1: uri=3D/voltage-gestion/ worker=3Dworker1 context= =3D/voltage-gestion/ source=3DJkMount type=3DExact len=3D17=0A> > [debug] u= ri_worker_map_dump::jk_uri_worker_map.c (186): NEXT (1) map #2: uri=3D/volt= age-gestion* worker=3Dworker1 context=3D/voltage-gestion* source=3DJkMount = type=3DWildchar len=3D17=0A> > [debug] uri_worker_map_dump::jk_uri_worker_m= ap.c (186): NEXT (1) map #3: uri=3D/voltage-gestion worker=3Dworker1 contex= t=3D/voltage-gestion source=3DJkMount type=3DExact len=3D16=0A> > etc ...= =0A> > [debug] do_shm_open_lock::jk_shm.c (353): Duplicated shared memory l= ock /etc/httpd/logs/mod_jk.shm.27847.lock=0A> > [debug] jk_child_init::mod_= jk.c (3082): Initialized mod_jk/1.2.31 (1026297)=0A> > [debug] jk_translate= ::mod_jk.c (3434): missing uri map for default:/voltage-gestion=0A> > [debu= g] jk_map_to_storage::mod_jk.c (3593): missing uri map for default:/voltage= -gestion=0A> > =0A> > Here is my configuration again :=0A> > =0A> > I chang= ed 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> > <IfModule jk_module>=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> > JkWorkersFile /etc/htt= pd/conf/workers.properties=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> > JkShmFile /etc/httpd/logs/mod_jk.shm=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=A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0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 =0A> > =0A> > =0A> > I am not running any Virtual Host.= =A0=A0 =0A> > =0A> > /etc/httpd/conf/workers.properties :=0A> > =0A> > work= er.list=3Dworker1=0A> > # Define worker1=0A> > worker.worker1.port=3D8009= =0A> > worker.worker1.host=3Dlocalhost=0A> > worker.worker1.type=3Dajp13=0A= > > =0A> > =0A> > And regarding Jonas,=0A> > this is the line that i uncomm= ented 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 po= rt=3D"8009" protocol=3D"AJP/1.3" redirectPort=3D"9043" />=0A> > =0A> > =0A>= > Apache and Jonas are running on the same remote server. So I just use lo= calhost as the host.=0A> > Not the IP, not the domain name. Anyways, even i= f i try these it does not work. The URI is not mapped.=0A> > =0A> > The URL= s that i am trying to hit is :=0A> > http://<IP>:80/voltage-gestion=0A> > h= ttp://<hostname>:80/voltage-gestion=0A> > =0A> > =0A> > None works, I get t= he same error : missing uri map for default:/voltage-gestion=0A> > =0A> > A= ny idea ? Thanks=0A> > =0A> > =0A> > =0A> > =0A> > ________________________= ________=0A> > From: Benoit Pelletier <[email protected]>=0A> > To:= [email protected]=0A> > Sent: Monday, October 3, 2011 9:39 AM=0A> > Subject: [= jonas] Re: Re: Re: Re: Re: Re: Jonas 5.2.1 and Apache mod_jk=0A> > =0A> > = =0A> > Hi All,=0A> > =0A> > Hi Celinio=0A> >>=0A> >>Hmm... Where did you re= ad that?=0A> >>=0A> >>Anyhow, based on your description of the situation I = guess your=0A> > workers.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> >>>=0A> > You should add both= =0A> > =0A> > JkMount /toto worker1=0A> >>JkMount /toto/* worker1=0A> >>JkM= ountCopy Allou can=0A> >>=0A> >>=0A> > BTW, 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 debug level.=0A> > =0A> > Regards=0A> > =0A> > =0A> > =0A> >>or=0A> >>= =0A> >>=0A> >>JkMount /toto/* worker1=0A> >>>=0A> >>Also, try visiting http= ://blabla.com:80/toto/=0A> > (with the final slash)=0A> >>=0A> >>Thank you= =0A> >>=0A> >>=0A> >>S. Ali Tokmen=0A> > http://ali.tokmen.com/ GSM (ch): += 41 79 207 29 22 [Swisscom]=0A> > GSM (fr): +33 66 43 00 555 [Orange]=0A> > = GSM (tr): +90 555 266 52 73 [Avea] My AIM, ICQ, MSN Messenger and Yahoo IM= =0A> > contact details are on http://contact.ali.tokmen.com=0A> >>On 2011/1= 0/02 15:16, Celinio Fernandes wrote: =0A> >>Really ? I read that when it co= mes to load balancing and=0A> > failure detection, mod_jk is better than mo= d_proxy. =0A> >>>=0A> >>>Anyways, back to my problem :=0A> >>>If i hit the = URL http://blabla.com:80/toto=0A> > (port 80) it does not work. I get a "No= t found" error: "The requested=0A> > URL /toto/ was not found on this serve= r."=0A> >>>=0A> >>>The URL http://blabla.com:80/works.=A0=A0=0A> > Same thi= ng whether i use the IP or the hostname in worker's host=0A> > definition:= =0A> >>>worker.worker1.host=0A> >>>=0A> >>>I made another change in both to= mcat6-server.xml and=0A> > tomcat7-server.xml, I added the jvmRoute to the = worker :=0A> >>>=A0<Engine name=3D"JOnAS" defaultHost=3D"localhost" jvmRout= e=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 o= ne=0A> > instance of Jonas anyways), I just want=0A> >>>Apache to redirect = the request so that Jonas handles it.=0A> >>>Thanks for helping.=0A> >>>=0A= > >>>=0A> >>>=0A> >>>________________________________=0A> >>>From: S. Ali T= okmen <[email protected]>=0A> >>>To: [email protected]=0A> >>>Sent: Sunda= y,=0A> > October 2, 2011 1:02 AM=0A> >>>Subject: [jonas] Re:=0A> > Re: Re: = Jonas 5.2.1 and Apache mod_jk=0A> >>>=0A> >>>=0A> >>>Hi Celinio=0A> >>>=0A>= >>>OK, well my personal recommendation is mod_proxy_ajp. It is officially= =0A> > maintained by the httpd project and has a great number of stability = and=0A> > performance improvements.=0A> >>>=0A> >>>If you want to hit the A= JP port, you should connect to the Apache httpd=0A> > server; i.e. not visi= t on the 9000 port but the 80 (or whatever other=0A> > Apache httpd) port.= =0A> >>>=0A> >>>Cheers=0A> >>>=0A> >>>=0A> >>>S. Ali Tokmen http://ali.tokm= en.com/ GSM (ch): +41 79 207 29 22 [Swisscom]=0A> > GSM (fr): +33 66 43 00 = 555 [Orange]=0A> > GSM (tr): +90 555 266 52 73 [Avea] My AIM, ICQ, MSN Mess= enger and Yahoo IM=0A> > contact details are on http://contact.ali.tokmen.c= om=0A> >>>On 2011/10/01 19:26, Celinio Fernandes wrote: =0A> >>>Hi Ali,=0A>= >>>>there is no specific reason.=0A> >>>>=0A> >>>>=0A> >>>>Anyways, how ca= n i make sure my webapp is using the=0A> > mod_jk connector ?=0A> >>>>I hav= e installed and configured it in Apache and I=0A> > have also configured it= in Jonas.=0A> >>>>I can also see the AJP/JK connector configured=0A> > on = port 8009 in the Jonas console admin.=0A> >>>>=0A> >>>>=0A> >>>>Now how do = i make sure my request hits Apache first and that=0A> > 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,=0A> > October 1, 2011 5:49 = PM=0A> >>>>Subject: [jonas]=0A> > Re: Jonas 5.2.1 and Apache mod_jk=0A> >>>= >=0A> >>>>=0A> >>>>Hi Celinio=0A> >>>>=0A> >>>>Is there a spacific reason w= hy you're using mod_jk under Apache httpd=0A> > 2.2 as opposed to the alrea= dy 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 [Swiss= com]=0A> > GSM (fr): +33 66 43 00 555 [Orange]=0A> > GSM (tr): +90 555 266 = 52 73 [Avea] My AIM, ICQ, MSN Messenger and Yahoo IM=0A> > contact details = are on http://contact.ali.tokmen.com=0A> >>>>On 2011/10/01 18:37, Celinio F= ernandes wrote: =0A> >>>>Hi,=0A> >>>>>I am trying to interface my instance = of Jonas 5.2.1 with=0A> > the connector mod_jk, in a Linux environment (Cen= tOS).=0A> >>>>>=0A> >>>>>I have added the module mod_jk.so to /usr/lib64/ht= tpd/modules.=0A> >>>>>=0A> >>>>>=0A> >>>>>My version of Apache is 2.2=0A> >= >>>>=0A> >>>>>=0A> >>>>>I have configured /etc/httpd/conf/httpd.conf as the= =0A> > following :=0A> >>>>>=0A> >>>>>=0A> >>>>>LoadModule jk_module module= s/mod_jk.so =0A> >>>>>=0A> >>>>><IfModule jk_module>=0A> >>>>># Ou trouver = workers.properties ?=0A> >>>>>JkWorkersFile /etc/httpd/conf/workers.propert= ies=0A> >>>>># Ou mettre la 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> >>>>># Positionner le niveau des logs jk [deb= ug/error/info]=0A> >>>>>JkLogLevel info=0A> >>>>># Selectionner lef ormat d= es logs pour le timestamp=0A> >>>>>JkLogStampFormat "[%a %b %d %H:%M:%S %Y]= "=0A> >>>>>#Format des logs=0A> >>>>>JkRequestLogFormat "%w %m %V %T"=0A> = >>>>># Envoyer les contextes dont le nom commence par test : /toto* vers le= =0A> > worker nomm=E9 worker1=0A> >>>>>JkMount /toto*/* worker1=0A> >>>>># = On peut placer ici plusieurs JkMount si on a plusieurs contextes=0A> > trai= tes=0A> >>>>># par des workers differents=0A> >>>>></IfModule>=0A> >>>>>=0A= > >>>>>=0A> >>>>>I have added the following worker in=0A> > /etc/httpd/conf= /worker.properties :=0A> >>>>>=0A> >>>>>=0A> >>>>>=A0#Define 1 worker=0A> >= >>>>=A0worker.list=3Dworker1=0A> >>>>>=A0=0A> >>>>>=A0#Set properties for w= orker1 (ajp13)=0A> >>>>>=A0worker.worker1.type=3Dajp13=0A> >>>>>=A0worker.w= orker1.host=3Dblabla.com=0A> >>>>>=A0worker.worker1.port=3D8009=0A> >>>>>= =0A> >>>>>=0A> >>>>>=0A> >>>>>Under /home/test/jonas-full-5.2.1/conf/=A0 I = have configured=0A> > both tomcat6-server.xml and tomcat7-server.xml (since= I do not know=0A> > which one is used). I have uncommented the following l= ine (changed port=0A> > 9009 to 8009)=0A> >>>>>=0A> >>>>>=0A> >>>>>=0A> >>>= >>=A0 <Connector port=3D"8009" protocol=3D"AJP/1.3"=0A> > redirectPort=3D"9= 043" />=0A> >>>>>=0A> >>>>>=0A> >>>>>My web app HTTP port in Jonas is confi= gured to 9000.=0A> >>>>>When I hit the URL http://blabla.com:9000/toto=0A> = > I can see in the Jonas logs that Jonas is listening to that connector=0A>= > but I have no idea whether Apache has handled the request or not.=0A> >>= >>>=0A> >>>>>=0A> >>>>>What can i do ? Am i missing something ?=0A> >>>>>Th= anks for helping.=0A> >>>>=0A> >>>>=0A> >>>=0A> >>>=0A> > =0A> > =0A> > -- = ----------------------------------------------------------------=0A> > Beno= it Pelletier=0A> > http://jonas.ow2.org=0A> > Bull, Architect of an Open Wo= rld TM=0A> > http://www.bull.com ---1895320495-774324884-1317714001=:61904 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 did that= too, I forgot to mention it.</span></div><div><span>Any idea what's wrong = ?</span></div><div><span>Thanks.<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-s= ize: 12pt;"><font size=3D"2" face=3D"Arial"><hr size=3D"1"><b><span style= =3D"font-weight:bold;">From:</span></b> Son Tung Nguyen <[email protected]= tin.fr><br><b><span style=3D"font-weight: bold;">To:</span></b> jonas@ow= 2.org<br><b><span style=3D"font-weight: bold;">Sent:</span></b> Tuesday, Oc= tober 4, 2011 9:09 AM<br><b><span style=3D"font-weight: bold;">Subject:</sp= an></b> [jonas] Re: Re: Re: Re: Re: Re: Re: Re: Jonas 5.2.1 and Apache mod_= jk<br></font><br>=0A<div id=3D"yiv141484985"><div>In jonas's tomcat6-server= .xml ... </div>=0A<div>Le 4 oct. 2011 08:58, "Son Tung Nguyen" <<a rel= =3D"nofollow" ymailto=3D"mailto:[email protected]" target=3D"_blank" hr= ef=3D"mailto:[email protected]">[email protected]</a>> a =E9crit= :<br>=0A><br>=0A> Hi, you must also configure your engine for t= hat. <br>=0A> In your config of the Engine, you have to precise what's t= he name of your jvmroute. Typically, "worker1" in your case.<br>=0A><br>= =0A> Le 4 oct. 2011 03:26, "Celinio Fernandes" <<a rel=3D"nofollow" y= mailto=3D"mailto:[email protected]" target=3D"_blank" href=3D"mailto:cel975@= yahoo.com">[email protected]</a>> a =E9crit :<br>=0A><br>=0A> = > Hi all,<br>=0A> > thanks for helping.<br>=0A> > <br>=0A>= ; > I changed the log level to debug and here it what it says in /etc/ht= tpd/logs/mod_jk.log :<br>=0A> > <br>=0A> > [info] init_jk::mod_= jk.c (3198): mod_jk/1.2.31 (1026297) initialized<br>=0A> > [debug] wc= _get_worker_for_name::jk_worker.c (116): found a worker worker1<br>=0A> = > [debug] wc_get_name_for_type::jk_worker.c (293): Found worker type 'aj= p13'<br>=0A> > [debug] uri_worker_map_ext::jk_uri_worker_map.c (512):= Checking extension for worker 0: worker1 of type ajp13 (2)<br>=0A> >= [debug] wc_get_worker_for_name::jk_worker.c (116): found a worker worker1<= br>=0A> > [debug] wc_get_name_for_type::jk_worker.c (293): Found work= er type 'ajp13'<br>=0A> > [debug] uri_worker_map_ext::jk_uri_worker_m= ap.c (512): Checking extension for worker 1: worker1 of type ajp13 (2)<br>= =0A> > [debug] wc_get_worker_for_name::jk_worker.c (116): found a wor= ker worker1<br>=0A> > [debug] wc_get_name_for_type::jk_worker.c (293)= : Found worker type 'ajp13'<br>=0A> > [debug] uri_worker_map_ext::jk_= uri_worker_map.c (512): Checking extension for worker 2: worker1 of type aj= p13 (2)<br>=0A> > [debug] wc_get_worker_for_name::jk_worker.c (116): = found a worker worker1<br>=0A> > [debug] wc_get_name_for_type::jk_wor= ker.c (293): Found worker type 'ajp13'<br>=0A> > [debug] uri_worker_m= ap_ext::jk_uri_worker_map.c (512): Checking extension for worker 3: worker1= of type ajp13 (2)<br>=0A> > [debug] uri_worker_map_dump::jk_uri_work= er_map.c (171): uri map dump after extension stripping: index=3D0 file=3D'(= null)' reject_unsafe=3D0 reload=3D60 modified=3D0 checked=3D0<br>=0A> &g= t; [debug] uri_worker_map_dump::jk_uri_worker_map.c (176): generation 0: si= ze=3D0 nosize=3D0 capacity=3D0<br>=0A> > [debug] uri_worker_map_dump:= :jk_uri_worker_map.c (176): generation 1: size=3D4 nosize=3D0 capacity=3D4<= br>=0A> > [debug] uri_worker_map_dump::jk_uri_worker_map.c (186): NEX= T (1) map #0: uri=3D/voltage-gestion/* worker=3Dworker1 context=3D/voltage-= gestion/* source=3DJkMount type=3DWildchar len=3D18<br>=0A> > [debug]= uri_worker_map_dump::jk_uri_worker_map.c (186): NEXT (1) map #1: uri=3D/vo= ltage-gestion/ worker=3Dworker1 context=3D/voltage-gestion/ source=3DJkMoun= t type=3DExact len=3D17<br>=0A> > [debug] uri_worker_map_dump::jk_uri= _worker_map.c (186): NEXT (1) map #2: uri=3D/voltage-gestion* worker=3Dwork= er1 context=3D/voltage-gestion* source=3DJkMount type=3DWildchar len=3D17<b= r>=0A> > [debug] uri_worker_map_dump::jk_uri_worker_map.c (186): NEXT= (1) map #3: uri=3D/voltage-gestion worker=3Dworker1 context=3D/voltage-ges= tion source=3DJkMount type=3DExact len=3D16<br>=0A> > etc ...<br>=0A&= gt; > [debug] do_shm_open_lock::jk_shm.c (353): Duplicated shared memory= lock /etc/httpd/logs/mod_jk.shm.27847.lock<br>=0A> > [debug] jk_chil= d_init::mod_jk.c (3082): Initialized mod_jk/1.2.31 (1026297)<br>=0A> >= ; [debug] jk_translate::mod_jk.c (3434): missing uri map for default:/volta= ge-gestion<br>=0A> > [debug] jk_map_to_storage::mod_jk.c (3593): miss= ing uri map for default:/voltage-gestion<br>=0A> > <br>=0A> > H= ere is my configuration again :<br>=0A> > <br>=0A> > I changed = my /etc/httpd/conf/httpd.conf (I added 4 contexts for voltage-gestion):<br>= =0A> > &n= bsp;  = ; &n= bsp;  = ; &n= bsp;  = ; <br>=0A> > <IfModule jk_module> = &nb= sp; = &nb= sp; = &nb= sp; <br>= =0A> > JkWorkersFile /etc/httpd/conf/workers.properties &n= bsp;  = ; &n= bsp;  = ; <br>=0A> > JkShmFile /etc= /httpd/logs/mod_jk.shm  = ; &n= bsp;  = ; &n= bsp;  = ; <br>=0A> > JkLogFile /etc/httpd/logs/mod_jk.log &n= bsp;  = ; &n= bsp;  = ; &n= bsp; <br>=0A> > JkLogLevel debug &= nbsp; &nbs= p; &= nbsp; &nbs= p; &= nbsp; &nbs= p; &= nbsp; <br>=0A> > JkLogStampFormat "[%a %b %d %H:%M:%S %Y]= " &= nbsp; &nbs= p; &= nbsp; &nbs= p; <br>=0A> > JkRequestLogFormat "%w %m %V %T" = ; &n= bsp;  = ; &n= bsp;  = ; <= br>=0A> > JKMountCopy On &nb= sp; = &nb= sp; = &nb= sp; = <br>=0A&= gt; > JkMount /voltage-gestion/* worker1 &n= bsp;  = ; &n= bsp;  = ; &n= bsp; <br>=0A> > jkMount /voltage-gestio= n* worker1  = ; &n= bsp;  = ; &n= bsp;  = ; <br>=0A> > jkMount /voltage-gestion worker1 = &nb= sp; = &nb= sp; = <br>=0A> &g= t; jkMount /voltage-gestion/ worker1 &nb= sp; = &nb= sp; = &nb= sp; <br>=0A> > </IfModule> &= nbsp; &nbs= p; <br>=0A> > <br>=0A> > <br>=0A> &g= t; I am not running any Virtual Host. <br>=0A> > <br>=0A&= gt; > /etc/httpd/conf/workers.properties :<br>=0A> > <br>=0A> &= gt; worker.list=3Dworker1<br>=0A> > # Define worker1<br>=0A> > = worker.worker1.port=3D8009<br>=0A> > worker.worker1.host=3Dlocalhost<= br>=0A> > worker.worker1.type=3Dajp13<br>=0A> > <br>=0A> >= ; <br>=0A> > And regarding Jonas,<br>=0A> > this is the line th= at i uncommented both on tomcat6-server.xml and tomcat7-server.xml :<br>=0A= > > <br>=0A> > <!-- Define an AJP 1.3 Connector on port 9009= --><br>=0A> > <Connector port=3D"8009" prot= ocol=3D"AJP/1.3" redirectPort=3D"9043" /><br>=0A> > <br>=0A> &g= t; <br>=0A> > Apache and Jonas are running on the same remote server.= So I just use localhost as the host.<br>=0A> > Not the IP, not the d= omain name. Anyways, even if i try these it does not work. The URI is not m= apped.<br>=0A> > <br>=0A> > The URLs that i am trying to hit is= :<br>=0A> > http://<IP>:80/voltage-gestion<br>=0A> > htt= p://<hostname>:80/voltage-gestion<br>=0A> > <br>=0A> > <b= r>=0A> > None works, I get the same error : missing uri map for defau= lt:/voltage-gestion<br>=0A> > <br>=0A> > Any idea ? Thanks<br>= =0A> > <br>=0A> > <br>=0A> > <br>=0A> > <br>=0A>= > ________________________________<br>=0A> > From: Benoit Pelleti= er <<a rel=3D"nofollow" ymailto=3D"mailto:[email protected]" tar= get=3D"_blank" href=3D"mailto:[email protected]">benoit.pelletier@b= ull.net</a>><br>=0A> > To: <a rel=3D"nofollow" ymailto=3D"mailto:j= [email protected]" target=3D"_blank" href=3D"mailto:[email protected]">[email protected]= </a><br>=0A> > Sent: Monday, October 3, 2011 9:39 AM<br>=0A> > = Subject: [jonas] Re: Re: Re: Re: Re: Re: Jonas 5.2.1 and Apache mod_jk<br>= =0A> > <br>=0A> > <br>=0A> > Hi All,<br>=0A> > <br>= =0A> > Hi Celinio<br>=0A> >><br>=0A> >>Hmm... Where= did you read that?<br>=0A> >><br>=0A> >>Anyhow, based on= your description of the situation I guess your<br>=0A> > workers.pro= perties file is not good. I think:<br>=0A> >><br>=0A> >><= br>=0A> >>JkMount /toto*/* worker1<br>=0A> >>><br>=0A&= gt; >>Has to be corrected with:<br>=0A> >><br>=0A> >&g= t;<br>=0A> >>JkMount /toto* worker1<br>=0A> >>><br>=0A= > > You should add both<br>=0A> > <br>=0A> > JkMount /tot= o worker1<br>=0A> >>JkMount /toto/* worker1<br>=0A> >>JkM= ountCopy Allou can<br>=0A> >><br>=0A> >><br>=0A> > = BTW, did you take a look to the mod_jk's logs ? See<br>=0A> > /etc/ht= tpd/logs/mod_jk.log. If needed, you may enable the debug level.<br>=0A> = > <br>=0A> > Regards<br>=0A> > <br>=0A> > <br>=0A> = > <br>=0A> >>or<br>=0A> >><br>=0A> >><br>=0A&= gt; >>JkMount /toto/* worker1<br>=0A> >>><br>=0A> >= >Also, try visiting http://blabla.com:80/toto/<br>=0A> > (with the= final slash)<br>=0A> >><br>=0A> >>Thank you<br>=0A> &= gt;><br>=0A> >><br>=0A> >>S. Ali Tokmen<br>=0A> >= ; http://ali.tokmen.com/ GSM (ch): +41 79 207 29 22 [Swisscom]<br>=0A> &= gt; GSM (fr): +33 66 43 00 555 [Orange]<br>=0A> > GSM (tr): +90 555 2= 66 52 73 [Avea] My AIM, ICQ, MSN Messenger and Yahoo IM<br>=0A> > con= tact details are on http://contact.ali.tokmen.com<br>=0A> >>On 201= 1/10/02 15:16, Celinio Fernandes wrote: <br>=0A> >>Really ? I read= that when it comes to load balancing and<br>=0A> > failure detection= , mod_jk is better than mod_proxy. <br>=0A> >>><br>=0A> >= >>Anyways, back to my problem :<br>=0A> >>>If i hit the U= RL http://blabla.com:80/toto<br>=0A> > (port 80) it does not work. I = get a "Not found" error: "The requested<br>=0A> > URL /toto/ was not = found on this server."<br>=0A> >>><br>=0A> >>>The U= RL <a rel=3D"nofollow" target=3D"_blank" href=3D"http://blabla.com:80/works= ">http://blabla.com:80/works</a>. <br>=0A> > Same thing wh= ether i use the IP or the hostname in worker's host<br>=0A> > definit= ion:<br>=0A> >>>worker.worker1.host<br>=0A> >>><br>= =0A> >>>I made another change in both tomcat6-server.xml and<br= >=0A> > tomcat7-server.xml, I added the jvmRoute to the worker :<br>= =0A> >>> <Engine name=3D"JOnAS" defaultHost=3D"localhos= t" jvmRoute=3D"worker1"><br>=0A> >>> <br>=0A> >&g= t;> <br>=0A> >>>So, am i missing something ? <br>=0A>= ; >>>I do not want to do any load-balancing at the moment (i only = have one<br>=0A> > instance of Jonas anyways), I just want<br>=0A>= >>>Apache to redirect the request so that Jonas handles it.<br>= =0A> >>>Thanks for helping.<br>=0A> >>><br>=0A> = >>><br>=0A> >>><br>=0A> >>>_______________= _________________<br>=0A> >>>From: S. Ali Tokmen <<a rel=3D"= nofollow" ymailto=3D"mailto:[email protected]" target=3D"_blank" href= =3D"mailto:[email protected]">[email protected]</a>><br>=0A&= gt; >>>To: <a rel=3D"nofollow" ymailto=3D"mailto:[email protected]" ta= rget=3D"_blank" href=3D"mailto:[email protected]">[email protected]</a><br>=0A> = >>>Sent: Sunday,<br>=0A> > October 2, 2011 1:02 AM<br>=0A>= ; >>>Subject: [jonas] Re:<br>=0A> > Re: Re: Jonas 5.2.1 and = Apache mod_jk<br>=0A> >>><br>=0A> >>><br>=0A> &g= t;>>Hi Celinio<br>=0A> >>><br>=0A> >>>OK, wel= l my personal recommendation is mod_proxy_ajp. It is officially<br>=0A> = > maintained by the httpd project and has a great number of stability an= d<br>=0A> > performance improvements.<br>=0A> >>><br>=0A&= gt; >>>If you want to hit the AJP port, you should connect to the = Apache httpd<br>=0A> > server; i.e. not visit on the 9000 port but th= e 80 (or whatever other<br>=0A> > Apache httpd) port.<br>=0A> >= >><br>=0A> >>>Cheers<br>=0A> >>><br>=0A> &= gt;>><br>=0A> >>>S. Ali Tokmen <a rel=3D"nofollow" target= =3D"_blank" href=3D"http://ali.tokmen.com/">http://ali.tokmen.com/</a> GSM = (ch): +41 79 207 29 22 [Swisscom]<br>=0A> > GSM (fr): +33 66 43 00 55= 5 [Orange]<br>=0A> > GSM (tr): +90 555 266 52 73 [Avea] My AIM, ICQ, = MSN Messenger and Yahoo IM<br>=0A> > contact details are on <a rel=3D= "nofollow" target=3D"_blank" href=3D"http://contact.ali.tokmen.com">http://= contact.ali.tokmen.com</a><br>=0A> >>>On 2011/10/01 19:26, Celi= nio Fernandes wrote: <br>=0A> >>>Hi Ali,<br>=0A> >>>= ;>there is no specific reason.<br>=0A> >>>><br>=0A> &g= t;>>><br>=0A> >>>>Anyways, how can i make sure my w= ebapp is using the<br>=0A> > mod_jk connector ?<br>=0A> >>&g= t;>I have installed and configured it in Apache and I<br>=0A> > ha= ve also configured it in Jonas.<br>=0A> >>>>I can also see t= he AJP/JK connector configured<br>=0A> > on port 8009 in the Jonas co= nsole admin.<br>=0A> >>>><br>=0A> >>>><br>=0A= > >>>>Now how do i make sure my request hits Apache first an= d that<br>=0A> > Apache redirects it to Jonas then ?<br>=0A> >&= gt;>><br>=0A> >>>><br>=0A> >>>><br>=0A&= gt; >>>><br>=0A> >>>>___________________________= _____<br>=0A> >>>>From: S. Ali Tokmen <<a rel=3D"nofollow= " ymailto=3D"mailto:[email protected]" target=3D"_blank" href=3D"mail= to:[email protected]">[email protected]</a>><br>=0A> >= >>>To: <a rel=3D"nofollow" ymailto=3D"mailto:[email protected]" target= =3D"_blank" href=3D"mailto:[email protected]">[email protected]</a><br>=0A> >= >>>Sent: Saturday,<br>=0A> > October 1, 2011 5:49 PM<br>=0A&= gt; >>>>Subject: [jonas]<br>=0A> > Re: Jonas 5.2.1 and Ap= ache mod_jk<br>=0A> >>>><br>=0A> >>>><br>=0A&= gt; >>>>Hi Celinio<br>=0A> >>>><br>=0A> >&= gt;>>Is there a spacific reason why you're using mod_jk under Apache = httpd<br>=0A> > 2.2 as opposed to the already embedded mod_proxy_ajp?= <br>=0A> >>>><br>=0A> >>>>Thank you<br>=0A>= ; >>>><br>=0A> >>>><br>=0A> >>>>S= . Ali Tokmen <a rel=3D"nofollow" target=3D"_blank" href=3D"http://ali.tokme= n.com/">http://ali.tokmen.com/</a> GSM (ch): +41 79 207 29 22 [Swisscom]<br= >=0A> > GSM (fr): +33 66 43 00 555 [Orange]<br>=0A> > GSM (tr):= +90 555 266 52 73 [Avea] My AIM, ICQ, MSN Messenger and Yahoo IM<br>=0A>= ; > contact details are on <a rel=3D"nofollow" target=3D"_blank" href=3D= "http://contact.ali.tokmen.com">http://contact.ali.tokmen.com</a><br>=0A>= ; >>>>On 2011/10/01 18:37, Celinio Fernandes wrote: <br>=0A>= >>>>Hi,<br>=0A> >>>>>I am trying to interfac= e my instance of Jonas 5.2.1 with<br>=0A> > the connector mod_jk, in = a Linux environment (CentOS).<br>=0A> >>>>><br>=0A> &g= t;>>>>I have added the module <a target=3D"_blank" href=3D"http= ://mod_jk.so">mod_jk.so</a> to /usr/lib64/httpd/modules.<br>=0A> >>= ;>>><br>=0A> >>>>><br>=0A> >>>>&g= t;My version of Apache is 2.2<br>=0A> >>>>><br>=0A> &g= t;>>>><br>=0A> >>>>>I have configured /etc/ht= tpd/conf/httpd.conf as the<br>=0A> > following :<br>=0A> >>&= gt;>><br>=0A> >>>>><br>=0A> >>>>>= LoadModule jk_module modules/mod_jk.so <br>=0A> >>>>><br>= =0A> >>>>><IfModule jk_module><br>=0A> >>&= gt;>># Ou trouver workers.properties ?<br>=0A> >>>>>= ;JkWorkersFile /etc/httpd/conf/workers.properties<br>=0A> >>>&g= t;># Ou mettre la memoire partagee de jk<br>=0A> >>>>>= JkShmFile /etc/httpd/logs/mod_jk.shm<br>=0A> >>>>># Ou me= ttre les logs jk<br>=0A> >>>>>JkLogFile /etc/httpd/logs/m= od_jk.log<br>=0A> >>>>># Positionner le niveau des logs j= k [debug/error/info]<br>=0A> >>>>>JkLogLevel info<br>=0A&= gt; >>>>># Selectionner lef ormat des logs pour le timestamp= <br>=0A> >>>>>JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "<= br>=0A> >>>>>#Format des logs<br>=0A> >>>>= >JkRequestLogFormat "%w %m %V %T"<br>=0A> >>>>># Envoy= er les contextes dont le nom commence par test : /toto* vers le<br>=0A> = > worker nomm=E9 worker1<br>=0A> >>>>>JkMount /toto*/*= worker1<br>=0A> >>>>># On peut placer ici plusieurs JkMo= unt si on a plusieurs contextes<br>=0A> > traites<br>=0A> >>= >>># par des workers differents<br>=0A> >>>>><= ;/IfModule><br>=0A> >>>>><br>=0A> >>>>&= gt;<br>=0A> >>>>>I have added the following worker in<br>= =0A> > /etc/httpd/conf/worker.properties :<br>=0A> >>>>= ;><br>=0A> >>>>><br>=0A> >>>>> = #Define 1 worker<br>=0A> >>>>> worker.list=3Dworker1= <br>=0A> >>>>> <br>=0A> >>>>> = ;#Set properties for worker1 (ajp13)<br>=0A> >>>>> w= orker.worker1.type=3Dajp13<br>=0A> >>>>> worker.work= er1.host=3D<a rel=3D"nofollow" target=3D"_blank" href=3D"http://blabla.com"= >blabla.com</a><br>=0A> >>>>> worker.worker1.port=3D= 8009<br>=0A> >>>>><br>=0A> >>>>><br>=0A= > >>>>><br>=0A> >>>>>Under /home/test/j= onas-full-5.2.1/conf/ I have configured<br>=0A> > both tomcat6-= server.xml and tomcat7-server.xml (since I do not know<br>=0A> > whic= h one is used). I have uncommented the following line (changed port<br>=0A&= gt; > 9009 to 8009)<br>=0A> >>>>><br>=0A> >>&= gt;>><br>=0A> >>>>><br>=0A> >>>>>= <Connector port=3D"8009" protocol=3D"AJP/1.3"<br>=0A> > red= irectPort=3D"9043" /><br>=0A> >>>>><br>=0A> >>= ;>>><br>=0A> >>>>>My web app HTTP port in Jonas = is configured to 9000.<br>=0A> >>>>>When I hit the URL ht= tp://blabla.com:9000/toto<br>=0A> > I can see in the Jonas logs that = Jonas is listening to that connector<br>=0A> > but I have no idea whe= ther Apache has handled the request or not.<br>=0A> >>>>>= <br>=0A> >>>>><br>=0A> >>>>>What can i = do ? Am i missing something ?<br>=0A> >>>>>Thanks for hel= ping.<br>=0A> >>>><br>=0A> >>>><br>=0A> &g= t;>><br>=0A> >>><br>=0A> > <br>=0A> > <br>=0A= > > -- --------------------------------------------------------------= --<br>=0A> > Benoit Pelletier<br>=0A> > http://jonas.ow2.org<br= >=0A> > Bull, Architect of an Open World TM<br>=0A> > http://ww= w.bull.com <br>=0A</div>=0A</div><br><br></div></div></div></body></html> ---1895320495-774324884-1317714001=:61904--