[Mono-bugs] [Bug 53677][Nor] New - Start mod_mono and apache on reboot

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 31 Jan 2004 10:22:19 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by mmorano@mikeandwan.us.

http://bugzilla.ximian.com/show_bug.cgi?id=53677

--- shadow/53677	2004-01-31 10:22:19.000000000 -0500
+++ shadow/53677.tmp.32414	2004-01-31 10:22:19.000000000 -0500
@@ -0,0 +1,131 @@
+Bug#: 53677
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: Gentoo
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Web
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: mmorano@mikeandwan.us               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Start mod_mono and apache on reboot
+
+Description of Problem:
+I attempted to create an initscript for mod_mono and apache2, so when the
+computer is rebooted, the asp.net application will be immediately
+available.  (note: i am sure improvements could be made to the script, it
+is my first attempt at one)  The interesting thing, is with the script in
+place, after rebooting, I get the asp.net stack trace (which is good as it
+at least shows the processes are running and communicating), however I
+never get a real page.  The stack trace refers to a call to Process.Start,
+which sounds similar to this thread: 
+
+http://bugzilla.ximian.com/show_bug.cgi?id=47040
+
+I had similar issues before with xsp back in the summer, and as this bug
+indicates cleaning out .wapi always seems to work.  I tried adding this
+cleanup to the init script itself to no avail.  The init script is below,
+and is based on the gentoo init process.
+
+depend() {
+        need net
+        after sshd dotnet mysql
+        before apache2
+}
+
+start() {
+        ebegin "Starting mod_mono"
+        rm -f /tmp/*.dll
+        rm -f /root/.wapi/*
+        rm -f /tmp/*.cs
+        rm -f /var/run/mod-mono-server.pid
+        start-stop-daemon --start --startas /usr/local/bin/mono --pidfile
+/var/run/mod-mono-server.pid --background --make-pidfile --
+/usr/bin/mod-mono-server.exe --root /var/www/localhost/www --applications
+/:. --nonstop &>/dev/null
+        # sleep so permissions updated properly
+        sleep 5
+        chmod 666 /tmp/mod_mono_server
+        eend $? 
+}
+
+stop() {
+        ebegin "Stopping mod_mono"
+        #start-stop-daemon --quiet --stop --pidfile
+/var/run/mod-mono-server.pid
+        rm -f /var/run/mod-mono-server.pid
+        eend $?
+}
+
+
+Has this configuration been a part of testing mod_mono, and if so, can the
+INSTALL doc be updated to include information on how to set this up to run
+on reboot?
+
+
+Steps to reproduce the problem:
+1. Create a initscript for your system similar to the one above
+2. Reboot, and then try to access your asp.net site
+
+Actual Results:
+
+Description: Error processing request.
+
+Error Message:
+
+Stack Trace:
+
+System.ComponentModel.Win32Exception: Some sort of w32 error occurred: 0
+in <0x00308> System.Diagnostics.Process:Start_common
+(System.Diagnostics.ProcessStartInfo,System.Diagnostics.Process)
+in <0x00016> System.Diagnostics.Process:Start ()
+in <0x0005d> (wrapper remoting-invoke-with-check)
+System.Diagnostics.Process:Start ()
+in <0x001fd> Mono.CSharp.CSharpCodeCompiler:CompileAssemblyFromFileBatch
+(System.CodeDom.Compiler.CompilerParameters,string[],bool)
+in <0x00305> Mono.CSharp.CSharpCodeCompiler:CompileAssemblyFromDomBatch
+(System.CodeDom.Compiler.CompilerParameters,System.CodeDom.CodeCompileUnit[])
+in <0x00059> Mono.CSharp.CSharpCodeCompiler:CompileAssemblyFromDom
+(System.CodeDom.Compiler.CompilerParameters,System.CodeDom.CodeCompileUnit)
+in <0x00130> System.Web.Compilation.CachingCompiler:Compile
+(System.Web.Compilation.BaseCompiler)
+in <0x00259> System.Web.Compilation.BaseCompiler:GetCompiledType ()
+in <0x0012d> System.Web.Compilation.AspGenerator:GetCompiledType ()
+in <0x00068> System.Web.UI.ApplicationFileParser:GetCompiledApplicationType
+(string,System.Web.HttpContext)
+in <0x00045> System.Web.HttpApplicationFactory:CompileApp
+(System.Web.HttpContext)
+in <0x00032> System.Web.HttpApplicationFactory:InitializeFactory
+(System.Web.HttpContext)
+in <0x00094> System.Web.HttpApplicationFactory:GetInstance
+(System.Web.HttpContext)
+in <0x0010c> System.Web.HttpRuntime:InternalExecuteRequest
+(System.Web.HttpWorkerRequest)
+
+Expected Results:
+
+The asp.net page is loaded in the browser
+
+
+How often does this happen? 
+on every reboot
+
+Additional Information:
+after this does not work, i am always able to do the following:
+/etc/init.d/modmono stop
+/etc/init.d/modmono start
+/etc/init.d/apache2 restart
+
+and then the site works as expected.  It just does not work on reboot.  Are
+there some dependencies that I might be missing as part of the boot
+process, or is this just a reproducable case for the Process.Start() bug
+referenced above?
+
+Thanks.
+-m