I am getting the following error while setting up the load balancer with two Tomcat instances:
在使用两个Tomcat实例设置负载平衡器时,我得到了以下错误:
[info] mod_jk.c (3189): mod_jk/1.2.30 initialized [error] jk_uri_worker_map.c (506): Could not find worker with name 'loadmanager' in uri map post processing.
[信息]mod_jk。c (3189): mod_jk/1.2.30初始化[error] jk_uri_worker_map。c(506):在uri map post处理中找不到名称为“loadmanager”的worker。
Following are my configuration settings:
以下是我的配置设置:
httpd.conf changes
httpd。配置更改
# Include mod_jk configuration file
Include conf/mod_jk.conf
mod_jk.conf
mod_jk.conf
LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
JkMount /TestLB1/ loadmanager
JkMount /TestLB1/* loadmanager
JkShmFile logs/jk.shm
workers.properties
workers.properties
worker.list=loadmanager
worker.tomcat1.port=18081
worker.tomcat1.host=localhost
worker.tomcat1.type=ajp13
worker.tomcat1.lbfactor=1
worker.tomcat2.port=28081
worker.tomcat2.host=localhost
worker.tomcat2.type=ajp13
worker.tomcat2.lbfactor=1
worker.loadmanager.type=lb
worker.loadmanager.balance_workers=tomcat1,tomcat2
worker.loadmanager.sticky_session=True
In Tomcat's server.xml I have set the jvmRoute attribute to Engine also
在Tomcat的服务器。我还将jvmRoute属性设置为引擎。
<Engine defaultHost="localhost" name="Catalina" jvmRoute="tomcat1">
<Engine defaultHost="localhost" name="Catalina" jvmRoute="tomcat2">
Both the Tomcat instances are up and running fine with AJP ports 18081 & 28081 respectively.
Tomcat实例都是向上运行的,并且分别运行在AJP端口18081和28081上。
But while starting the Apache httpd.exe the mod_jk log files always shows the above error, and when I try to access my web app through http://localhost/TestLB1 nothing comes up.
但是在启动Apache httpd时。exe: mod_jk日志文件总是显示上面的错误,当我试图通过http://localhost/TestLB1访问我的web应用程序时,什么都没有出现。
Any Solution?
有解决方案吗?
1 个解决方案
#1
3
Got the problem.... Issues is with the text editor in which i was editing my worker.properties file , it adds few special chars to files. I found them when i opend the files in notepad only. After removing all unwanted chars everythings works perfect.
有问题....问题是文本编辑器,我正在编辑我的工作人员。属性文件,它为文件添加了很少的特殊字符。当我在记事本中选择文件时,我发现了它们。去掉所有不需要的字符后,一切都是完美的。
#1
3
Got the problem.... Issues is with the text editor in which i was editing my worker.properties file , it adds few special chars to files. I found them when i opend the files in notepad only. After removing all unwanted chars everythings works perfect.
有问题....问题是文本编辑器,我正在编辑我的工作人员。属性文件,它为文件添加了很少的特殊字符。当我在记事本中选择文件时,我发现了它们。去掉所有不需要的字符后,一切都是完美的。