# Apache Tomcat Connector (OpenExchange)



## VariableWorm (21. Januar 2005)

Hallo Tuts,

 ich habe gestern stundenlang daran gesessen, openexchange auf meinem SuSE Linux 9.1 Root bei 1&1 zu installieren. Dazu gabs auch einige Tuts, hat soweit auch geklappt. Das Login Formular funktioniert (auf Perl Basis), allerdings bekomme ich dann eine Fehlermeldung, wenn der Apache auf das Servlet zugreifen möchte. Die Apache ErrorLog gibt dazu nichts aus, jedoch der Apache Tomcat Connector:


*/var/log/apache2/mod_jk.log*

 [Fri Jan 21 10:33:11 2005]  [jk_uri_worker_map.c (500)]: Attempting to map URI '/servlet/intranet'
 [Fri Jan 21 10:33:11 2005]  [jk_uri_worker_map.c (524)]: jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 -> /servlet/
 [Fri Jan 21 10:33:11 2005]  [mod_jk.c (1717)]: Into handler r->proxyreq=0 r->handler=jakarta-servlet r->notes=136804968 worker=ajp13
 [Fri Jan 21 10:33:11 2005]  [jk_worker.c (132)]: Into wc_get_worker_for_name ajp13
 [Fri Jan 21 10:33:11 2005]  [jk_worker.c (136)]: wc_get_worker_for_name, done  found a worker
 [Fri Jan 21 10:33:11 2005]  [mod_jk.c (505)]: agsp=80 agsn=www.rul3d.net hostn=www.rul3d.net shostn=web0.p15132429.pureserver.info cbsport=0 sport=0
 [Fri Jan 21 10:33:11 2005]  [jk_ajp_common.c (1693)]: Into jk_worker_t::get_endpoint
 [Fri Jan 21 10:33:11 2005]  [jk_ajp_common.c (1326)]: Into jk_endpoint_t::service
 [Fri Jan 21 10:33:11 2005]  [jk_ajp_common.c (298)]: Into ajp_marshal_into_msgb
 [Fri Jan 21 10:33:11 2005]  [jk_ajp_common.c (466)]: ajp_marshal_into_msgb - Done
 [Fri Jan 21 10:33:11 2005]  [jk_connect.c (174)]: Into jk_open_socket
 [Fri Jan 21 10:33:11 2005]  [jk_connect.c (181)]: jk_open_socket, try to connect socket = 19
 [Fri Jan 21 10:33:11 2005]  [jk_connect.c (190)]: jk_open_socket, after connect ret = -1
 [Fri Jan 21 10:33:11 2005]  [jk_connect.c (219)]: jk_open_socket, connect() failed errno = 111
 [Fri Jan 21 10:33:11 2005]  [jk_ajp_common.c (760)]: Error connecting to tomcat. Tomcat is probably not started or is listenning on the wrong port. Failed errno = 111
 [Fri Jan 21 10:33:11 2005]  [jk_ajp_common.c (1060)]: Error connecting to the Tomcat process.
 [Fri Jan 21 10:33:11 2005]  [jk_ajp_common.c (1427)]: sending request to tomcat failed in send loop. err=0
 [Fri Jan 21 10:33:11 2005]  [jk_connect.c (174)]: Into jk_open_socket
 [Fri Jan 21 10:33:11 2005]  [jk_connect.c (181)]: jk_open_socket, try to connect socket = 19
 [Fri Jan 21 10:33:11 2005]  [jk_connect.c (190)]: jk_open_socket, after connect ret = -1
 [Fri Jan 21 10:33:11 2005]  [jk_connect.c (219)]: jk_open_socket, connect() failed errno = 111
 [Fri Jan 21 10:33:11 2005]  [jk_ajp_common.c (760)]: Error connecting to tomcat. Tomcat is probably not started or is listenning on the wrong port. Failed errno = 111
 [Fri Jan 21 10:33:11 2005]  [jk_ajp_common.c (1060)]: Error connecting to the Tomcat process.
 [Fri Jan 21 10:33:11 2005]  [jk_ajp_common.c (1427)]: sending request to tomcat failed in send loop. err=1
 [Fri Jan 21 10:33:11 2005]  [jk_connect.c (174)]: Into jk_open_socket
 [Fri Jan 21 10:33:11 2005]  [jk_connect.c (181)]: jk_open_socket, try to connect socket = 19
 [Fri Jan 21 10:33:11 2005]  [jk_connect.c (190)]: jk_open_socket, after connect ret = -1
 [Fri Jan 21 10:33:11 2005]  [jk_connect.c (219)]: jk_open_socket, connect() failed errno = 111
 [Fri Jan 21 10:33:11 2005]  [jk_ajp_common.c (760)]: Error connecting to tomcat. Tomcat is probably not started or is listenning on the wrong port. Failed errno = 111
 [Fri Jan 21 10:33:11 2005]  [jk_ajp_common.c (1060)]: Error connecting to the Tomcat process.
 [Fri Jan 21 10:33:11 2005]  [jk_ajp_common.c (1427)]: sending request to tomcat failed in send loop. err=1
 [Fri Jan 21 10:33:11 2005]  [jk_connect.c (174)]: Into jk_open_socket
 [Fri Jan 21 10:33:11 2005]  [jk_connect.c (181)]: jk_open_socket, try to connect socket = 19
 [Fri Jan 21 10:33:11 2005]  [jk_connect.c (190)]: jk_open_socket, after connect ret = -1
 [Fri Jan 21 10:33:11 2005]  [jk_connect.c (219)]: jk_open_socket, connect() failed errno = 111
 [Fri Jan 21 10:33:11 2005]  [jk_ajp_common.c (760)]: Error connecting to tomcat. Tomcat is probably not started or is listenning on the wrong port. Failed errno = 111
 [Fri Jan 21 10:33:11 2005]  [jk_ajp_common.c (1060)]: Error connecting to the Tomcat process.
 [Fri Jan 21 10:33:11 2005]  [jk_ajp_common.c (1427)]: sending request to tomcat failed in send loop. err=2
 [Fri Jan 21 10:33:11 2005]  [jk_ajp_common.c (1436)]: Error connecting to tomcat. Tomcat is probably not started or is listening on the wrong port. worker=ajp13 failed errno = 111
 [Fri Jan 21 10:33:11 2005]  [jk_ajp_common.c (1676)]: Into jk_endpoint_t::done, closing connection 0
 [Fri Jan 21 10:33:11 2005]  [jk_ajp_common.c (608)]: In jk_endpoint_t::ajp_close_endpoint


 Ich habe daraus gelesen, dass der Tomcat wohl auf nem falschen Port lauschen würde, der Apache das aber nicht besser weiß. Ich weiß allerdings nicht besser, wie ich das ändere.

 Folgende Konfigurationen habe ich verwendet:

*/etc/apache2/conf.d/jk.conf*

 <IfModule mod_jk.c>

     JkWorkersFile /etc/tomcat/base/workers.properties
     JkLogFile /var/log/apache2/mod_jk.log

     # Log level to be used by mod_jk
     JkLogLevel debug

     # mount the tomcat servlet katalogen og webdav
     JkMount /servlet/* ajp13
     JkMount /servlet/webdav.contacts/* ajp13

     # The following line makes apache aware of the location of
     # the /servlet
     Alias /servlet "/srv/www/tomcat/base/webapps/servlet"
     <Directory "/srv/www/tomcat/demoserver/webapps/servlets-examples">
        Options Indexes FollowSymLinks
        allow from all
     </Directory>


     # The following line prohibits users from directly accessing WEB-INF
     <Location "/servlet/WEB-INF/">
        AllowOverride None
        deny from all
     </Location>

 </IfModule>


* /etc/tomcat/base/workers.properties
*
 workers.tomcat_home=/usr/share/tomcat
 workers.java_home=/usr/lib/java
 ps=/

 worker.list=ajp13, ajp14
 worker.ajp13.port=8009
 worker.ajp13.host=localhost
 worker.ajp13.type=ajp13
 worker.ajp13.lbfactor=1

 worker.ajp14.port=8010
 worker.ajp14.host=localhost
 worker.ajp14.type=ajp14
 worker.ajp14.secretkey=secret
 worker.ajp14.credentials=myveryrandomentropy
 worker.ajp14.lbfactor=1

 worker.loadbalancer.type=lb
 worker.loadbalancer.balanced_workers=ajp13
 worker.inprocess.type=jni
 worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar
 worker.inprocess.cmd_line=start
 worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)jvm.dll
 worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
 worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr


 Könnt ihr mir da weiterhelfen ?

 Grüße


----------

