This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Here is the relevant line in httpd's workers.properties file:
workers.tomcat_home="D:\Program Files\Apache Software Foundation\Tomcat 6.0"
^ This is the Tomcat instance at port 8080
But when the server must be restarted for any reason, httpd starts to point to another (incorrect) instance of Tomcat. I basically have to shut down all my tomcat instances and httpd and restart them in a particular order to get httpd pointing to port 8080.
Are my settings in workers.properties being ignored? If so, why? Is it possible some mod_jk settings are hidden in the registry? How can I set the configuration to point to my desired tomcat instance without having to manually restart everything?
Thanks for your help and consideration, it is much appreciated. If I can provide any more relevant information please let me know.
I don't know if anyone is interested, but I reproduced this error on another machine.
I configured httpd to look for a particular Tomcat instance by setting tomcat_home in workers.properties
Then installed two instances of tomcat by downloading the zip file and running "service.bat install Tomcat" and "service.bat install Tomcat2"
Now mod_jk will connect to either Tomcat depending on startup order instead of following the configuration in workers.properties
I'm now assuming this is a bug and will look into filing a bug report and may try to hack my own solution. It's been a while since I've worked in c though.
It's a good thing I was too uncertain to report this as a bug I guess.
mod_jk will by default forward ajp13 requests to a tomcat it assumes is listening on port 8009. It also seems tomcat comes with a server.xml file that preconfigures it to listen on port 8009 for ajp13 requests.
So I think port 8009 would get occupied by the first Tomcat to start up and the other instances would fail to start that connector, but continue starting up their http connectors on port 8080, 8086, etc. So I set the ajp connector in the desired tomcat's server.xml to an unusual port, set the ajp port in workers.properties to the same unusual port, and it looks like it's working!
PS It doesn't seem mod_jk really uses that tomcat_home setting the way I thought it did.