Hmm, curiouser and curiouser...
Thanks for the links, appserver can already get to everything
(including writing the log) though.
Just to clarify, for all the tests I'm running nothing wacky - the
only custom settings are:
Mac OS X Path: /Library/WebObjects/Applications/HelloWorldWOApp.woa/
HelloWorldWOApp
Additional Arguments: -WOOutputPath /tmp/kensGoingCrazyLog
... as I said in a previous mail, Apache has a custom document root,
but none of my WO apps have any WebServerResources... and I'd put the
appropriate document root setting in WebObjects' apache.conf file in
any case.
So:
If I reboot the server, then the log file (/tmp/kensGoingCrazyLog )
doesn't exist yet. Fair enough.
If I log into Monitor and start my HelloWorldWOApp from within, it
dies once, and doesn't attempt further reincarnations (it stays off,
even though Auto Recover is set to On). So at this point there should
be no instances running (it says 0 in Monitor too).
However if I now 'sudo tail -f /tmp/kensGoingCrazyLog', I get (names
and IP addresses obscured to protect the innocent):
[2007-06-28 15:37:39 BST] <main> Creating LifebeatThread now with:
HelloWorldWOApp 2001 www.myserver.com/myServerIPAddress 1085 30000
Welcome to HelloWorldWOApp!
[2007-06-28 15:37:39 BST] <main> The URL for webserver connect is:
http://www.myserver.com/cgi-bin/WebObjects/HelloWorldWOApp.woa/-2001
The URL for direct connect is:
http://www.myserver.com:2001/cgi-bin/WebObjects/HelloWorldWOApp.woa
[2007-06-28 15:37:39 BST] <main> null
[2007-06-28 15:37:39 BST] <main> Waiting for requests...
Sure enough if I go to either
www.myserver.com:2001
or
www.myserver.com:2001/cgi-bin/WebObjects/HelloWorldWOApp.woa
... it gives me HelloWorld with the NSTimestamp :o
Go back into Monitor, it still says nothing's running. In fact if I
try to start the instance that apparently died, I get (in red text
above the table with the Frankenstein On/Off switch etc):
www.myserver.com: HelloWorldWOApp-1 cannot be started because port
2001 is still in use
... and going to port 2001 is still working at this point. The
instance still shows 1 death, and allegedly 'not running' even though
it is :-/
If I try to add another instance, exactly the same thing happens; it
claims the instance dies immediately, yet it's alive and running
directly on port 2002 (in the case of this second instance).
Is it a DirectConnectEnabled thing, do you reckon?!
I have barely any hair left to be pulling out at this point...
Ken
On 27 Jun 2007, at 7:26 pm, Chuck Hill wrote:
Sounds like a permissions problem. Apps run from JavaMonitor now
run under appserveruser not root. See if this helps:
http://www.gvcsitemaker.com/gvc.webobjects/
faq&mode=single&recordID=19193&nextMode=list
On Jun 27, 2007, at 2:26 AM, Ken Tabb wrote:
Hi folks,
If you don't want to see a grown man cry, look away now!
It's been a while since I had to deploy a WOApp, so I'm a wee bit
rusty. I'm having a bit of jip deploying an app that works fine in
Development mode on my powerbook, but not fine (instances die) in
Deployment on the Mac OS X Server (10.4.10, although 10.4.9
exhibited the same symptoms). I'm using Xcode 2.4.1 (on 10.4.10,
ditto 10.4.9 did the same) to develop.
So I decided to simplify by deploying a HelloWorldWOApp, which
just says "HelloWorld" along with an NSTimestamp.
So I build the project as Deployment (sudo xcodebuild install -
configuration Deployment DSTROOT=/) on my powerbook, then copy
the .woa and .jar over into the web server's /Library/WebObjects/
Applications. This is all as user 'sadmin' (server admin).
If I add the app via Monitor (/Library/WebObjects/Applications/
HelloWorldWOApp.woa/HelloWorldWOApp), that's fine. If I add
instances via Monitor, they die instantly (as in, within the "Time
allowed for startup" variable for that app in Monitor).
If instead I ssh into the server and type the following (as user
sadmin), the app works fine via direct connection
sudo /Library/WebObjects/Applications/HelloWorldWOApp.woa/
HelloWorldWOApp -WOPort 27961 -WOCachingEnabled YES -
WODebuggingEnabled NO -WOOutputPath /var/log/kenWOLog -
WOAutoOpenInBrowser NO -WOAutoOpenClientApplication NO -
WOLifebeatInterval 30 -WOLifebeatEnabled YES -
WOLifebeatDestinationPort 1085 -WOAdaptor WODefaultAdaptor -
WOWorkerThreadCount 8 -WOListenQueueSize 128 -
WOWorkerThreadCountMin 16 -WOWorkerThreadCountMax 256 -
NSProjectSearchPath \(\) -WOSessionTimeOut 3600 -WOApplicationName
HelloWorldWOApp -WOMonitorEnabled YES -WONoPause YES
... I can go to http://www.myserver.com:27961/ and see the app
fine. This also works without the 'sudo' (i.e. as sadmin).
If I copy the above blurb into Monitor's "Additional Arguments"
section for new instances of my app (starting at the -WOPort bit,
and giving a different port number so that I can tell which is
which), they still die.
I've tried sudo chmod-ing -R go+rx /Library/WebObjects/
Applications, but it makes no difference.
I haven't built a 'WebServer' version (as there are no
WebServerResources either in the HelloWorldWOApp or my real app) -
should I have done this?! When I tried building with -
configuration WebServer on my powerbook, it didn't put anything
extra in HelloWorldWOApp.woa/Contents/, so I'm guessing that's not
the problem.
Other info that may be clues: Apache server (v1.3.x as per MOSXS),
Apache module running, non-standard apache document root (i.e. it
isn't /Library/WebServer/Documents, but apache has always been
fine with this, and I made sure to put the right one into
WebObjects' apache.conf). As I say, if there are no
WebServerResources being served, I'm guessing that's not why the
instances are dying anyhow).
Any help would be greatly appreciated. Feel free to ridicule me as
much as you like...
Thanks in advance,
Ken
- - - - - - - - - -
Dr. Ken Tabb
Mac & UNIX Developer - Health & Human Sciences
Machine Vision & Neural Network researcher - School of Computer
Science
University of Hertfordshire, UK
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-deploy mailing list (Webobjects-
[EMAIL PROTECTED])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-deploy/chill%
40global-village.net
This email sent to [EMAIL PROTECTED]
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
. . . . . . . . . . . . . . . . . . . . . . . . . . .
D r. K e n T a b b
Mac & UNIX programmer
Neural network & computer vision researcher
University of Hertfordshire, UK
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-deploy mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-deploy/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]