Hi Klaus,On Jun 10, 2011, at 3:35 PM, Klaus Berkling wrote: On Jun 9, 2011, at 2:23 PM, Klaus Berkling wrote: Got the latest binaries. Looks like things are working a lot better (will need to look at my build setup).But it seems like 'Refuse New Sessions" doesn't work. I does work on an older build of Monitor on a production server... Ok all, thanks for your responses yesterday regarding my issues. But wait, there is more.
What I'm trying to do is send a bunch of REST and JSON commands to JavaMonitor to: 1) Add a bunch of instances across several nodes. Not 10 to one node, then 10 on the next, and so on; but rather one (or two) on one node, one (or two) on the next and so on. I might have five nodes. Proper load balancing, you understand. This is a pain to do in JavaMonitor.
Yes. Very. Painful.
2) Run a different number of instances for an app based on usage patterns, I might have one app serving Japan, another for the US, and yet another for Europe. e.g. I would bring up instances for Japan while I turn off instances for the US.
That's the background.
I have mostly completed my code, the JSON and REST calls, works nicely (thanks REST/JSON people). I can add instances and I can turn some on and turn others off. Quite neat actually.
Here comes my problem.
When I add the IP addresses for my nodes, just one, things break ( I can't use just localhost). I'm still running only one host, but using the IP address of it's private NIC.
"private NIC" Uh oh.
- Turning off an instance does not work, turning on Refuse New Sessions does not work (no JSON or REST involved). - However, I can turn instances on, and I can force-quit instances (I can see this in the instance log).
- Everything works if I use localhost.
There are some security checks around the IP address. See WOHostUtilities in Wonder for what is probably the fix for your problem:
* <p>This class replaces the WebObjects version to support loading a new IP as a local IP to the local hosts list. * This will authorize that IP to send management requests, like stopping the application, or * turning on the refuse new instance setting. This is necessary if WO does not automatically * add the needed IP to the local host list. It happens when you use private IPs and * is recognized as a problem on multi-homed linux servers.</p>
I have added -WOHost <ip> to my app, the apache.conf (WebObjectsConfig), and wotaskd. Adding the WOHost in the app will not work once I have multiple instance nodes.
I have not found a thing in the logs that could shed light on this.
One neat-oh site effect after adding -WOHost to wotaskd is that it resulted in an empty SiteConfig.xml file. :-)
That usually indicates a permissions problem (?) or a corrupt file. Wonder's version should back it up.
So, is it probable there a bug in wonder's JavaMonitor, should I pursue that? Or is it me and my configuration?
Private IP address is my guess for today.
Chuck
-- Chuck Hill Senior Consultant / VP Development
Come to WOWODC this July for unparalleled WO learning opportunities and real peer to peer problem solving! Network, socialize, and enjoy a great cosmopolitan city. See you there! http://www.wocommunity.org/wowodc11/
|