Re: Config problem - monitor trying to launch monitor....
Thomas Fritzinger <[email protected]> Thu, 09 Sep 2004 02:02:05 +0200
| Newsgroups | gmane.comp.web.webobjects.admin |
|---|---|
| Message-ID | <[email protected]> |
Hello Mike,
Mike Peel schrieb:
> Help! I was trying to be clever (and not doing well at it), and tried to
> get Java Monitor started automatically on my server - through Java
> Monitor. As far as I can see, this's broken Monitor - every time we now
> try to do something with it, we just get the message "Failed to contact
> localhost-1085". How can this be fixed...? We've tried deleting Monitor
> in Monitor, rebooting Monitor (which makes Monitor appear back in the
> list of apps), even rebooting the server...
remember, the JavaMonitor is just a frontend to the wotaskd, normally
running on 1085/tcp. Any changes you do within JavaMonitor is passed to
wotaskd, and wotaskd writes them into SiteConfig.xml. JavaMonitor does
not open any port at all. It is (as already said) just a frontend!
Keeping this and your message "Failed to contact localhost-1085" in mind
I guess that you just did not start WOServices on that host and there is
no problem with your monitor application at all. Btw, what does "netstat
-ntl" say? Is port 1085 open?
Hm, though I've never tried this, I think starting JavaMonitor through
wotaskd configured by JavaMonitor should work, as JavaMonitor is just a
WO application.
If you want to make changes to your configuration manually, you can also
edit $NEXT_ROOT/Local/Library/WebObjects/Configuration/SiteConfig.xml,
_after_ you have stopped wotaskd (otherwise wotaskd will overwrite your
changes).
> Also, we don't really know how to start things automatically in RedHat
> in general. When installing WebObjects, we I followed all the
> instructions in Joshua Marker's book - but it's not starting properly
> still. So we're basically starting it manually when logged in as root...
If the 'not running wotaskd' was in fact your problem, the following
should help - otherwise please ignore the rest of this mail... ;)
You are using RedHat, right? Ok, first you should copy the startscript:
$NEXT_ROOT/Library/WebObjects/Executables/WOServices to /etc/init.d/ and
make it executeable. Then (if you want to use the RH mechanism) add this
following two lines to the beginning of the WOServices startscript, just
beneath the shebang:
#!/bin/sh
# description: starts/stops WOServices
# chkconfig: 345 95 05
The command "chkconfig --add WOServices" (as root) then will add
WOServices into runlevels3-5 as S95 (and K05 in the other levels), and
in addition to that you will be able to start/stop WOServices by typing
"service WOService start" (resp. "service WOService stop").
Due to the RedHat (and other distributions) init scripts you should also
add those ollowing two lines to the WOServices startscript, the first at
the end of the start section, the second at the end of the stop-section:
[ $? -eq 0 ] && touch /var/lock/subsys/WOServices
rm -f /var/lock/subsys/WOServices
Otherwise the init-script will not be executed at system shutdown or
reboot, because it looks for a file called as the stop-script in the
directory "subsys", and _only_ if this exists it will execute the
stop-script.
Hope this helps with your problem,
Thomas
ps@Apple: What about implementing this chkconfig- and subsys-stuff to
the startscript in further releases? I know, WO does not support Linux,
but he chkconfig header lines should not affect any other systems but
Linux distributions interpreting them right, and to be as much portable
a possible one could implement the "subsys" part as:
[ $? -eq 0 ] &&\
[ -d /var/lock/subsys ] &&\
touch /var/lock/subsys/WOServices
respectively:
[ $? -eq 0 ] &&\
[ -f /var/lock/subsys/WOServices ] &&\
rm -f /var/lock/subsys/WOServices