Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Jonas 5.2.1 and Apache mod_jk
Son Tung Nguyen <[email protected]> Tue, 4 Oct 2011 10:25:01 +0200
| Newsgroups | gmane.comp.java.objectweb.jonas |
|---|---|
| Message-ID | <CAF+mUonNO5aNo-upm41aiR07418Ck6_7RFLvTGvxx+A0G+u_CQ@mail.gmail.com> |
--001636499a2bfb79c404ae74d3c7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Try to copy follow lines in your worker.properties : worker.balancer.type=3Dlb worker.balancer.balanced_workers=3Dworker1 For the JkMount config, i think this may suffice JkMount /voltage-gestion* worker1 And in your tomcat6-server.xml, you may have something like : <Engine name=3D"Catalina" defaultHost=3D"localhost" jvmRoute=3D"worker1"> If that still not work, you may try to sniff the looping interface of your machine to determine where're going your requests ... If you're in Linux environment, verify if you don't have some iptables rule= s that block the forwarding mechanism .. hope this helps 2011/10/4 Celinio Fernandes <[email protected]> > I did that too, I forgot to mention it. > Any idea what's wrong ? > Thanks. > > ------------------------------ > *From:* Son Tung Nguyen <[email protected]> > *To:* [email protected] > *Sent:* Tuesday, October 4, 2011 9:09 AM > *Subject:* [jonas] Re: Re: Re: Re: Re: Re: Re: Re: Jonas 5.2.1 and Apache > mod_jk > > In jonas's tomcat6-server.xml ... > Le 4 oct. 2011 08:58, "Son Tung Nguyen" <[email protected]> a =E9crit= : > > > > Hi, you must also configure your engine for that. > > In your config of the Engine, you have to precise what's the name of yo= ur > jvmroute. Typically, "worker1" in your case. > > > > Le 4 oct. 2011 03:26, "Celinio Fernandes" <[email protected]> a =E9crit = : > > > > > Hi all, > > > thanks for helping. > > > > > > I changed the log level to debug and here it what it says in > /etc/httpd/logs/mod_jk.log : > > > > > > [info] init_jk::mod_jk.c (3198): mod_jk/1.2.31 (1026297) initialized > > > [debug] wc_get_worker_for_name::jk_worker.c (116): found a worker > worker1 > > > [debug] wc_get_name_for_type::jk_worker.c (293): Found worker type > 'ajp13' > > > [debug] uri_worker_map_ext::jk_uri_worker_map.c (512): Checking > extension for worker 0: worker1 of type ajp13 (2) > > > [debug] wc_get_worker_for_name::jk_worker.c (116): found a worker > worker1 > > > [debug] wc_get_name_for_type::jk_worker.c (293): Found worker type > 'ajp13' > > > [debug] uri_worker_map_ext::jk_uri_worker_map.c (512): Checking > extension for worker 1: worker1 of type ajp13 (2) > > > [debug] wc_get_worker_for_name::jk_worker.c (116): found a worker > worker1 > > > [debug] wc_get_name_for_type::jk_worker.c (293): Found worker type > 'ajp13' > > > [debug] uri_worker_map_ext::jk_uri_worker_map.c (512): Checking > extension for worker 2: worker1 of type ajp13 (2) > > > [debug] wc_get_worker_for_name::jk_worker.c (116): found a worker > worker1 > > > [debug] wc_get_name_for_type::jk_worker.c (293): Found worker type > 'ajp13' > > > [debug] uri_worker_map_ext::jk_uri_worker_map.c (512): Checking > extension for worker 3: worker1 of type ajp13 (2) > > > [debug] uri_worker_map_dump::jk_uri_worker_map.c (171): uri map dump > after extension stripping: index=3D0 file=3D'(null)' reject_unsafe=3D0 re= load=3D60 > modified=3D0 checked=3D0 > > > [debug] uri_worker_map_dump::jk_uri_worker_map.c (176): generation 0: > size=3D0 nosize=3D0 capacity=3D0 > > > [debug] uri_worker_map_dump::jk_uri_worker_map.c (176): generation 1: > size=3D4 nosize=3D0 capacity=3D4 > > > [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 > > > [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 > > > [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 > > > [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 > > > etc ... > > > [debug] do_shm_open_lock::jk_shm.c (353): Duplicated shared memory lo= ck > /etc/httpd/logs/mod_jk.shm.27847.lock > > > [debug] jk_child_init::mod_jk.c (3082): Initialized mod_jk/1.2.31 > (1026297) > > > [debug] jk_translate::mod_jk.c (3434): missing uri map for > default:/voltage-gestion > > > [debug] jk_map_to_storage::mod_jk.c (3593): missing uri map for > default:/voltage-gestion > > > > > > Here is my configuration again : > > > > > > I changed my /etc/httpd/conf/httpd.conf (I added 4 contexts for > voltage-gestion): > > > > > > > > <IfModule > jk_module> > > > > JkWorkersFile > /etc/httpd/conf/workers.properties > > > > JkShmFile > /etc/httpd/logs/mod_jk.shm > > > > JkLogFile > /etc/httpd/logs/mod_jk.log > > > > JkLogLevel > debug > > > > JkLogStampFormat "[%a %b %d %H:%M:%S %Y] > " > > > JkRequestLogFormat "%w %m %V > %T" > > > JKMountCopy > On > > > > JkMount /voltage-gestion/* > worker1 > > > jkMount /voltage-gestion* > worker1 > > > jkMount /voltage-gestion > worker1 > > > jkMount /voltage-gestion/ > worker1 > > > </IfModule> > > > > > > > > > I am not running any Virtual Host. > > > > > > /etc/httpd/conf/workers.properties : > > > > > > worker.list=3Dworker1 > > > # Define worker1 > > > worker.worker1.port=3D8009 > > > worker.worker1.host=3Dlocalhost > > > worker.worker1.type=3Dajp13 > > > > > > > > > And regarding Jonas, > > > this is the line that i uncommented both on tomcat6-server.xml and > tomcat7-server.xml : > > > > > > <!-- Define an AJP 1.3 Connector on port 9009 --> > > > <Connector port=3D"8009" protocol=3D"AJP/1.3" redirectPort=3D"904= 3" /> > > > > > > > > > Apache and Jonas are running on the same remote server. So I just use > localhost as the host. > > > Not the IP, not the domain name. Anyways, even if i try these it does > not work. The URI is not mapped. > > > > > > The URLs that i am trying to hit is : > > > http://<IP>:80/voltage-gestion > > > http://<hostname>:80/voltage-gestion > > > > > > > > > None works, I get the same error : missing uri map for > default:/voltage-gestion > > > > > > Any idea ? Thanks > > > > > > > > > > > > > > > ________________________________ > > > From: Benoit Pelletier <[email protected]> > > > To: [email protected] > > > Sent: Monday, October 3, 2011 9:39 AM > > > Subject: [jonas] Re: Re: Re: Re: Re: Re: Jonas 5.2.1 and Apache mod_j= k > > > > > > > > > Hi All, > > > > > > Hi Celinio > > >> > > >>Hmm... Where did you read that? > > >> > > >>Anyhow, based on your description of the situation I guess your > > > workers.properties file is not good. I think: > > >> > > >> > > >>JkMount /toto*/* worker1 > > >>> > > >>Has to be corrected with: > > >> > > >> > > >>JkMount /toto* worker1 > > >>> > > > You should add both > > > > > > JkMount /toto worker1 > > >>JkMount /toto/* worker1 > > >>JkMountCopy Allou can > > >> > > >> > > > BTW, did you take a look to the mod_jk's logs ? See > > > /etc/httpd/logs/mod_jk.log. If needed, you may enable the debug level= . > > > > > > Regards > > > > > > > > > > > >>or > > >> > > >> > > >>JkMount /toto/* worker1 > > >>> > > >>Also, try visiting http://blabla.com:80/toto/ > > > (with the final slash) > > >> > > >>Thank you > > >> > > >> > > >>S. Ali Tokmen > > > http://ali.tokmen.com/ GSM (ch): +41 79 207 29 22 [Swisscom] > > > GSM (fr): +33 66 43 00 555 [Orange] > > > GSM (tr): +90 555 266 52 73 [Avea] My AIM, ICQ, MSN Messenger and > Yahoo IM > > > contact details are on http://contact.ali.tokmen.com > > >>On 2011/10/02 15:16, Celinio Fernandes wrote: > > >>Really ? I read that when it comes to load balancing and > > > failure detection, mod_jk is better than mod_proxy. > > >>> > > >>>Anyways, back to my problem : > > >>>If i hit the URL http://blabla.com:80/toto > > > (port 80) it does not work. I get a "Not found" error: "The requested > > > URL /toto/ was not found on this server." > > >>> > > >>>The URL http://blabla.com:80/works. > > > Same thing whether i use the IP or the hostname in worker's host > > > definition: > > >>>worker.worker1.host > > >>> > > >>>I made another change in both tomcat6-server.xml and > > > tomcat7-server.xml, I added the jvmRoute to the worker : > > >>> <Engine name=3D"JOnAS" defaultHost=3D"localhost" jvmRoute=3D"worker= 1"> > > >>> > > >>> > > >>>So, am i missing something ? > > >>>I do not want to do any load-balancing at the moment (i only have on= e > > > instance of Jonas anyways), I just want > > >>>Apache to redirect the request so that Jonas handles it. > > >>>Thanks for helping. > > >>> > > >>> > > >>> > > >>>________________________________ > > >>>From: S. Ali Tokmen <[email protected]> > > >>>To: [email protected] > > >>>Sent: Sunday, > > > October 2, 2011 1:02 AM > > >>>Subject: [jonas] Re: > > > Re: Re: Jonas 5.2.1 and Apache mod_jk > > >>> > > >>> > > >>>Hi Celinio > > >>> > > >>>OK, well my personal recommendation is mod_proxy_ajp. It is official= ly > > > maintained by the httpd project and has a great number of stability a= nd > > > performance improvements. > > >>> > > >>>If you want to hit the AJP port, you should connect to the Apache > httpd > > > server; i.e. not visit on the 9000 port but the 80 (or whatever other > > > Apache httpd) port. > > >>> > > >>>Cheers > > >>> > > >>> > > >>>S. Ali Tokmen http://ali.tokmen.com/ GSM (ch): +41 79 207 29 22[Swis= scom] > > > GSM (fr): +33 66 43 00 555 [Orange] > > > GSM (tr): +90 555 266 52 73 [Avea] My AIM, ICQ, MSN Messenger and > Yahoo IM > > > contact details are on http://contact.ali.tokmen.com > > >>>On 2011/10/01 19:26, Celinio Fernandes wrote: > > >>>Hi Ali, > > >>>>there is no specific reason. > > >>>> > > >>>> > > >>>>Anyways, how can i make sure my webapp is using the > > > mod_jk connector ? > > >>>>I have installed and configured it in Apache and I > > > have also configured it in Jonas. > > >>>>I can also see the AJP/JK connector configured > > > on port 8009 in the Jonas console admin. > > >>>> > > >>>> > > >>>>Now how do i make sure my request hits Apache first and that > > > Apache redirects it to Jonas then ? > > >>>> > > >>>> > > >>>> > > >>>> > > >>>>________________________________ > > >>>>From: S. Ali Tokmen <[email protected]> > > >>>>To: [email protected] > > >>>>Sent: Saturday, > > > October 1, 2011 5:49 PM > > >>>>Subject: [jonas] > > > Re: Jonas 5.2.1 and Apache mod_jk > > >>>> > > >>>> > > >>>>Hi Celinio > > >>>> > > >>>>Is there a spacific reason why you're using mod_jk under Apache htt= pd > > > 2.2 as opposed to the already embedded mod_proxy_ajp? > > >>>> > > >>>>Thank you > > >>>> > > >>>> > > >>>>S. Ali Tokmen http://ali.tokmen.com/ GSM (ch): +41 79 207 29 22[Swi= sscom] > > > GSM (fr): +33 66 43 00 555 [Orange] > > > GSM (tr): +90 555 266 52 73 [Avea] My AIM, ICQ, MSN Messenger and > Yahoo IM > > > contact details are on http://contact.ali.tokmen.com > > >>>>On 2011/10/01 18:37, Celinio Fernandes wrote: > > >>>>Hi, > > >>>>>I am trying to interface my instance of Jonas 5.2.1 with > > > the connector mod_jk, in a Linux environment (CentOS). > > >>>>> > > >>>>>I have added the module mod_jk.so to /usr/lib64/httpd/modules. > > >>>>> > > >>>>> > > >>>>>My version of Apache is 2.2 > > >>>>> > > >>>>> > > >>>>>I have configured /etc/httpd/conf/httpd.conf as the > > > following : > > >>>>> > > >>>>> > > >>>>>LoadModule jk_module modules/mod_jk.so > > >>>>> > > >>>>><IfModule jk_module> > > >>>>># Ou trouver workers.properties ? > > >>>>>JkWorkersFile /etc/httpd/conf/workers.properties > > >>>>># Ou mettre la memoire partagee de jk > > >>>>>JkShmFile /etc/httpd/logs/mod_jk.shm > > >>>>># Ou mettre les logs jk > > >>>>>JkLogFile /etc/httpd/logs/mod_jk.log > > >>>>># Positionner le niveau des logs jk [debug/error/info] > > >>>>>JkLogLevel info > > >>>>># Selectionner lef ormat des logs pour le timestamp > > >>>>>JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " > > >>>>>#Format des logs > > >>>>>JkRequestLogFormat "%w %m %V %T" > > >>>>># Envoyer les contextes dont le nom commence par test : /toto* ver= s > le > > > worker nomm=E9 worker1 > > >>>>>JkMount /toto*/* worker1 > > >>>>># On peut placer ici plusieurs JkMount si on a plusieurs contextes > > > traites > > >>>>># par des workers differents > > >>>>></IfModule> > > >>>>> > > >>>>> > > >>>>>I have added the following worker in > > > /etc/httpd/conf/worker.properties : > > >>>>> > > >>>>> > > >>>>> #Define 1 worker > > >>>>> worker.list=3Dworker1 > > >>>>> > > >>>>> #Set properties for worker1 (ajp13) > > >>>>> worker.worker1.type=3Dajp13 > > >>>>> worker.worker1.host=3Dblabla.com > > >>>>> worker.worker1.port=3D8009 > > >>>>> > > >>>>> > > >>>>> > > >>>>>Under /home/test/jonas-full-5.2.1/conf/ I have configured > > > both tomcat6-server.xml and tomcat7-server.xml (since I do not know > > > which one is used). I have uncommented the following line (changed po= rt > > > 9009 to 8009) > > >>>>> > > >>>>> > > >>>>> > > >>>>> <Connector port=3D"8009" protocol=3D"AJP/1.3" > > > redirectPort=3D"9043" /> > > >>>>> > > >>>>> > > >>>>>My web app HTTP port in Jonas is configured to 9000. > > >>>>>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. > > >>>>> > > >>>>> > > >>>>>What can i do ? Am i missing something ? > > >>>>>Thanks for helping. > > >>>> > > >>>> > > >>> > > >>> > > > > > > > > > -- ---------------------------------------------------------------- > > > Benoit Pelletier > > > http://jonas.ow2.org > > > Bull, Architect of an Open World TM > > > http://www.bull.com > > > --=20 ~~~~~~~~~~~~~~~~~~~ Sontung NGUYEN --001636499a2bfb79c404ae74d3c7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Try to copy follow lines in your worker.properties :<br><br>worker.balancer= .type=3Dlb<br>worker.balancer.balanced_workers=3Dworker1<br><br>For the JkM= ount config, i think this may suffice <br><br>JkMount /voltage-gestion* wor= ker1 <br> <br>And in your tomcat6-server.xml, you may have something like :<br><br>&l= t;Engine name=3D"Catalina" defaultHost=3D"localhost" jv= mRoute=3D"worker1"><br><br>If that still not work, you may try= to sniff the looping interface of your machine to determine where're g= oing your requests ... <br> <br>If you're in Linux environment, verify if you don't have some i= ptables rules that block the forwarding mechanism ..<br><br>hope this helps= <br><br><div class=3D"gmail_quote">2011/10/4 Celinio Fernandes <span dir= =3D"ltr"><<a href=3D"mailto:[email protected]">[email protected]</a>></= span><br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex;"><div><div style=3D"color:#000;background-co= lor:#fff;font-family:times new roman, new york, times, serif;font-size:12pt= "> <div><span>I did that too, I forgot to mention it.</span></div><div><span>A= ny 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, s= erif;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"fon= t-weight:bold">From:</span></b> Son Tung Nguyen <<a href=3D"mailto:snguy= [email protected]" target=3D"_blank">[email protected]</a>><br> <b><span style=3D"font-weight:bold">To:</span></b> <a href=3D"mailto:jonas@= ow2.org" target=3D"_blank">[email protected]</a><br><b><span style=3D"font-weig= ht:bold">Sent:</span></b> Tuesday, October 4, 2011 9:09 AM<br><b><span styl= e=3D"font-weight:bold">Subject:</span></b> [jonas] Re: Re: Re: Re: Re: Re: = Re: Re: Jonas 5.2.1 and Apache mod_jk<br> </font><div><div></div><div class=3D"h5"><br> <div><div>In jonas's tomcat6-server.xml ... </div> <div>Le 4 oct. 2011 08:58, "Son Tung Nguyen" <<a rel=3D"nofoll= ow" href=3D"mailto:[email protected]" target=3D"_blank">[email protected]= tin.fr</a>> a =E9crit=A0:<br> ><br> > Hi, you must also configure your engine for that. <br> > In your config of the Engine, you have to precise what's the name = of your jvmroute. Typically, "worker1" in your case.<br> ><br> > Le 4 oct. 2011 03:26, "Celinio Fernandes" <<a rel=3D"nofo= llow" href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</= a>> a =E9crit=A0:<br> ><br> > > Hi all,<br> > > thanks for helping.<br> > > <br> > > I changed the log level to debug and here it what it says in /etc= /httpd/logs/mod_jk.log :<br> > > <br> > > [info] init_jk::mod_jk.c (3198): mod_jk/1.2.31 (1026297) initiali= zed<br> > > [debug] wc_get_worker_for_name::jk_worker.c (116): found a worker= worker1<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): Checking e= xtension for worker 0: worker1 of type ajp13 (2)<br> > > [debug] wc_get_worker_for_name::jk_worker.c (116): found a worker= worker1<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): Checking e= xtension for worker 1: worker1 of type ajp13 (2)<br> > > [debug] wc_get_worker_for_name::jk_worker.c (116): found a worker= worker1<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): Checking e= xtension for worker 2: worker1 of type ajp13 (2)<br> > > [debug] wc_get_worker_for_name::jk_worker.c (116): found a worker= worker1<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): Checking e= xtension for worker 3: worker1 of type ajp13 (2)<br> > > [debug] uri_worker_map_dump::jk_uri_worker_map.c (171): uri map d= ump after extension stripping: index=3D0 file=3D'(null)' reject_uns= afe=3D0 reload=3D60 modified=3D0 checked=3D0<br> > > [debug] uri_worker_map_dump::jk_uri_worker_map.c (176): generatio= n 0: size=3D0 nosize=3D0 capacity=3D0<br> > > [debug] uri_worker_map_dump::jk_uri_worker_map.c (176): generatio= n 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-gestio= n/* source=3DJkMount type=3DWildchar len=3D18<br> > > [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<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): Duplicated shared memor= y lock /etc/httpd/logs/mod_jk.shm.27847.lock<br> > > [debug] 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 defaul= t:/voltage-gestion<br> > > [debug] jk_map_to_storage::mod_jk.c (3593): missing uri map for d= efault:/voltage-gestion<br> > > <br> > > Here is my configuration again :<br> > > <br> > > I changed my /etc/httpd/conf/httpd.conf (I added 4 contexts for v= oltage-gestion):<br> > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 <br> > > <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 <br> > > JkWorkersFile /etc/htt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0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 <br> > > jkMount /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 <br> > > </IfModule>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 <br> > > <br> > > <br> > > I am not running any Virtual Host.=A0=A0 <br> > > <br> > > /etc/httpd/conf/workers.properties :<br> > > <br> > > worker.list=3Dworker1<br> > > # Define worker1<br> > > worker.worker1.port=3D8009<br> > > worker.worker1.host=3Dlocalhost<br> > > worker.worker1.type=3Dajp13<br> > > <br> > > <br> > > And regarding Jonas,<br> > > this is the line that i uncommented both on tomcat6-server.xml an= d tomcat7-server.xml :<br> > > <br> > > <!-- Define an AJP 1.3 Connector on port 9009 --><br> > > =A0=A0=A0 <Connector port=3D"8009" protocol=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.<br> > > <br> > > The URLs that i am trying to hit is :<br> > > http://<IP>:80/voltage-gestion<br> > > http://<hostname>:80/voltage-gestion<br> > > <br> > > <br> > > None works, I get the same error : missing uri map for default:/v= oltage-gestion<br> > > <br> > > Any idea ? Thanks<br> > > <br> > > <br> > > <br> > > <br> > > ________________________________<br> > > From: Benoit Pelletier <<a rel=3D"nofollow" href=3D"mailto:ben= [email protected]" target=3D"_blank">[email protected]</a>>= <br> > > To: <a rel=3D"nofollow" href=3D"mailto:[email protected]" target=3D"_= blank">[email protected]</a><br> > > Sent: Monday, October 3, 2011 9:39 AM<br> > > Subject: [jonas] Re: Re: Re: Re: Re: Re: Jonas 5.2.1 and Apache m= od_jk<br> > > <br> > > <br> > > Hi All,<br> > > <br> > > Hi Celinio<br> > >><br> > >>Hmm... Where did you read that?<br> > >><br> > >>Anyhow, based on your description of the situation I guess you= r<br> > > workers.properties file is not good. I think:<br> > >><br> > >><br> > >>JkMount /toto*/* worker1<br> > >>><br> > >>Has to be corrected with:<br> > >><br> > >><br> > >>JkMount /toto* worker1<br> > >>><br> > > You should add both<br> > > <br> > > JkMount /toto worker1<br> > >>JkMount /toto/* worker1<br> > >>JkMountCopy Allou can<br> > >><br> > >><br> > > BTW, did you take a look to the mod_jk's logs ? See<br> > > /etc/httpd/logs/mod_jk.log. If needed, you may enable the debug l= evel.<br> > > <br> > > Regards<br> > > <br> > > <br> > > <br> > >>or<br> > >><br> > >><br> > >>JkMount /toto/* worker1<br> > >>><br> > >>Also, try visiting <a href=3D"http://blabla.com:80/toto/" targ= et=3D"_blank">http://blabla.com:80/toto/</a><br> > > (with the final slash)<br> > >><br> > >>Thank you<br> > >><br> > >><br> > >>S. Ali Tokmen<br> > > <a href=3D"http://ali.tokmen.com/" target=3D"_blank">http://ali.t= okmen.com/</a> GSM (ch): <a href=3D"tel:%2B41%2079%20207%2029%2022" value= =3D"+41792072922" target=3D"_blank">+41 79 207 29 22</a> [Swisscom]<br> > > GSM (fr): <a href=3D"tel:%2B33%2066%2043%2000%20555" value=3D"+33= 664300555" target=3D"_blank">+33 66 43 00 555</a> [Orange]<br> > > GSM (tr): <a href=3D"tel:%2B90%20555%20266%2052%2073" value=3D"+9= 05552665273" target=3D"_blank">+90 555 266 52 73</a> [Avea] My AIM, ICQ, MS= N Messenger and Yahoo IM<br> > > contact details are on <a href=3D"http://contact.ali.tokmen.com" = target=3D"_blank">http://contact.ali.tokmen.com</a><br> > >>On 2011/10/02 15:16, Celinio Fernandes wrote: <br> > >>Really ? I read that when it comes to load balancing and<br> > > failure detection, mod_jk is better than mod_proxy. <br> > >>><br> > >>>Anyways, back to my problem :<br> > >>>If i hit the URL <a href=3D"http://blabla.com:80/toto" tar= get=3D"_blank">http://blabla.com:80/toto</a><br> > > (port 80) it does not work. I get a "Not found" error: = "The requested<br> > > URL /toto/ was not found on this server."<br> > >>><br> > >>>The URL <a rel=3D"nofollow" href=3D"http://blabla.com:80/w= orks" target=3D"_blank">http://blabla.com:80/works</a>.=A0=A0<br> > > Same thing whether i use the IP or the hostname in worker's h= ost<br> > > definition:<br> > >>>worker.worker1.host<br> > >>><br> > >>>I made another change in both tomcat6-server.xml and<br> > > tomcat7-server.xml, I added the jvmRoute to the worker :<br> > >>>=A0<Engine name=3D"JOnAS" defaultHost=3D"= ;localhost" jvmRoute=3D"worker1"><br> > >>>=A0<br> > >>>=A0<br> > >>>So, am i missing something ? <br> > >>>I do not want to do any load-balancing at the moment (i on= ly have one<br> > > instance of Jonas anyways), I just want<br> > >>>Apache to redirect the request so that Jonas handles it.<b= r> > >>>Thanks for helping.<br> > >>><br> > >>><br> > >>><br> > >>>________________________________<br> > >>>From: S. Ali Tokmen <<a rel=3D"nofollow" href=3D"mailto= :[email protected]" target=3D"_blank">[email protected]</a>>= <br> > >>>To: <a rel=3D"nofollow" href=3D"mailto:[email protected]" targ= et=3D"_blank">[email protected]</a><br> > >>>Sent: Sunday,<br> > > October 2, 2011 1:02 AM<br> > >>>Subject: [jonas] Re:<br> > > Re: Re: Jonas 5.2.1 and Apache mod_jk<br> > >>><br> > >>><br> > >>>Hi Celinio<br> > >>><br> > >>>OK, well my personal recommendation is mod_proxy_ajp. It i= s officially<br> > > maintained by the httpd project and has a great number of stabili= ty and<br> > > performance improvements.<br> > >>><br> > >>>If you want to hit the AJP port, you should connect to the= Apache httpd<br> > > server; i.e. not visit on the 9000 port but the 80 (or whatever o= ther<br> > > Apache httpd) port.<br> > >>><br> > >>>Cheers<br> > >>><br> > >>><br> > >>>S. Ali Tokmen <a rel=3D"nofollow" href=3D"http://ali.tokme= n.com/" target=3D"_blank">http://ali.tokmen.com/</a> GSM (ch): <a href=3D"t= el:%2B41%2079%20207%2029%2022" value=3D"+41792072922" target=3D"_blank">+41= 79 207 29 22</a> [Swisscom]<br> > > GSM (fr): <a href=3D"tel:%2B33%2066%2043%2000%20555" value=3D"+33= 664300555" target=3D"_blank">+33 66 43 00 555</a> [Orange]<br> > > GSM (tr): <a href=3D"tel:%2B90%20555%20266%2052%2073" value=3D"+9= 05552665273" target=3D"_blank">+90 555 266 52 73</a> [Avea] My AIM, ICQ, MS= N Messenger and Yahoo IM<br> > > contact details are on <a rel=3D"nofollow" href=3D"http://contact= .ali.tokmen.com" target=3D"_blank">http://contact.ali.tokmen.com</a><br> > >>>On 2011/10/01 19:26, Celinio Fernandes wrote: <br> > >>>Hi Ali,<br> > >>>>there is no specific reason.<br> > >>>><br> > >>>><br> > >>>>Anyways, how can i make sure my webapp is using the<br= > > > mod_jk connector ?<br> > >>>>I have installed and configured it in Apache and I<br> > > have also configured it in Jonas.<br> > >>>>I can also see the AJP/JK connector configured<br> > > on port 8009 in the Jonas console admin.<br> > >>>><br> > >>>><br> > >>>>Now how do i make sure my request hits Apache first an= d that<br> > > Apache redirects it to Jonas then ?<br> > >>>><br> > >>>><br> > >>>><br> > >>>><br> > >>>>________________________________<br> > >>>>From: S. Ali Tokmen <<a rel=3D"nofollow" href=3D"ma= ilto:[email protected]" target=3D"_blank">[email protected]</a>= ><br> > >>>>To: <a rel=3D"nofollow" href=3D"mailto:[email protected]" = target=3D"_blank">[email protected]</a><br> > >>>>Sent: Saturday,<br> > > October 1, 2011 5:49 PM<br> > >>>>Subject: [jonas]<br> > > Re: Jonas 5.2.1 and Apache mod_jk<br> > >>>><br> > >>>><br> > >>>>Hi Celinio<br> > >>>><br> > >>>>Is there a spacific reason why you're using mod_jk= under Apache httpd<br> > > 2.2 as opposed to the already embedded mod_proxy_ajp?<br> > >>>><br> > >>>>Thank you<br> > >>>><br> > >>>><br> > >>>>S. Ali Tokmen <a rel=3D"nofollow" href=3D"http://ali.t= okmen.com/" target=3D"_blank">http://ali.tokmen.com/</a> GSM (ch): <a href= =3D"tel:%2B41%2079%20207%2029%2022" value=3D"+41792072922" target=3D"_blank= ">+41 79 207 29 22</a> [Swisscom]<br> > > GSM (fr): <a href=3D"tel:%2B33%2066%2043%2000%20555" value=3D"+33= 664300555" target=3D"_blank">+33 66 43 00 555</a> [Orange]<br> > > GSM (tr): <a href=3D"tel:%2B90%20555%20266%2052%2073" value=3D"+9= 05552665273" target=3D"_blank">+90 555 266 52 73</a> [Avea] My AIM, ICQ, MS= N Messenger and Yahoo IM<br> > > contact details are on <a rel=3D"nofollow" href=3D"http://contact= .ali.tokmen.com" target=3D"_blank">http://contact.ali.tokmen.com</a><br> > >>>>On 2011/10/01 18:37, Celinio Fernandes wrote: <br> > >>>>Hi,<br> > >>>>>I am trying to interface my instance of Jonas 5.2.= 1 with<br> > > the connector mod_jk, in a Linux environment (CentOS).<br> > >>>>><br> > >>>>>I have added the module <a href=3D"http://mod_jk.s= o" target=3D"_blank">mod_jk.so</a> to /usr/lib64/httpd/modules.<br> > >>>>><br> > >>>>><br> > >>>>>My version of Apache is 2.2<br> > >>>>><br> > >>>>><br> > >>>>>I have configured /etc/httpd/conf/httpd.conf as th= e<br> > > following :<br> > >>>>><br> > >>>>><br> > >>>>>LoadModule jk_module modules/mod_jk.so <br> > >>>>><br> > >>>>><IfModule jk_module><br> > >>>>># Ou trouver workers.properties ?<br> > >>>>>JkWorkersFile /etc/httpd/conf/workers.properties<b= r> > >>>>># Ou mettre la memoire partagee de jk<br> > >>>>>JkShmFile /etc/httpd/logs/mod_jk.shm<br> > >>>>># Ou mettre les logs jk<br> > >>>>>JkLogFile /etc/httpd/logs/mod_jk.log<br> > >>>>># Positionner le niveau des logs jk [debug/error/i= nfo]<br> > >>>>>JkLogLevel info<br> > >>>>># Selectionner lef ormat des logs pour le timestam= p<br> > >>>>>JkLogStampFormat "[%a %b %d %H:%M:%S %Y] &quo= t;<br> > >>>>>#Format des logs<br> > >>>>>JkRequestLogFormat "%w %m %V %T"<br> > >>>>># Envoyer les contextes dont le nom commence par t= est : /toto* vers le<br> > > worker nomm=E9 worker1<br> > >>>>>JkMount /toto*/* worker1<br> > >>>>># On peut placer ici plusieurs JkMount si on a plu= sieurs contextes<br> > > traites<br> > >>>>># par des workers differents<br> > >>>>></IfModule><br> > >>>>><br> > >>>>><br> > >>>>>I have added the following worker in<br> > > /etc/httpd/conf/worker.properties :<br> > >>>>><br> > >>>>><br> > >>>>>=A0#Define 1 worker<br> > >>>>>=A0worker.list=3Dworker1<br> > >>>>>=A0<br> > >>>>>=A0#Set properties for worker1 (ajp13)<br> > >>>>>=A0worker.worker1.type=3Dajp13<br> > >>>>>=A0worker.worker1.host=3D<a rel=3D"nofollow" href= =3D"http://blabla.com" target=3D"_blank">blabla.com</a><br> > >>>>>=A0worker.worker1.port=3D8009<br> > >>>>><br> > >>>>><br> > >>>>><br> > >>>>>Under /home/test/jonas-full-5.2.1/conf/=A0 I have = configured<br> > > both tomcat6-server.xml and tomcat7-server.xml (since I do not kn= ow<br> > > which one is used). I have uncommented the following line (change= d port<br> > > 9009 to 8009)<br> > >>>>><br> > >>>>><br> > >>>>><br> > >>>>>=A0 <Connector port=3D"8009" protocol= =3D"AJP/1.3"<br> > > redirectPort=3D"9043" /><br> > >>>>><br> > >>>>><br> > >>>>>My web app HTTP port in Jonas is configured to 900= 0.<br> > >>>>>When I hit the URL <a href=3D"http://blabla.com:90= 00/toto" target=3D"_blank">http://blabla.com:9000/toto</a><br> > > I can see in the Jonas logs that Jonas is listening to that conne= ctor<br> > > but I have no idea whether Apache has handled the request or not.= <br> > >>>>><br> > >>>>><br> > >>>>>What can i do ? Am i missing something ?<br> > >>>>>Thanks for helping.<br> > >>>><br> > >>>><br> > >>><br> > >>><br> > > <br> > > <br> > > -- --------------------------------------------------------------= --<br> > > Benoit Pelletier<br> > > <a href=3D"http://jonas.ow2.org" target=3D"_blank">http://jonas.o= w2.org</a><br> > > Bull, Architect of an Open World TM<br> > > <a href=3D"http://www.bull.com" target=3D"_blank">http://www.bull= .com</a> <br> </div> </div><br><br></div></div></div></div></div></div></blockquote></div><br><b= r clear=3D"all"><br>-- <br>~~~~~~~~~~~~~~~~~~~<br>Sontung NGUYEN<br><br> --001636499a2bfb79c404ae74d3c7--