【发布时间】:2016-01-12 08:35:09
【问题描述】:
我们已将 Apache 配置为通过 AJP 默认 8009 的不同端口重定向到 tomcat 实例。它仅适用于默认端口,但不适用于我们在 worker.properties 上设置的端口(8109)这是我们的场景
/etc/apache2 上的worker.properties
worker.list=sacmimexico
# Set properties for sacmimexico
worker.sacmimexico.type=ajp13
worker.sacmimexico.host=localhost
worker.sacmimexico.port=8109
server.xml 位于 /usr/share/instance-tomcat-7.0.42/sacmimexico/conf/
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8109" protocol="AJP/1.3" redirectPort="8143" />
mod_jk.log on /var/log/apache2
[Wed Oct 14 05:29:18 2015] [17752:140024424515392] [info] init_jk::mod_jk.c (3189): mod_jk/1.2.30 initialized
[Wed Oct 14 05:29:18 2015] [17753:140024424515392] [info] init_jk::mod_jk.c (3189): mod_jk/1.2.30 initialized
[Wed Oct 14 05:29:22 2015] [17757:140024328361728] [info] jk_open_socket::jk_connect.c (622): connect to 127.0.0.1:8009 failed (errno=111)
[Wed Oct 14 05:29:22 2015] [17757:140024328361728] [info] ajp_connect_to_endpoint::jk_ajp_common.c (959): Failed opening socket to (127.0.0.1:8009) (errno=111)
[Wed Oct 14 05:29:22 2015] [17757:140024328361728] [error] ajp_send_request::jk_ajp_common.c (1585): (sacmimexico) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[Wed Oct 14 05:29:22 2015] [17757:140024328361728] [info] ajp_service::jk_ajp_common.c (2540): (sacmimexico) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1)
[Wed Oct 14 05:29:22 2015] [17757:140024328361728] [info] jk_open_socket::jk_connect.c (622): connect to 127.0.0.1:8009 failed (errno=111)
[Wed Oct 14 05:29:22 2015] [17757:140024328361728] [info] ajp_connect_to_endpoint::jk_ajp_common.c (959): Failed opening socket to (127.0.0.1:8009) (errno=111)
[Wed Oct 14 05:29:22 2015] [17757:140024328361728] [error] ajp_send_request::jk_ajp_common.c (1585): (sacmimexico) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[Wed Oct 14 05:29:22 2015] [17757:140024328361728] [info] ajp_service::jk_ajp_common.c (2540): (sacmimexico) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2)
[Wed Oct 14 05:29:22 2015] [17757:140024328361728] [error] ajp_service::jk_ajp_common.c (2559): (sacmimexico) connecting to tomcat failed.
[Wed Oct 14 05:29:22 2015] sacmimexico 199.187.122.163 0.100588
[Wed Oct 14 05:29:22 2015] [17757:140024328361728] [info] jk_handler::mod_jk.c (2618): Service error=-3 for worker=sacmimexico
/etc/apache2/mods-available 上的 jk.conf
<IfModule mod_jk.c>
JkWorkersFile "/etc/apache2/workers.properties"
JkLogFile "/var/log/apache2/mod_jk.log"
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
</IfModule>
默认在 /etc/apache2/sites-available
JkMount /sacmimexico/* sacmimexico
版本:
Apache 2 :Apache/2.2.16 (Debian)
Tomcat 7:Apache Tomcat/7.0.42
mod-jk : 1.2.30-1squeeze1
我们知道 Tomcat 正在使用该端口 8109 有谁知道发生了什么?
谢谢
阿尔伯特
【问题讨论】:
标签: apache tomcat debian mod-jk