Child pages
  • Troubleshooting wotaskd and JavaMonitor on OS X

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

  • wotaskd: /Library/LaunchDaemons/com.apple.webobjects.wotaskd.plist
  • JavaMonitor: /Library/LaunchDaemons/com.apple.webobjects.womonitor.plist
Code Block
xml
xml
titlewomonitor.plist and wotaskd.plist Additionxml
<key>StandardOutPath</key>
<string>/Library/WebObjects/Logs/womonitor.log</string>

<key>StandardErrorPath</key>
<string>/Library/WebObjects/Logs/womonitor.log</string>

...

Now that log files are being written, turn on Deployment Debugging by adding these two <string> elements to the <ProgramArguments> element of womonitor.plist and/or wotaskd.plist:

Code Block
xml
xml
titlewomonitor.plist and/or wotaskd.plist Additionxml
<key>ProgramArguments</key>
<array>
    ...
    <string>-_DeploymentDebugging</string>
    <string>true</string>
</array>

...

-_DeploymentDebugging is the equivalent of passing all the following settings in either on the command-line or in a Properties file:

Code Block
none
none
titleDeployment Debugging Propertiesnone
NSLog.debug.setIsVerbose(true);
NSLog.out.setIsVerbose(true);
NSLog.err.setIsVerbose(true);
NSLog.allowDebugLoggingForGroups(NSLog.DebugGroupDeployment);
NSLog.debug.setAllowedDebugLevel(NSLog.DebugLevelDetailed);

Which gives nice details like this :

Code Block
none
none
titleLog Examplenone
2009-08-09 21:45:14,938 DEBUG 7.67 MB/24.02 MB [WorkerThread0] logging.ERXNSLogLog4jBridge - @@@@@ Received Lifebeat: lifebeat AjaxExample2 leopards.macti.lan 2003
2009-08-09 21:45:15,027 DEBUG 7.71 MB/23.97 MB [WorkerThread2] logging.ERXNSLogLog4jBridge - @@@@@ Received Lifebeat: lifebeat AjaxExample2 leopards.macti.lan 2004
2009-08-09 21:45:25,324 DEBUG 7.76 MB/23.93 MB [WorkerThread15] logging.ERXNSLogLog4jBridge - @@@@@ Received Lifebeat: lifebeat AjaxExample leopards.macti.lan 2005
2009-08-09 21:45:25,497 DEBUG 7.8 MB/23.88 MB [WorkerThread3] logging.ERXNSLogLog4jBridge - @@@@@ Received Lifebeat: lifebeat AjaxExample leopards.macti.lan 2001
2009-08-09 21:45:25,542 DEBUG 7.85 MB/23.84 MB [WorkerThread6] logging.ERXNSLogLog4jBridge - @@@@@ Received Lifebeat: lifebeat AjaxExample leopards.macti.lan 2006
2009-08-09 21:45:25,602 DEBUG 7.89 MB/23.8 MB [WorkerThread10] logging.ERXNSLogLog4jBridge - @@@@@ Received Lifebeat: lifebeat AjaxExample leopards.macti.lan 2002
2009-08-09 21:45:25,617 DEBUG 7.94 MB/23.75 MB [WorkerThread9] logging.ERXNSLogLog4jBridge - @@@@@ Received Lifebeat: lifebeat AjaxExample leopards.macti.lan 2007
2009-08-09 21:45:35,144 DEBUG 7.98 MB/23.71 MB [WorkerThread1] logging.ERXNSLogLog4jBridge - @@@@@ Received Lifebeat: lifebeat JavaMonitor leopards.macti.lan 56789

...

Modify SpawnOfWotaskd.sh in /System/Library/WebObjects/JavaApplications/wotaskd.woa/Contents/Resources to make it capture logs to the same folder. This is very useful if your application won't launch when you start it with JavaMonitor.

Code Block
none
none
titleSpawnOfWotaskd.sh Logging Additionnone
#!/bin/sh
# Modified by Mark Ritchie in Mar 2008
# - We now keep a log of any troubles while launching an application.

#$@ 1>/dev/null 2>&1 &
LOG=/Library/WebObjects/Logs/SpawnOfWotaskd.log
echo "************" >>${LOG}
echo "date: `date`" >>${LOG}
echo "args: $@" >>${LOG}
$@ 1>>${LOG} 2>&1 &

...