Apache Tomcat Connectors :
http://tomcat.apache.org/connectors-doc/
JK?
- extend mod_jserv
-
mod_jserv?
- jserv : Servlet 컨테이너 (servlet 2.0 지원/jsp 지원 X)
- jserv를 Apache HTTP Server에 연결하기 위한 모듈 -
mod_jserv는 설정하고 사용하기에 “너무 복잡!”
- 가장 큰 단점은 오직 Unix 플랫폼에서의 Apache HTTP Server만 지원 -
이러한 단점 극복하고자 개발한 것이 JK Connector!
. 다양한 플랫폼 지원
. Apache HTTP Server, iplanet, IIS 등 지원
. SSL 지원
. mod_jk, isapi, nsapi, dsapi
JK2 Connector
- JK Connector를 재구성(Refactoring)해서 만든 Connector
- Apache 2.0을 대상으로 설계 (1.3도 지원하긴 함)
-
Multi Thread 형태 웹서버와 연동될 때 성능 향상
- IIS, iPlanet, Apahce HTTP Server 2.x
Connector Source
ajp13 Protocol
- ajp13 : Apache JServ Protocol version 1.3
- packet-oriented
- Gal Shachor (original designer)
- Dan Milstein : cleaned up the Java code -> more readable!
-
ajp12 -> ajp13
- Increasing performance (speed, specifically)
- Adding support for SSL
Download
Configuration
-
Reference Guide :
http://tomcat.apache.org/connectors-doc/reference/apache.html -
WebServer HOWTO : Apache
http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html
Error Case
-
연결 실패 시
- connecting to tomcat failed
-
message send 실패 시
- all endpoints are disconnected
- failed sending request
- tomcat is probably not started
-
message reply 실패 시
- tomcat is down or refused connection
- tomcat is down, stopped or network problem
-
WEB mod_jk 모듈에서 Connection Error 발생
- jk module이 back-end 서버 (WAS)로 부터 reply를 받지 못할 경우 출력
Tomcat is down or refused?connection. No response has been sent to the client (yet)
-
WAS에서 Exception 발생
- ajp listener가 request를 기다리거나 response를 보내려는 중에 socket이 close
read request stopped.cause: java.net.SocketException: Connection reset
-
connecting to Tomcat failed
- 소스 배포 등으로 WAS 다운 시 발생
-
Apache/mod_jk/Tomcat cannot send the response to the client anymore, because basically the client is not there anymore.
HOWTO
- try “netstat ?an”
- try “top” or “ps” to see what Apache processes are doing
- look at the Apache access and error logs
[info] ajp_process_callback::jk_ajp_common.c (1788): Writing to client aborted or client network problems [info] ajp_service::jk_ajp_common.c (2447): (node1) sending request to tomcat failed (unrecoverable), because of client write error (attempt=1)
JkLogLevel
JkLogLevel set the log level between :
- info log will contains standard mod_jk activity (default).
- error log will contains also error reports.
- debug log will contains all information on mod_jk activity
Bug