开发者社区> 问答> 正文

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

在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


百度没有找到解决办法!!!大神看一下

展开
收起
爱吃鱼的程序员 2020-06-09 10:23:15 972 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    这个问题谁可以解决???顶<imgsrc="https://www.oschina.net/js/ke/plugins/emoticons/images/42.gif"alt="">一个!!!看看apache安装路径的logs文件下的error.log文件,有错误的详细信息看了没有问题只有警告

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

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

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

    <spanstyle="font-family:Verdana,sans-serif,宋体;font-size:14px;background-color:#FFFFFF;">为啥你在linux下不用nginx啊,全部的配置能贴下吗

    <atarget='_blank'>@夜很黑却很美回复<aclass='referer'target='_blank'>@夜很黑却很美:上边的就是所有的配置,剩下的是tomcat的如下:<Connectorport="8069"protocol="AJP/1.3"redirectPort="8443"/><Enginename="Catalina"defaultHost="172.24.0.13"jvmRoute="tomcat1">回复<aclass='referer'target='_blank'>@solo1st:OK可以这个是刚开始接触,我在windows下就是使用的这个apache+tomcat+mod_jk

    2020-06-09 10:23:30
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Alibaba Cloud Linux 3 发布 立即下载
ECS系统指南之Linux系统诊断 立即下载
ECS运维指南 之 Linux系统诊断 立即下载