Apache httpd 2.2.x + mod_jk 1.2.30 + Tomcat 6 Errore: Impossibile trovare lavoratore con nome 'XXXXX' in mappa uri post processing
Domanda
Mi è toccato il seguente errore durante l'impostazione di bilanciamento del carico con due istanze di Tomcat:
[info] mod_jk.c (3189): mod_jk / 1.2.30 inizializzato [Error] jk_uri_worker_map.c (506):. Impossibile trovare lavoratore con nome 'loadmanager' a Uri elaborazione mappa posta ??p>
Di seguito sono le mie impostazioni di configurazione:
httpd.conf modifiche
# 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
server.xml di Tomcat Nel ho impostare l'attributo jvmRoute al motore anche
<Engine defaultHost="localhost" name="Catalina" jvmRoute="tomcat1">
<Engine defaultHost="localhost" name="Catalina" jvmRoute="tomcat2">
Entrambi i casi sono Tomcat e soddisfacente esecuzione con porte AJP 18081 e 28081 rispettivamente.
Ma durante l'avvio del Apache httpd.exe i file di log mod_jk mostra sempre l'errore precedente, e quando provo ad accedere al mio web app tramite http:. // localhost / TestLB1 niente viene in su
Qualsiasi soluzione?
Soluzione
Si è il problema .... Problemi è con l'editor di testo in cui stavo montando il mio file worker.properties, aggiunge alcuni caratteri speciali ai file. Ho trovato quando ho aperto il file in un solo blocco note. Dopo aver rimosso tutti i caratteri everythings indesiderati opere perfette.
Altri suggerimenti
Crea il file worker.properties con un buon editor di testo come Notepad ++. Non farlo potrebbe aggiungere alcuni caratteri speciali invisibili e file di workers.properties wont parse da mod_jk.