Apache httpd 2.2.x + mod_jk 1.2.30 + tomcat 6 Error: could not find an employee with the name "XXXXX" in the uri map mail processing

When setting up load balancing with two Tomcat instances, the following error occurs:

[info] mod_jk.c (3189): mod_jk / 1.2.30 initialized [error] jk_uri_worker_map.c (506): Could not find an employee named "loadmanager" in the uri map mail processing.

The following are my configuration settings:

Httpd.conf changes

# Include mod_jk configuration file Include 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

 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 server.xml, I set the jvmRoute attribute for Engine as well

  <Engine defaultHost="localhost" name="Catalina" jvmRoute="tomcat1"> <Engine defaultHost="localhost" name="Catalina" jvmRoute="tomcat2"> 

Both instances of Tomcat work fine and work with ports 18081 and 28081 AJP, respectively.

But when Apache starts httpd.exe, the mod_jk log files always show the above error, and when I try to access my web application through http: // localhost / TestLB1 nothing comes.

Any solution?

+2
source share
2 answers

Got a problem .... Problems with a text editor in which I edited the worker.properties file, adds a few special characters to the files. I found them when I open files only in notepad. After removing all unwanted characters, everything works fine.

+3
source

Create your worker.properties file with a good text editor such as notepad ++. Failure to do so may add some invisible special characters and a worker.properties file that mod_jk will not parse.

0
source

Source: https://habr.com/ru/post/1342966/


All Articles