Chinaunix

标题: 渴望高手赐教!tomcat+apache+mod_jk连接,出现500错误解决方法! [打印本页]

作者: 轻逐微风    时间: 2010-05-24 23:08
标题: 渴望高手赐教!tomcat+apache+mod_jk连接,出现500错误解决方法!
本帖最后由 轻逐微风 于 2010-05-24 23:10 编辑

软件版本:apache-tomcat-5.5.29

          httpd-2.2.15

          tomcat-connectors-1.2.28(apache2.0的mod_jk.so)

          apache的配置文件httpd.conf中用语句include包含了jk.conf文件

tomcat的配置文件基本没改,唯一改的地方是在<Engine name="Catalina" defaultHost="localhost" />中添加了jvmRoute="tomcat1"

jk.conf文件内容为

  1. LoadModule jk_module modules/mod_jk.so
  2. JkWorkersFile /usr/local/httpd/conf/workers.properties
  3. JkMountFile /usr/local/httpd/conf/uriworkermap.properties
  4. JkLogFile /usr/local/httpd/logs/mod_jk.log
  5. JKmount /servlet/* ajp13
  6. Jkmount /*.jsp ajp13
  7. JkLogLevel info
复制代码

workers.properties文件内容为

  1. worker.list=tomcat1
  2. worker.tomcat1.port=8009
  3. worker.tomcat1.host=localhost
  4. worker.tomcat1.type=ajp13
  5. worker.tomcat1.lbfactor=1
复制代码


uriworkermap.properties文件中的内容为

  1. /*=tomcat1
  2. !/*jpg=tomcat1
  3. !/*gif=tomcat1
  4. !/*png=tomcat1
  5. !/*bmp=tomcat1
  6. !/*html=tomcat1
  7. !/*swf=tomcat1
  8. !/*css=tomcat1
  9. !/*js=tomcat1
  10. !/*jsp=tomcat1
复制代码

屏蔽掉uriworkermap.properties文件中的如下语句后。在浏览器中能看到apache首页的图片文件,也可以看到其它html页面。

  1. !/*jpg=tomcat1
  2. !/*gif=tomcat1
  3. !/*png=tomcat1
  4. !/*bmp=tomcat1
  5. !/*html=tomcat1
  6. !/*swf=tomcat1
  7. !/*css=tomcat1
  8. !/*js=tomcat1
  9. !/*jsp=tomcat1
复制代码

否则会出现如下图的错误——无法看到tomcat的log图片,并且访问http://11.92.0.237/manager/html等相似页面会出现404错误


apache的错误日志截图如下:

渴望找个像朋友一样的师傅,平时可能遇到配置问题,百度,google后向您讨教。

我现在是学生,工作后定当重谢,你的恩情将永不相忘!

我们学校教的linux比较浅(连编译安装以及shell都没教过),自学起来比较困难,学习速度较缓慢,其主要原因是遇到一个很简单的问题,由于没有经验导致浪费时间诸多。

自己又比较喜欢Linux并且准备在以后从事相关工作,个人有c基础。

我的qq122363326


作者: 轻逐微风    时间: 2010-05-24 23:35
本帖最后由 轻逐微风 于 2010-05-24 23:36 编辑

刚才把uriworkermap.properties文件中的屏蔽选项都去掉了
改为如下:

  1. /*=tomcat1

  2. /*jpg=tomcat1
  3. /*gif=tomcat1
  4. /*png=tomcat1
  5. /*bmp=tomcat1
  6. /*html=tomcat1
  7. /*swf=tomcat1
  8. /*css=tomcat1
  9. /*js=tomcat1
  10. /*jsp=tomcat1
复制代码

这个时候访问http://11.92.0.237/test/可以访问了



/usr/local/tomcat/webapps/test下有index.jsp文件

但是用http://11.92.0.237/test/index.jsp还是不能访问
出现以前的500错误,如果是这样的话,我以后的非index.jsp文件不是永远无法访问???

作者: blueswxs    时间: 2010-05-25 09:02
JKmount /servlet/* ajp13

Jkmount /*.jsp ajp13

再加一句

Jkmount /test/* ajp13
作者: 轻逐微风    时间: 2010-05-25 13:28
回复 3# blueswxs


    非常感谢!不过我照你说的测试了一下,访问http://11.92.0.237/test/以及http://11.92.0.237/test/index.jsp匀出现500错误了!首页面还是能正常访问。

作者: 轻逐微风    时间: 2010-05-25 13:37
本帖最后由 轻逐微风 于 2010-05-25 13:50 编辑

经过 blueswxs (孤独蓝)的提醒,才发现出来。
问题出现在把处理的东西交给了ajp13。

根据我上面的配置,不知道这样理解是否正确,望大家再指明一下,以解后学者之忧。

解决办法将如下语句
  1. JKmount /servlet/* ajp13
  2. Jkmount /*.jsp ajp13
  3. Jkmount /test/* ajp13
复制代码
改为
  1. JKmount /servlet/*  tomcat1
  2. Jkmount /*.jsp tomcat1
  3. Jkmount /test/* tomcat1
复制代码



作者: blueswxs    时间: 2010-05-25 15:21
/usr/local/httpd/logs/mod_jk.log

日志,贴贴,看看有什么问题。
作者: 轻逐微风    时间: 2010-05-25 22:36
本帖最后由 轻逐微风 于 2010-05-25 22:43 编辑

回复 6# blueswxs


下面是单tomcat1(非集群)照上面的配置做出来的所有日志 mod_jk.log文件
结果晚上的时候,在房做了集群,发现严重问题,就是:用了tomcat1不用ajp13还集什么群啊???!!!

[Sun May 23 07:26:14.054 2010] [4523:467954352] [info] init_jk::mod_jk.c (3183): mod_jk/1.2.28 initialized
[Sun May 23 07:26:14.055 2010] [4523:467954352] [error] uri_worker_map_ext::jk_uri_worker_map.c (506): Could not find worker with name 'ajp13' in uri map post processing.
[Sun May 23 07:26:14.055 2010] [4523:467954352] [error] uri_worker_map_ext::jk_uri_worker_map.c (506): Could not find worker with name 'ajp13' in uri map post processing.
[Sun May 23 07:26:15.002 2010] [4524:467954352] [info] init_jk::mod_jk.c (3183): mod_jk/1.2.28 initialized
[Sun May 23 07:26:15.002 2010] [4524:467954352] [error] uri_worker_map_ext::jk_uri_worker_map.c (506): Could not find worker with name 'ajp13' in uri map post processing.
[Sun May 23 07:26:15.002 2010] [4524:467954352] [error] uri_worker_map_ext::jk_uri_worker_map.c (506): Could not find worker with name 'ajp13' in uri map post processing.
[Sun May 23 07:26:22.075 2010] [4525:467954352] [info] jk_open_socket::jk_connect.c (594): connect to 11.92.0.237:8180 failed (errno=111)
[Sun May 23 07:26:22.075 2010] [4525:467954352] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (11.92.0.237:8180) (errno=111)
[Sun May 23 07:26:22.075 2010] [4525:467954352] [error] ajp_send_request::jk_ajp_common.c (1507): (tomcat1) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[Sun May 23 07:26:22.075 2010] [4525:467954352] [info] ajp_service::jk_ajp_common.c (2447): (tomcat1) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1)
[Sun May 23 07:26:22.174 2010] [4525:467954352] [info] jk_open_socket::jk_connect.c (594): connect to 11.92.0.237:8180 failed (errno=111)
[Sun May 23 07:26:22.174 2010] [4525:467954352] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (11.92.0.237:8180) (errno=111)
[Sun May 23 07:26:22.174 2010] [4525:467954352] [error] ajp_send_request::jk_ajp_common.c (1507): (tomcat1) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[Sun May 23 07:26:22.174 2010] [4525:467954352] [info] ajp_service::jk_ajp_common.c (2447): (tomcat1) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2)
[Sun May 23 07:26:22.174 2010] [4525:467954352] [error] ajp_service::jk_ajp_common.c (2466): (tomcat1) connecting to tomcat failed.
[Sun May 23 07:26:22.174 2010] [4525:467954352] [info] jk_handler::mod_jk.c (2615): Service error=-3 for worker=tomcat1
[Sun May 23 07:26:22.309 2010] [4526:467954352] [info] jk_open_socket::jk_connect.c (594): connect to 11.92.0.237:8180 failed (errno=111)
[Sun May 23 07:26:22.309 2010] [4526:467954352] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (11.92.0.237:8180) (errno=111)
[Sun May 23 07:26:22.309 2010] [4526:467954352] [error] ajp_send_request::jk_ajp_common.c (1507): (tomcat1) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[Sun May 23 07:26:22.309 2010] [4526:467954352] [info] ajp_service::jk_ajp_common.c (2447): (tomcat1) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1)
[Sun May 23 07:26:22.409 2010] [4526:467954352] [info] jk_open_socket::jk_connect.c (594): connect to 11.92.0.237:8180 failed (errno=111)
[Sun May 23 07:26:22.409 2010] [4526:467954352] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (11.92.0.237:8180) (errno=111)
[Sun May 23 07:26:22.409 2010] [4526:467954352] [error] ajp_send_request::jk_ajp_common.c (1507): (tomcat1) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[Sun May 23 07:26:22.409 2010] [4526:467954352] [info] ajp_service::jk_ajp_common.c (2447): (tomcat1) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2)
[Sun May 23 07:26:22.409 2010] [4526:467954352] [error] ajp_service::jk_ajp_common.c (2466): (tomcat1) connecting to tomcat failed.
[Sun May 23 07:26:22.409 2010] [4526:467954352] [info] jk_handler::mod_jk.c (2615): Service error=-3 for worker=tomcat1
[Sun May 23 07:26:25.411 2010] [4527:467954352] [info] jk_open_socket::jk_connect.c (594): connect to 11.92.0.237:8180 failed (errno=111)
[Sun May 23 07:26:25.412 2010] [4527:467954352] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (11.92.0.237:8180) (errno=111)
[Sun May 23 07:26:25.412 2010] [4527:467954352] [error] ajp_send_request::jk_ajp_common.c (1507): (tomcat1) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[Sun May 23 07:26:25.412 2010] [4527:467954352] [info] ajp_service::jk_ajp_common.c (2447): (tomcat1) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1)
[Sun May 23 07:26:25.513 2010] [4527:467954352] [info] jk_open_socket::jk_connect.c (594): connect to 11.92.0.237:8180 failed (errno=111)
[Sun May 23 07:26:25.513 2010] [4527:467954352] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (11.92.0.237:8180) (errno=111)
[Sun May 23 07:26:25.513 2010] [4527:467954352] [error] ajp_send_request::jk_ajp_common.c (1507): (tomcat1) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[Sun May 23 07:26:25.513 2010] [4527:467954352] [info] ajp_service::jk_ajp_common.c (2447): (tomcat1) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2)
[Sun May 23 07:26:25.513 2010] [4527:467954352] [error] ajp_service::jk_ajp_common.c (2466): (tomcat1) connecting to tomcat failed.
[Sun May 23 07:26:25.513 2010] [4527:467954352] [info] jk_handler::mod_jk.c (2615): Service error=-3 for worker=tomcat1
[Sun May 23 07:26:40.957 2010] [4528:467954352] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=ajp13
[Sun May 23 07:26:51.114 2010] [4529:467954352] [info] jk_open_socket::jk_connect.c (594): connect to 11.92.0.237:8180 failed (errno=111)
[Sun May 23 07:26:51.114 2010] [4529:467954352] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (11.92.0.237:8180) (errno=111)
[Sun May 23 07:26:51.114 2010] [4529:467954352] [error] ajp_send_request::jk_ajp_common.c (1507): (tomcat1) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[Sun May 23 07:26:51.114 2010] [4529:467954352] [info] ajp_service::jk_ajp_common.c (2447): (tomcat1) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1)
[Sun May 23 07:26:51.214 2010] [4529:467954352] [info] jk_open_socket::jk_connect.c (594): connect to 11.92.0.237:8180 failed (errno=111)
[Sun May 23 07:26:51.214 2010] [4529:467954352] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (11.92.0.237:8180) (errno=111)
[Sun May 23 07:26:51.214 2010] [4529:467954352] [error] ajp_send_request::jk_ajp_common.c (1507): (tomcat1) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[Sun May 23 07:26:51.214 2010] [4529:467954352] [info] ajp_service::jk_ajp_common.c (2447): (tomcat1) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2)
[Sun May 23 07:26:51.214 2010] [4529:467954352] [error] ajp_service::jk_ajp_common.c (2466): (tomcat1) connecting to tomcat failed.
[Sun May 23 07:26:51.214 2010] [4529:467954352] [info] jk_handler::mod_jk.c (2615): Service error=-3 for worker=tomcat1
[Sun May 23 07:28:48.199 2010] [4531:467954352] [info] jk_open_socket::jk_connect.c (594): connect to 11.92.0.237:8180 failed (errno=111)
[Sun May 23 07:28:48.222 2010] [4531:467954352] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (11.92.0.237:8180) (errno=111)
[Sun May 23 07:28:48.222 2010] [4531:467954352] [error] ajp_send_request::jk_ajp_common.c (1507): (tomcat1) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[Sun May 23 07:28:48.235 2010] [4531:467954352] [info] ajp_service::jk_ajp_common.c (2447): (tomcat1) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1)
[Sun May 23 07:28:48.335 2010] [4531:467954352] [info] jk_open_socket::jk_connect.c (594): connect to 11.92.0.237:8180 failed (errno=111)
[Sun May 23 07:28:48.335 2010] [4531:467954352] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (11.92.0.237:8180) (errno=111)
[Sun May 23 07:28:48.335 2010] [4531:467954352] [error] ajp_send_request::jk_ajp_common.c (1507): (tomcat1) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[Sun May 23 07:28:48.335 2010] [4531:467954352] [info] ajp_service::jk_ajp_common.c (2447): (tomcat1) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2)
[Sun May 23 07:28:48.335 2010] [4531:467954352] [error] ajp_service::jk_ajp_common.c (2466): (tomcat1) connecting to tomcat failed.
[Sun May 23 07:28:48.335 2010] [4531:467954352] [info] jk_handler::mod_jk.c (2615): Service error=-3 for worker=tomcat1
[Sun May 23 07:36:57.060 2010] [4524:467954352] [info] init_jk::mod_jk.c (3183): mod_jk/1.2.28 initialized
[Sun May 23 07:36:57.061 2010] [4524:467954352] [error] uri_worker_map_ext::jk_uri_worker_map.c (506): Could not find worker with name 'ajp13' in uri map post processing.
[Sun May 23 07:36:57.061 2010] [4524:467954352] [error] uri_worker_map_ext::jk_uri_worker_map.c (506): Could not find worker with name 'ajp13' in uri map post processing.
[Sun May 23 07:37:24.420 2010] [4820:467954352] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=ajp13
[Sun May 23 07:37:53.945 2010] [4824:467954352] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=ajp13
[Sun May 23 07:39:22.179 2010] [4820:467954352] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=ajp13
[Sun May 23 07:42:42.042 2010] [4524:467954352] [info] init_jk::mod_jk.c (3183): mod_jk/1.2.28 initialized
[Sun May 23 07:42:42.042 2010] [4524:467954352] [error] uri_worker_map_ext::jk_uri_worker_map.c (506): Could not find worker with name 'ajp13' in uri map post processing.
[Sun May 23 07:42:42.042 2010] [4524:467954352] [error] uri_worker_map_ext::jk_uri_worker_map.c (506): Could not find worker with name 'ajp13' in uri map post processing.
[Sun May 23 07:42:53.339 2010] [4847:467954352] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=ajp13
[Sun May 23 07:48:22.435 2010] [4847:467954352] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=ajp13
[Sun May 23 07:48:23.369 2010] [4844:467954352] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=ajp13
[Sun May 23 07:48:26.824 2010] [4851:467954352] [info] ajp_send_request::jk_ajp_common.c (1496): (tomcat1) all endpoints are disconnected, detected by connect check (1), cping (0), send (0)
[Sun May 23 07:48:26.995 2010] [4846:467954352] [info] ajp_send_request::jk_ajp_common.c (1496): (tomcat1) all endpoints are disconnected, detected by connect check (1), cping (0), send (0)
[Sun May 23 07:49:27.724 2010] [4844:467954352] [info] ajp_send_request::jk_ajp_common.c (1496): (tomcat1) all endpoints are disconnected, detected by connect check (1), cping (0), send (0)
[Sun May 23 07:49:50.349 2010] [4849:467954352] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=ajp13
[Sun May 23 09:05:32.001 2010] [4524:467954352] [info] init_jk::mod_jk.c (3183): mod_jk/1.2.28 initialized
[Sun May 23 09:05:32.001 2010] [4524:467954352] [error] uri_worker_map_ext::jk_uri_worker_map.c (506): Could not find worker with name 'ajp13' in uri map post processing.
[Sun May 23 09:05:32.001 2010] [4524:467954352] [error] uri_worker_map_ext::jk_uri_worker_map.c (506): Could not find worker with name 'ajp13' in uri map post processing.
[Sun May 23 09:09:28.831 2010] [5248:467954352] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=ajp13
[Sun May 23 09:09:31.642 2010] [5249:467954352] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=ajp13
[Sun May 23 09:13:32.003 2010] [4524:467954352] [info] init_jk::mod_jk.c (3183): mod_jk/1.2.28 initialized
[Sun May 23 09:13:32.003 2010] [4524:467954352] [error] uri_worker_map_ext::jk_uri_worker_map.c (506): Could not find worker with name 'ajp13' in uri map post processing.
[Sun May 23 09:13:32.003 2010] [4524:467954352] [error] uri_worker_map_ext::jk_uri_worker_map.c (506): Could not find worker with name 'ajp13' in uri map post processing.
[Sun May 23 09:13:40.516 2010] [5275:467954352] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=ajp13
[Sun May 23 09:13:42.014 2010] [5278:467954352] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=ajp13
[Sun May 23 09:25:25.073 2010] [5277:467954352] [warn] map_uri_to_worker_ext::jk_uri_worker_map.c (962): Uri * is invalid. Uri must start with /
[Sun May 23 09:25:28.081 2010] [5280:467954352] [warn] map_uri_to_worker_ext::jk_uri_worker_map.c (962): Uri * is invalid. Uri must start with /
[Sun May 23 09:29:59.636 2010] [5309:467954352] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=ajp13
[Sun May 23 09:30:06.557 2010] [5312:467954352] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=ajp13
[Sun May 23 10:36:08.059 2010] [4524:467954352] [info] init_jk::mod_jk.c (3183): mod_jk/1.2.28 initialized
[Sun May 23 10:40:45.002 2010] [4524:467954352] [info] init_jk::mod_jk.c (3183): mod_jk/1.2.28 initialized
[Sun May 23 10:40:45.002 2010] [4524:467954352] [error] uri_worker_map_ext::jk_uri_worker_map.c (506): Could not find worker with name 'ajp13' in uri map post processing.
[Sun May 23 10:40:45.002 2010] [4524:467954352] [error] uri_worker_map_ext::jk_uri_worker_map.c (506): Could not find worker with name 'ajp13' in uri map post processing.
[Sun May 23 10:41:30.001 2010] [4524:467954352] [info] init_jk::mod_jk.c (3183): mod_jk/1.2.28 initialized

作者: blueswxs    时间: 2010-05-25 22:49
[Sun May 23 10:40:45.002 2010] [4524:467954352] [error] uri_worker_map_ext::jk_uri_worker_map.c (506): Could not find worker with name 'ajp13' in uri map post processing.
[Sun May 23 10:40:45.002 2010] [4524:467954352] [error] uri_worker_map_ext::jk_uri_worker_map.c (506): Could not find worker with name 'ajp13' in uri map post processing.

aip13 你没定义?
千万别说你一楼贴出来的
jk.conf
workers.properties
是全部内容。。。。。。。。。
作者: 轻逐微风    时间: 2010-05-25 23:11
回复 8# blueswxs


    一楼贴出来的绝对是全部内容。。但是结果却出现这样的情况。。
作者: 轻逐微风    时间: 2010-05-25 23:59
继续弄session集群,错误日志如下:
[Sun May 23 15:13:18.703 2010] [6467:467954352] [info] jk_open_socket::jk_connect.c (594): connect to 11.92.0.249:9009 failed (errno=111)
[Sun May 23 15:13:18.703 2010] [6467:467954352] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (11.92.0.249:9009) (errno=111)
[Sun May 23 15:13:18.703 2010] [6467:467954352] [error] ajp_send_request::jk_ajp_common.c (1507): (tomcat2) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[Sun May 23 15:13:18.703 2010] [6467:467954352] [info] ajp_service::jk_ajp_common.c (2447): (tomcat2) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1)
[Sun May 23 15:13:18.712 2010] [6470:467954352] [info] jk_open_socket::jk_connect.c (594): connect to 11.92.0.249:9009 failed (errno=111)
[Sun May 23 15:13:18.713 2010] [6470:467954352] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (11.92.0.249:9009) (errno=111)
[Sun May 23 15:13:18.713 2010] [6470:467954352] [error] ajp_send_request::jk_ajp_common.c (1507): (tomcat2) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[Sun May 23 15:13:18.713 2010] [6470:467954352] [info] ajp_service::jk_ajp_common.c (2447): (tomcat2) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1)
[Sun May 23 15:13:18.803 2010] [6467:467954352] [info] jk_open_socket::jk_connect.c (594): connect to 11.92.0.249:9009 failed (errno=111)
[Sun May 23 15:13:18.803 2010] [6467:467954352] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (11.92.0.249:9009) (errno=111)
[Sun May 23 15:13:18.803 2010] [6467:467954352] [error] ajp_send_request::jk_ajp_common.c (1507): (tomcat2) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[Sun May 23 15:13:18.803 2010] [6467:467954352] [info] ajp_service::jk_ajp_common.c (2447): (tomcat2) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2)
[Sun May 23 15:13:18.803 2010] [6467:467954352] [error] ajp_service::jk_ajp_common.c (2466): (tomcat2) connecting to tomcat failed.
[Sun May 23 15:13:18.803 2010] [6467:467954352] [info] service::jk_lb_worker.c (1384): service failed, worker tomcat2 is in local error state
[Sun May 23 15:13:18.813 2010] [6470:467954352] [info] jk_open_socket::jk_connect.c (594): connect to 11.92.0.249:9009 failed (errno=111)
[Sun May 23 15:13:18.813 2010] [6470:467954352] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (11.92.0.249:9009) (errno=111)
[Sun May 23 15:13:18.813 2010] [6470:467954352] [error] ajp_send_request::jk_ajp_common.c (1507): (tomcat2) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[Sun May 23 15:13:18.813 2010] [6470:467954352] [info] ajp_service::jk_ajp_common.c (2447): (tomcat2) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2)
[Sun May 23 15:13:18.813 2010] [6470:467954352] [error] ajp_service::jk_ajp_common.c (2466): (tomcat2) connecting to tomcat failed.
[Sun May 23 15:13:18.813 2010] [6470:467954352] [info] service::jk_lb_worker.c (1384): service failed, worker tomcat2 is in error state
[Sun May 23 15:14:32.649 2010] [6473:467954352] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=ajp13
[Sun May 23 15:14:34.029 2010] [6474:467954352] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=ajp13
[Sun May 23 15:14:34.418 2010] [6467:467954352] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=ajp13
[Sun May 23 15:14:34.609 2010] [6470:467954352] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=ajp13
[Sun May 23 15:14:34.773 2010] [6469:467954352] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=ajp13
[Sun May 23 15:14:34.978 2010] [6471:467954352] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=ajp13
[Sun May 23 15:14:53.200 2010] [6472:467954352] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=ajp13
[Sun May 23 15:19:03.505 2010] [6468:467954352] [info] jk_open_socket::jk_connect.c (594): connect to 11.92.0.249:9009 failed (errno=111)
[Sun May 23 15:19:03.505 2010] [6468:467954352] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (11.92.0.249:9009) (errno=111)
[Sun May 23 15:19:03.505 2010] [6468:467954352] [error] ajp_send_request::jk_ajp_common.c (1507): (tomcat2) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[Sun May 23 15:19:03.505 2010] [6468:467954352] [info] ajp_service::jk_ajp_common.c (2447): (tomcat2) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1)
[Sun May 23 15:19:03.605 2010] [6468:467954352] [info] jk_open_socket::jk_connect.c (594): connect to 11.92.0.249:9009 failed (errno=111)
[Sun May 23 15:19:03.606 2010] [6468:467954352] [info] ajp_connect_to_endpoint::jk_ajp_common.c (922): Failed opening socket to (11.92.0.249:9009) (errno=111)
[Sun May 23 15:19:03.606 2010] [6468:467954352] [error] ajp_send_request::jk_ajp_common.c (1507): (tomcat2) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[Sun May 23 15:19:03.606 2010] [6468:467954352] [info] ajp_service::jk_ajp_common.c (2447): (tomcat2) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2)
[Sun May 23 15:19:03.606 2010] [6468:467954352] [error] ajp_service::jk_ajp_common.c (2466): (tomcat2) connecting to tomcat failed.
[Sun May 23 15:19:03.606 2010] [6468:467954352] [info] service::jk_lb_worker.c (1384): service failed, worker tomcat2 is in error state
作者: blueswxs    时间: 2010-05-26 08:56
vim /etc/httpd/conf/workers.properties
--
worker.list=wlb,jkstatus
worker.ajp13w.type=ajp13
worker.ajp13w.host=localhost
worker.ajp13w.port=8009
worker.wlb.type=lb
worker.wlb.balance_workers=ajp13w
worker.jkstatus.type=status
--


vim /etc/httpd/conf.d/jk.conf
--
# Load mod_jk module   LoadModule jk_module modules/mod_jk.so
# Where to find workers.properties   
JkWorkersFile conf/workers.properties
# Where to put jk shared memory   
JkShmFile     logs/httpd/mod_jk.shm
# Where to put jk logs   
JkLogFile logs/mod_jk.log
# Set the jk log level [debug/error/info]   
JkLogLevel info
# Select the log format   
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE,   
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format   
JkRequestLogFormat "%w %V %T %R"
# All requests go to Tomcat by default  
JkMount   /*.jsp     wlb
JkMount   /manager/*     wlb
--


参考一下吧  这是我用的。
作者: 轻逐微风    时间: 2010-05-26 17:51
回复 11# blueswxs


    非常感谢,我回去试下,不懂的回来问你哈
作者: blueswxs    时间: 2010-05-26 17:53
回复  blueswxs


    非常感谢,我回去试下,不懂的回来问你哈
轻逐微风 发表于 2010-05-26 17:51



   
作者: zhangpeiyang    时间: 2014-10-22 06:48
不错的文章 感谢




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2