[OGo-MacOSX] Starting ogo-webui at boot time on OS X
Tabitha McNerney
macosx@opengroupware.org
Mon, 5 Dec 2005 01:20:07 -1000
------=_Part_32179_4377761.1133781607814
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hello all,
I just wrote a launchd property list and named it "ogo-webui.plist" (for
those who are unfamiliar with launchd and launchctl, which is new to Mac OS
X beginning with Tiger, please refer to this excellent article <
http://www.afp548.com/article.php?story=3D20050620071558293 > ). I included
the property list in this email message (see below).
The motivation in doing so is to run ogo-webui when the Mac OS X server
machine boots up. The general recommendation from Apple's man pages for
launchd is to place user applications that the administrator should launch
on behalf of the user in /Library/LaunchAgents ... which I did.
I run OpenGroupware as a user named "ogo" so I logged into my server as ogo
and dumped out the environment variables with "$ env" and also looked at my
GNUstep.sh file to make sure that what is sourced into the environment ends
up being copied into the launchd plist as EnvironmentVariables. I also
direct standard out put and error to a log file (appends automatically with
launchd).
I had no problem running (and ogo-webui appeared to read the defaults just
fine because there were no complains about not finding anything), but when =
I
would try to hit ogo-webui via Apache, I'd get the error below about "ACCES=
S
DENIED" and it looks like apache's trying to speak to ogo-webuin on a
different port other than 20000 for some weird reason (not the case however
if I log in as user ogo and run ogo-webui manually from a shell).
Its a bit perplexing and I'm wondering what I may have missed? Anyone else
try this before? If not launchd, what options are there in Mac OS X / Tiger
for running ogo-webui automatically at startup up time? Would I have to
create a StartupItem or an rc script?
Best regards,
Tabitha
--------------------------------------------
ogo$ cat logfile
Dec 05 11:06:25 ogo-webui-1.0 [872]: |ogo-webui-1.0| CTI Dialers:
2005-12-05 11:06:25.309 ogo-webui-1.0[872] WARNING: disabled login spaces
which are unsupported on this Foundation library.
Dec 05 11:06:25 ogo-webui-1.0 [872]: |ogo-webui-1.0| root has no password,
you need to assign one!
Dec 05 11:06:25 ogo-webui-1.0 [872]: |ogo-webui-1.0|
OpenGroupware.orginstance initialized.
Dec 05 11:06:25 ogo-webui-1.0 [872]: |ogo-webui-1.0| WOHttpAdaptor listenin=
g
on address *:20000
Dec 05 11:07:17 ogo-webui-1.0 [872]: [ERROR] <0x02C0FC90[WOHttpAdaptor]>
ACCESS DENIED: <0x02C10880[NGInternetSocketAddress]: host=3Dlocalhost
port=3D49703>
--------------------------------------------
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "
http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version=3D"1.0">
<dict>
<key>UserName</key>
<string>ogo</string>
<key>Label</key>
<string>org.opengroupware.ogo-webui</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/usr/local/OGoRoot/Tools/ogo-webui-1.0</string>
<string>-WOPort</string>
<string>20000</string>
<string>-WOHttpAllowHost</string>
<string>'("127.0.0.1", localhost)'</string>
</array>
<key>EnvironmentVariables</key>
<dict>
<key>GNUSTEP_LOCAL_ROOT</key>
<string>/usr/local/OGoRoot</string>
<key>GNUSTEP_HOST</key>
<string>powerpc-apple-darwin8.2.0</string>
<key>GUILE_LOAD_PATH</key>
<string>/Volumes/vol1/Users/ogo/GNUstep/Library/Libraries/Guile:/usr/local/=
OGoRoot/Library/Libraries/Guile</string>
<key>GNUSTEP_NETWORK_ROOT</key>
<string>/usr/local/OGoRoot</string>
<key>GNUSTEP_MAKEFILES</key>
<string>/usr/local/OGoRoot/Library/Makefiles</string>
<key>GNUSTEP_ROOT</key>
<string>/usr/local/OGoRoot</string>
<key>OGoROOT</key>
<string>/usr/local/OGoRoot</string>
<key>GNUSTEP_FLATTENED</key>
<string>yes</string>
<key>GNUSTEP_HOST_OS</key>
<string>darwin8.2.0</string>
<key>GNUSTEP_HOST_VENDOR</key>
<string>apple</string>
<key>GNUSTEP_HOST_CPU</key>
<string>powerpc</string>
<key>GNUSTEP_USER_ROOT</key>
<string>/Volumes/vol1/Users/ogo/GNUstep</string>
<key>GNUSTEP_SYSTEM_ROOT</key>
<string>/usr/local/OGoRoot</string>
<key>LIBRARY_COMBO</key>
<string>apple-apple-nil</string>
<key>GNUSTEP_PATHLIST</key>
<string>/Volumes/vol1/Users/ogo/GNUstep:/usr/local/OGoRoot</string>
<key>DYLD_FRAMEWORK_PATH</key>
<string>/Volumes/vol1/Users/ogo/GNUstep/Library/Frameworks:/usr/local/OGoRo=
ot/Library/Frameworks</string>
<key>DYLD_LIBRARY_PATH</key>
<string>/Volumes/vol1/Users/ogo/GNUstep/Library/Libraries:/usr/local/OGoRoo=
t/Library/Libraries</string>
<key>LANG</key>
<string>en_US.UTF-8</string>
<key>CLASSPATH</key>
<string>.:/usr/local/share/postgresql/java/postgresql.jar:/Volumes/vol1/Use=
rs/ogo/GNUstep/Library/Libraries/Java:/usr/local/OGoRoot/Library/Libraries/=
Java</string>
<key>PATH</key>
<string>/Volumes/vol1/Users/ogo/GNUstep/Tools:/usr/local/OGoRoot/Tools:/bin=
:/sbin:/usr/bin:/usr/sbin:/usr/local/bin</string>
</dict>
<key>StandardOutPath</key>
<string>/usr/local/OGoRoot/logs/logfile</string>
<key>StandardErrorPath</key>
<string>/usr/local/OGoRoot/logs/logfile</string>
<key>ServiceDescription</key>
<string>The OpenGroupware (OGo) main listener app</string>
</dict>
</plist>
------=_Part_32179_4377761.1133781607814
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hello all,<br><br>I just wrote a launchd property list and named it "o=
go-webui.plist" (for those who are unfamiliar with launchd and l=
aunchctl, which is new to Mac OS X beginning with Tiger, please refer to th=
is excellent article < =20
<a href=3D"http://www.afp548.com/article.php?story=3D20050620071558293">htt=
p://www.afp548.com/article.php?story=3D20050620071558293</a> > ). I incl=
uded the property list in this email message (see below).<br><br>The motiva=
tion in doing so is to run ogo-webui when the Mac OS X server machine boots=
up. The general recommendation from Apple's man pages for launchd is to pl=
ace user applications that the administrator should launch on behalf of the=
user in /Library/LaunchAgents ... which I did.=20
<br><br>I run OpenGroupware as a user named "ogo" so I logged int=
o my server as ogo and dumped out the environment variables with "$ en=
v" and also looked at my GNUstep.sh file to make sure that what is sou=
rced into the environment ends up being copied into the launchd plist as En=
vironmentVariables. I also direct standard out put and error to a log file =
(appends automatically with launchd).=20
<br><br>I had no problem running (and ogo-webui appeared to read the defaul=
ts just fine because there were no complains about not finding anything), b=
ut when I would try to hit ogo-webui via Apache, I'd get the error below ab=
out "ACCESS DENIED" and it looks like apache's trying to speak to=
ogo-webuin on a different port other than 20000 for some weird reason (not=
the case however if I log in as user ogo and run ogo-webui manually from a=
shell).
<br><br>Its a bit perplexing and I'm wondering what I may have missed? Anyo=
ne else try this before? If not launchd, what options are there in Mac OS X=
/ Tiger for running ogo-webui automatically at startup up time? Would I ha=
ve to create a StartupItem or an rc script?
<br><br>Best regards,<br><br>Tabitha<br>-----------------------------------=
---------<br><br>ogo$ cat logfile <br>Dec 05 11:06:25 ogo-webui-1.0 [872]: =
|ogo-webui-1.0| CTI Dialers: <br>2005-12-05 11:06:25.309 ogo-webui-1.0[872]=
WARNING: disabled login spaces which are unsupported on this Foundation li=
brary.
<br>Dec 05 11:06:25 ogo-webui-1.0 [872]: |ogo-webui-1.0| root has no passwo=
rd, you need to assign one!<br>Dec 05 11:06:25 ogo-webui-1.0 [872]: |ogo-we=
bui-1.0| OpenGroupware.org instance initialized.<br>Dec 05 11:06:25 ogo-web=
ui-1.0
[872]: |ogo-webui-1.0| WOHttpAdaptor listening on address *:20000<br>Dec 0=
5 11:07:17 ogo-webui-1.0 [872]: [ERROR] <0x02C0FC90[WOHttpAdaptor]> A=
CCESS DENIED: <0x02C10880[NGInternetSocketAddress]: host=3Dlocalhost por=
t=3D49703>
<br>--------------------------------------------<br><br><?xml version=3D=
"1.0" encoding=3D"UTF-8"?><br><!DOCTYPE plist PUB=
LIC "-//Apple Computer//DTD PLIST 1.0//EN" "<a href=3D"http:=
//www.apple.com/DTDs/PropertyList-1.0.dtd">
http://www.apple.com/DTDs/PropertyList-1.0.dtd</a>"><br><plist v=
ersion=3D"1.0"><br><dict><br> <key&=
gt;UserName</key><br> <string=
>ogo</string><br> <key>Label</key>
<br> <string>org.opengroupware.o=
go-webui</string><br> <key>OnDemand</key&g=
t;<br> <false/><br> &=
nbsp; <key>ProgramArguments</key><br> <arr=
ay><br> <string>/usr/local/OG=
oRoot/Tools/ogo-
webui-1.0</string><br> <strin=
g>-WOPort</string><br> <st=
ring>20000</string><br> <s=
tring>-WOHttpAllowHost</string><br> =
<string>'("<a href=3D"http://127.0.0.1">
127.0.0.1</a>", localhost)'</string><br> </=
array><br> <key>EnvironmentVariables</key><br>&n=
bsp; <dict><br> <key>GNUSTEP_LOCA=
L_ROOT</key><br> <string>/u=
sr/local/OGoRoot</string>
<br> <key>GNUSTEP_HOST</key><br> &=
nbsp; <string>powerpc-apple-darwin8.2.0</s=
tring><br> <key>GUILE_LOAD_PA=
TH</key><br> =
<string>/Volumes/vol1/Users/ogo/GNUstep/Library/Libraries/Guile:/usr/=
local/OGoRoot/Library/Libraries/Guile</string>
<br> <key>GNUSTEP_NETWORK_ROOT&l=
t;/key><br> <=
string>/usr/local/OGoRoot</string><br> &nb=
sp; <key>GNUSTEP_MAKEFILES</key><br> &n=
bsp; <string>/usr/local/OGoRoot/Librar=
y/Makefiles</string>
<br> <key>GNUSTEP_ROOT</key&g=
t;<br> <string&g=
t;/usr/local/OGoRoot</string><br>  =
; <key>OGoROOT</key><br> &=
nbsp; <string>/usr/local/OGoRoot</string><br> =
<key>GNUSTEP_FLATTENED</key>
<br> <string>=
yes</string><br> <key>GNUS=
TEP_HOST_OS</key><br> &nbs=
p; <string>darwin8.2.0</string><br> &nb=
sp; <key>GNUSTEP_HOST_VENDOR</key><br> &=
nbsp; <string>apple</string&=
gt;
<br> <key>GNUSTEP_HOST_CPU</k=
ey><br> <stri=
ng>powerpc</string><br> <k=
ey>GNUSTEP_USER_ROOT</key><br>  =
; <string>/Volumes/vol1/Users/ogo/GNUstep</stri=
ng>
<br> <key>GNUSTEP_SYSTEM_ROOT<=
;/key><br> <s=
tring>/usr/local/OGoRoot</string><br> &nbs=
p; <key>LIBRARY_COMBO</key><br> &=
nbsp; <string>apple-apple-nil</string>
<br> <key>GNUSTEP_PATHLIST</k=
ey><br> <stri=
ng>/Volumes/vol1/Users/ogo/GNUstep:/usr/local/OGoRoot</string><br>=
<key>DYLD_FRAMEWORK_PATH</ke=
y><br> <strin=
g>/Volumes/vol1/Users/ogo/GNUstep/Library/Frameworks:/usr/local/OGoRoot/=
Library/Frameworks</string>
<br> <key>DYLD_LIBRARY_PATH</=
key><br> <str=
ing>/Volumes/vol1/Users/ogo/GNUstep/Library/Libraries:/usr/local/OGoRoot=
/Library/Libraries</string><br> =
<key>LANG</key>
<br> <string>=
en_US.UTF-8</string><br> <key=
>CLASSPATH</key><br> <string>.:/usr/local/=
share/postgresql/java/postgresql.jar:/Volumes/vol1/Users/ogo/GNUstep/Librar=
y/Libraries/Java:/usr/local/OGoRoot/Library/Libraries/Java</string>
<br> <key>PATH</key><br>&n=
bsp; <string>/Volum=
es/vol1/Users/ogo/GNUstep/Tools:/usr/local/OGoRoot/Tools:/bin:/sbin:/usr/bi=
n:/usr/sbin:/usr/local/bin</string><br> </dict><br>=
<br> <key>StandardOutPath</key>
<br> <string>/usr/local/OGoRoot/=
logs/logfile</string><br> <key>StandardErrorP=
ath</key><br> <string>/usr=
/local/OGoRoot/logs/logfile</string><br> <key>=
;ServiceDescription</key>
<br> <string>The OpenGroupware (=
OGo) main listener app</string><br></dict><br></plist><br=
><br><br><br><br><br><br>
------=_Part_32179_4377761.1133781607814--