[Mono-list] Debian Package + LibApache Mod_mono
Stuart Ballard
sballard@netreach.com
Thu, 22 Jan 2004 15:38:46 -0500
This is a multi-part message in MIME format.
--------------050509070402070809080703
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Pablo Fischer wrote:
> Any bugs, please mail me :)
The debian packages at present seem to not include an /etc/init.d script
for starting mod-mono-server.exe, so I've tried writing one myself (via
shameless copy-n-pasting from another one on my system), and I'm not
having much luck so far. Maybe I shouldn't be trying to run the xsp
process as www-data, but I can't think of any better user to use. (btw,
I did make sure that www-data could read and write the root folder I
specified, /home/sballard/unix-ivory - obviously, that's not a good
location to use in general, but I wanted to get something working before
picking the perfect location).
I get the following error:
Starting XSP: mod-mono-serverListening on: /tmp/mod_mono_server
Root directory: /home/sballard/unix-ivory
Unhandled Exception: System.UnauthorizedAccessException: Access to the
path "" is denied.
Server stack trace:
in <0x00226> System.IO.File:Delete (string)
in <0x000af> Mono.ASPNET.XSPApplicationHost:Start ()
in (unmanaged) /usr/lib/libmono.so.0 [0x40056adc]
in (unmanaged) /usr/lib/libmono.so.0(mono_runtime_invoke+0x35) [0x400a8dc2]
in (unmanaged) /usr/lib/libmono.so.0(mono_runtime_invoke_array+0x21b)
[0x400a9d35]
in (unmanaged) /usr/lib/libmono.so.0 [0x400b0791]
in <0x00193>
System.Runtime.Remoting.RemotingServices:InternalExecuteMessage
(System.MarshalByRefObject,System.Runtime.Remoting.Messaging.IMethodCallMessage)
Exception rethrown at [0]:
in <0x001da> System.Runtime.Remoting.Proxies.RealProxy:PrivateInvoke
(System.Runtime.Remoting.Proxies.RealProxy,System.Runtime.Remoting.Messaging.IMessage,System.Exception&,object[]&)
in (unmanaged) (wrapper remoting-invoke)
Mono.ASPNET.XSPApplicationHost:Start ()
in <0x00004> (wrapper remoting-invoke)
Mono.ASPNET.XSPApplicationHost:Start ()
in <0x0002f> (wrapper remoting-invoke-with-check)
Mono.ASPNET.XSPApplicationHost:Start ()
in <0x00344> Mono.ASPNET.Server:Main (string[])
.
I've attached the non-working init.d script in case anyone's interested.
I had to create a /var/www/.wapi directory that was chowned to www-data
in order to get past another error caused by the fact that www-data
doesn't have write permissions to its own home directory. Can someone
explain why xsp doesn't use /tmp for these files?
Thanks in advance for any suggestions,
Stuart.
--
Stuart Ballard, Senior Web Developer
NetReach, Inc.
(215) 283-2300, ext. 126
http://www.netreach.com/
--------------050509070402070809080703
Content-Type: text/plain;
name="local-xsp"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="local-xsp"
#! /bin/sh
PATH=/sbin:/bin
test -f /usr/bin/mod-mono-server.exe || exit 0
case "$1" in
start)
echo -n "Starting XSP: mod-mono-server"
start-stop-daemon --start --quiet --chuid www-data --user www-data --group www-data --chdir /home/sballard/unix-ivory --exec /usr/bin/mod-mono-server.exe -- --applications /:. --nonstop
echo "."
;;
stop)
echo -n "Stopping XSP: mod-mono-server"
start-stop-daemon --stop --quiet --chuid www-data --user www-data --group www-data --exec /usr/bin/mod-mono-server.exe
echo "."
;;
restart|force-reload)
echo -n "Restarting NTP server: ntpd... "
start-stop-daemon --stop --quiet --chuid www-data --user www-data --group www-data --exec /usr/bin/mod-mono-server.exe
sleep 2
start-stop-daemon --start --quiet --chuid www-data --user www-data --group www-data --chdir /home/sballard/unix-ivory --exec /usr/bin/mod-mono-server.exe -- --applications /:. --nonstop
echo "done."
;;
*)
echo "Usage: /etc/init.d/local-xsp {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0
--------------050509070402070809080703--