linux 下apache+tomcat 集群错误 急急急!!!!

夜很黑却很美 发布于 2016/09/22 09:12
阅读 494
收藏 0
在Linux下配置tomcat集群,Apache和tomcat 单个可以启动,通过中间插件mod_jk 连接 Apache和tomcat ,报错,启动不起来。

[Wed Sep 21 17:00:30.001 2016] [32073:1290757888] [warn] jk_map_validate_property::jk_map.c (411): The attribute 'worker.controller.balanced_workers' is deprecated - please check the documentation for the correct replacement.
[Wed Sep 21 17:00:30.004 2016] [32073:1290757888] [info] init_jk::mod_jk.c (3183): mod_jk/1.2.28 initialized
[Wed Sep 21 17:00:30.004 2016] [32073:1290757888] [error] uri_worker_map_ext::jk_uri_worker_map.c (506): Could not find worker with name 'controller' in uri map post processing.
[Wed Sep 21 17:00:30.004 2016] [32073:1290757888] [error] uri_worker_map_ext::jk_uri_worker_map.c (506): Could not find worker with name 'controller' in uri map post processing.
[Wed Sep 21 17:00:58.001 2016] [32074:1290757888] [warn] jk_map_validate_property::jk_map.c (411): The attribute 'worker.controller.balanced_workers' is deprecated - please check the documentation for the correct replacement.
[Wed Sep 21 17:00:58.003 2016] [32074:1290757888] [info] init_jk::mod_jk.c (3183): mod_jk/1.2.28 initialized
[Wed Sep 21 17:00:58.003 2016] [32074:1290757888] [error] uri_worker_map_ext::jk_uri_worker_map.c (506): Could not find worker with name 'controller' in uri map post processing.
[Wed Sep 21 17:00:58.003 2016] [32074:1290757888] [error] uri_worker_map_ext::jk_uri_worker_map.c (506): Could not find worker with name 'controller' in uri map post processing.
[Wed Sep 21 17:00:58.005 2016] [32075:1290757888] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=controller
[Wed Sep 21 17:00:58.205 2016] [32076:1290757888] [info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=controller

配置文件如下:

httpd.conf 文件:

#加载mod_jk Module     
LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties    
JkLogFile     /usr/ApacheGroup/logs/mod_jk.log
#指定那些请求交给tomcat处理,"controller"为在workers.propertise里指定的负载分配控#制器     
JkMount /* controller
JkMount /*.ico controller

workers.properties  文件:

worker.list = controller,tomcat1  #server 列表      
#========tomcat1========      
worker.tomcat1.port=8069       #ajp13 端口号,在tomcat下server.xml配置,默认8009      
worker.tomcat1.host=127.0.0.1  #tomcat的主机地址,如不为本机,请填写ip地址      
worker.tomcat1.type=ajp13      
worker.tomcat1.lbfactor = 1    #server的加权比重,值越高,分得的请求越多      
     

#========controller,负载均衡控制器========      
worker.controller.type=lb      
worker.controller.balanced_workers=tomcat1   #指定分担请求的tomcat      
#worker.controller.sticky_session=1
worker.controller.sticky_session=1



如果把workers.properties 文件去掉注释的内容变成:

workers.properties  文件:

worker.list = controller,tomcat1 
worker.tomcat1.port=8069          
worker.tomcat1.host=127.0.0.1   
worker.tomcat1.type=ajp13      
worker.tomcat1.lbfactor = 1  
worker.controller.type=lb      
worker.controller.balanced_workers=tomcat1  
worker.controller.sticky_session=1

报错:

[warn] jk_map_validate_property::jk_map.c (411): The attribute 'worker.controller.balanced_workers' is deprecated - please check the documentation for the correct replacement.
[Thu Sep 22 14:09:52 2016][3851:760366848] [error] ajp_validate::jk_ajp_common.c (2526): worker ajp13 can't resolve tomcat address localhost
[Thu Sep 22 14:09:52 2016][3851:760366848] [error] wc_create_worker::jk_worker.c (163): validate failed for ajp13
[Thu Sep 22 14:09:52 2016][3851:760366848] [error] build_worker_map::jk_worker.c (262): failed to create worker ajp13


百度没有找到解决办法!!!大神看一下
加载中
0
夜很黑却很美
这个问题谁可以解决???
0
0
红魔小贝
红魔小贝
看看apache安装路径的logs文件下的error.log文件,有错误的详细信息
夜很黑却很美
看了 没有问题 只有警告
0
求是科技
求是科技

https://my.oschina.net/u/2312022/blog/749847

配置文件应该一样,只是换个平台而已

夜很黑却很美
@求是科技 回复@求是科技 : 我用的 Apache2.0.55 其他的根本运行不起来
夜很黑却很美
@求是科技 回复@求是科技 : <Connector port="8069" protocol="AJP/1.3" redirectPort="8443" /> <Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat1"> worker.tomcat1.port=8069 ...
求是科技
求是科技
回复 @一个人的夜 : 配置文件没有错,可能是版本问题
求是科技
求是科技
回复 @一个人的夜 : 端口问题 我遇到过 仔细检查下apache配置转发的端口与tomcat里面设值的是不是一样,哪个tomcat不生效,就检查哪个
求是科技
求是科技
http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/
下一页
0
solo1st
solo1st

为啥你在linux下不用nginx啊,全部的配置能贴下吗

夜很黑却很美
@夜很黑却很美 回复@夜很黑却很美 : 上边的就是所有的配置,剩下的是tomcat 的 如下:<Connector port="8069" protocol="AJP/1.3" redirectPort="8443" /> <Engine name="Catalina" defaultHost="172.24.0.13" jvmRoute="tomcat1">
夜很黑却很美
回复@solo1st : OK 可以 这个是刚开始接触,我在windows下就是使用的这个apache+tomcat+mod_jk
返回顶部
顶部