On 16.04.2009 17:55, Scott Bradshaw wrote: > Still continuing to guess.. >> This is about efficiency. >> If mod_jk had to do a DNS lookup each time it wants to send a packet to a >> backend Tomcat (or at least each time it wants to create a new connection to >> a backend Tomcat), that would be very inefficient. >> >> So, instead, mod_jk stores the IP address of each backend Tomcat, and >> during normal operation uses only that stored IP. >> >> But, as a convenience, in the configuration file, it allows you to specify >> the worker's host as a name if you wish; and if you do that, it does the >> lookup once at startup, to resolve that to an IP which it stores. >> >> But if it cannot at startup do this lookup and resolve the name to an IP, >> then it is stuck and cannot go further. > > > Agreed - it cannot go further for this worker. I would expect an error to > get logged and the load balanced worker to continue on to the next worker > configured. > > >> Because if it did go further, then it would have to store this workers'host >> as an unresolved name, and then it would have to do a lookup during normal >> operation. >> CQFD. >> >> Now, I have really no idea if the code is really like that, but if not at >> least it seems logical, doesn't it ? >> ;-) >> >> > Yes, it does seem logical, but flawed for a load balancer. If it was a > normal worker, I would 100% agree it should quit. > > I will go ahead and configure all the Tomcat nodes by IP address in the > mod_jk config file instead of the host name. The risk of having our whole > production web application go down if one host is not available is not worth > this convenient "feature" of mod_jk. :-)
André is very close to our original reasoning: As he explained, it is only necessary, that the address is resolvable during startup. This is not related to whether the node does work or not. The latter is detected by the balancer dynamically. Why do we force the address to be resolvable during startup? This is because we think an address that has already formally no chance to work most likely presents a configuration error. I could phrase it like this: if you are using names as addresses (instead of IPs), then it is critical, that your DNS does work (and contain the data). In your case the missing data in DNS is close to a failed DNS and this will be a problem for almost all applications configured with names. Yes, there are too many error messages in this situation, but the first one said: worker mygpgby06 can't resolve tomcat address mygpgby06.mycompany.com So its not completely unlikely you can spot there's a name resolution problem. What remains for me is your suggestion, that the error is not a fatal one, since there are other balanced workers left. We could include such a check in the startup code, although I'm not really convinced, that your problem is a good reason for this. I'm open to more argumntation and suggestions :) Regards, Rainer --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org