Re: Getting Apache 2.2.29 to work with tomcat 8.0.21 using mod_jk 1.2.40 on a mac

2015-04-22 Thread Mayuresh
Thanks a lot *Neven *and* Rainer*!! That was my problem!! I changed the
worker port to 8009 and everything is good.

Thanks for your help!!

On Wed, Apr 22, 2015 at 4:46 AM, Rainer Jung rainer.j...@kippdata.de
wrote:

 Am 22.04.2015 um 11:33 schrieb Mayuresh:

 Hi Gurus,

 i am trying to make this combination and am stumbled at a place. After a
 lot of searching and experimenting I finally decided to post this question
 here.

 I am trying to load a page which loads just fine directly on tomcat.
 However if I try to load it through the Apache web server, it fails with a
 502 on apache (400 on tomcat)

 For an unsuccessful request through apache I see the following in the
 logs,
 where all the headers seem to be garbled:
 22-Apr-2015 01:53:46.656 FINE [http-nio-8080-exec-1]
 org.apache.tomcat.util.modeler.BaseModelMBean.preRegister preRegister
 org.apache.coyote.RequestInfo@616702aa
 Catalina:type=RequestProcessor,worker=http-nio-8080,name=HttpRequest1
 22-Apr-2015 01:53:46.657 FINE [http-nio-8080-exec-1]
 org.apache.coyote.http11.AbstractNioInputBuffer.parseRequestLine Received
 [^R4^B^G^B^B^@^HHTTP/1.1^@^@^M/greeting/abc^@^@
   10.0.0.23^@ÿÿ^@^Posxltmkshi.local^@ü^@^@
   ^K^@^Uosxltmkshi.local:9980^@ ^F^@
 keep-alive^@ ^L^@^Hno-cache^@^@^MCache-Control^@^@^Hno-cache^@

 ^A^@Jtext/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8^@
 ^N^@wMozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36
 (KHTML, like Gecko) Chrome/42.0.2311.90
 Safari/537.36^@^@^OAccept-Encoding^@^@^Sgzip, deflate,

 sdch^@^@^OAccept-Language^@^@^Nen-US,en;q=0.8^@^@^OX-Forwarded-For^@^@^L14.102.224.6^@
 ^H^@^A0^@
 ^@^OAJP_REMOTE_PORT^@^@^E55806^@
 ^@^PJK_LB_ACTIVATION^@^@^CACT^@ÿ]


 mod_jk talks the AJP protocol, so you need to connect it to the Tomcat AJP
 connector. You instead connected it to the Tomcat HTTP connector. You
 probably have configured port 8080 in the mod_jk config instead of 8009
 (default AJP port in Tomcat default server.xml).

 Regards,

 Rainer


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-- 
-Mayuresh


Getting Apache 2.2.29 to work with tomcat 8.0.21 using mod_jk 1.2.40 on a mac

2015-04-22 Thread Mayuresh
Hi Gurus,

i am trying to make this combination and am stumbled at a place. After a
lot of searching and experimenting I finally decided to post this question
here.

I am trying to load a page which loads just fine directly on tomcat.
However if I try to load it through the Apache web server, it fails with a
502 on apache (400 on tomcat)

For an unsuccessful request through apache I see the following in the logs,
where all the headers seem to be garbled:
22-Apr-2015 01:53:46.656 FINE [http-nio-8080-exec-1]
org.apache.tomcat.util.modeler.BaseModelMBean.preRegister preRegister
org.apache.coyote.RequestInfo@616702aa
Catalina:type=RequestProcessor,worker=http-nio-8080,name=HttpRequest1
22-Apr-2015 01:53:46.657 FINE [http-nio-8080-exec-1]
org.apache.coyote.http11.AbstractNioInputBuffer.parseRequestLine Received
[^R4^B^G^B^B^@^HHTTP/1.1^@^@^M/greeting/abc^@^@
 10.0.0.23^@ÿÿ^@^Posxltmkshi.local^@ü^@^@
 ^K^@^Uosxltmkshi.local:9980^@ ^F^@
keep-alive^@ ^L^@^Hno-cache^@^@^MCache-Control^@^@^Hno-cache^@
^A^@Jtext/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8^@
^N^@wMozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/42.0.2311.90
Safari/537.36^@^@^OAccept-Encoding^@^@^Sgzip, deflate,
sdch^@^@^OAccept-Language^@^@^Nen-US,en;q=0.8^@^@^OX-Forwarded-For^@^@^L14.102.224.6^@
^H^@^A0^@
^@^OAJP_REMOTE_PORT^@^@^E55806^@
^@^PJK_LB_ACTIVATION^@^@^CACT^@ÿ]

0:0:0:0:0:0:0:1 - - [22/Apr/2015:01:47:03 -0700] - 400 -

For Successful page load directly through tomcat I see the following in the
log:
22-Apr-2015 01:48:56.176 FINE [http-nio-8080-exec-1]
org.apache.tomcat.util.modeler.modules.MbeansDescriptorsIntrospectionSource.createManagedBean
Setting name: org.apache.coyote.RequestInfo
22-Apr-2015 01:48:56.176 FINE [http-nio-8080-exec-1]
org.apache.tomcat.util.modeler.BaseModelMBean.preRegister preRegister
org.apache.coyote.RequestInfo@630018d0
Catalina:type=RequestProcessor,worker=http-nio-8080,name=HttpRequest1
22-Apr-2015 01:48:56.178 FINE [http-nio-8080-exec-1]
org.apache.coyote.http11.AbstractNioInputBuffer.parseRequestLine Received
[GET /greeting/abcde HTTP/1.1^M
Host: localhost:8080^M
Connection: keep-alive^M
Cache-Control: max-age=0^M
Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8^M
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36^M
Accept-Encoding: gzip, deflate, sdch^M
Accept-Language: en-US,en;q=0.8^M
Cookie: JSESSIONID=CB0590CD16933826596C4E78AE4FDB5F^M
X-Forwarded-For: 14.102.224.6^M
^M
]

127.0.0.1 - - [22/Apr/2015:01:48:56 -0700] GET /greeting/abcde HTTP/1.1
200 1726
127.0.0.1 - - [22/Apr/2015:01:49:00 -0700] GET /greetingab.js HTTP/1.1
200 4

I can't seem to find why this is happening. Can you please help me figure
out what the problem might be?

Thanks,
Mayuresh