Re: Config problem - monitor trying to launch monitor....
Mike Peel <[email protected]> Sat, 11 Sep 2004 22:46:04 +0100
| Newsgroups | gmane.comp.web.webobjects.admin |
|---|---|
| Message-ID | <[email protected]> |
Hello again, Things still aren't going smoothly here. I've followed your instructions to the letter (well, apart from adding the s onto WOServices in places...), and afaics wotaskd isn't starting automagically. Performing a manual start of wotaskd makes one of the two apps I'm wanting start fine, the other has problems - it basically never ends the launch process, and dies repeatedly. I guess there's something wrong with that app. A few things I'm thinking I possibly didn't do correctly: - When copying, I used the cp command. It seems to have left at @ symbol after WOServices in /etc/init.d - does this matter? - I didn't initially know how to make it executable, so left that until the end. I then ran chmod a-x WOServices - correct? Other than that, I don't know why things aren't running smoothly. I'm still having the problems occasionally in Monitor, but on the whole that's running smoothly. I'm not sure why the second app isn't working smoothly, but am guessing it's not configured right somewhere (it works fine on my local system when the database connection's been changed, but as I said above simply refuses to launch properly on the actual server...). Can you / anyone help at all with this? Many thanks, Mike Peel http://www.fishspark.com/ On 9 Sep 2004, at 01:02, Thomas Fritzinger wrote: > 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 > >