Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 70943 - init.d script for mod-mono-server (from dev-dotnet/xsp)
Summary: init.d script for mod-mono-server (from dev-dotnet/xsp)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: dotnet project
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2004-11-12 03:06 UTC by Leonardo Boshell (RETIRED)
Modified: 2005-06-23 02:20 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
mod-mono-server.init.d (mod-mono-server,1.56 KB, text/plain)
2004-11-12 03:08 UTC, Leonardo Boshell (RETIRED)
Details
mod-mono-server.conf.d (mod-mono-server,1.09 KB, text/plain)
2004-11-12 03:09 UTC, Leonardo Boshell (RETIRED)
Details
70_mod_mono.conf (70_mod_mono.conf,796 bytes, text/plain)
2004-11-12 03:10 UTC, Leonardo Boshell (RETIRED)
Details
xsp-1.0.6.ebuild-install_mod-mono-server_files.patch (xsp-1.0.6-install_mod-mono-server_files.patch,736 bytes, patch)
2005-03-17 02:05 UTC, Leonardo Boshell (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Leonardo Boshell (RETIRED) gentoo-dev 2004-11-12 03:06:06 UTC
As of recently, I have invested some time preparing a correct setup for mod_mono that involves a running mod-mono-server.exe process, using a Unix socket for communication between the mono server and the apache module.

This way I prepared an init.d script for mod-mono-server, that could be distributed with the xsp package, along with the current init.d script for xsp.exe. In addition, I crafted the corresponding conf.d file and tweaked apache's mod_mono.conf a little bit. See attachments below.

It works "out of the box" on my system; examples show up by default on <http://localhost/mono/>. Please let me know if you need any other info.

Thanks.
Comment 1 Leonardo Boshell (RETIRED) gentoo-dev 2004-11-12 03:08:10 UTC
Created attachment 43768 [details]
mod-mono-server.init.d
Comment 2 Leonardo Boshell (RETIRED) gentoo-dev 2004-11-12 03:09:18 UTC
Created attachment 43769 [details]
mod-mono-server.conf.d
Comment 3 Leonardo Boshell (RETIRED) gentoo-dev 2004-11-12 03:10:15 UTC
Created attachment 43770 [details]
70_mod_mono.conf

Modified version of the file that comes with www-apache/mod_mono
Comment 4 Christian Parpart (RETIRED) gentoo-dev 2005-02-16 21:33:12 UTC
I've added initd/confd scripts to dev-dotnet/xsp-1.0.5-r1 as it's masked and though no (yet enother) new masked ebuild required.

leonardop: I adapted your mod_mono.conf changes a bit to the new configuration style of all (good) new apache module ebuilds. init script (and config file) just had a very little cleanup.

latexer: please review.
Comment 5 Christian Parpart (RETIRED) gentoo-dev 2005-02-16 22:24:08 UTC
erm... so much for out-of-the-box... hmm....

when accessing my http://localhost/mono, I get:
System.InvalidOperationException: Process has not been started.
in <0x0003b> System.Diagnostics.Process:get_ExitCode ()
in <0x00050> (wrapper remoting-invoke-with-check) System.Diagnostics.Process:get_ExitCode ()
in <0x002bd> Mono.CSharp.CSharpCodeCompiler:CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters,string[])
in <0x0044a> Mono.CSharp.CSharpCodeCompiler:CompileAssemblyFromDomBatch (System.CodeDom.Compiler.CompilerParameters,System.CodeDom.CodeCompileUnit[])
in <0x00050> Mono.CSharp.CSharpCodeCompiler:CompileAssemblyFromDom (System.CodeDom.Compiler.CompilerParameters,System.CodeDom.CodeCompileUnit)
in <0x00171> System.Web.Compilation.CachingCompiler:Compile (System.Web.Compilation.BaseCompiler)
in <0x002ea> System.Web.Compilation.BaseCompiler:GetCompiledType ()
in <0x00251> System.Web.Compilation.AspGenerator:GetCompiledType ()
in <0x00070> System.Web.UI.ApplicationFileParser:GetCompiledApplicationType (string,System.Web.HttpContext)
in <0x00047> System.Web.HttpApplicationFactory:CompileApp (System.Web.HttpContext)
in <0x00032> System.Web.HttpApplicationFactory:InitializeFactory (System.Web.HttpContext)
in <0x0007a> System.Web.HttpApplicationFactory:GetInstance (System.Web.HttpContext)
in <0x0010a> System.Web.HttpRuntime:InternalExecuteRequest (System.Web.HttpWorkerRequest)

however, mod-mono-server is started properly and /tmp/mod_mono_server socket exists as well.
I suppose that this message was generated on mod-mono-server side, so my question is, *what* process could he mean then?
Comment 6 Leonardo Boshell (RETIRED) gentoo-dev 2005-03-17 02:03:39 UTC
Hi,

Thanks for looking into this, and committing the files. I've tested mod-mono-server with xsp-1.0.6 and mod_mono-1.0.6-r1, and everything worked (kinda) out-of-the-box.

I had to hack the xsp ebuild so it actually installed the init.d and conf.d files, then ran '/etc/init.d/mod-mono-server start', then added "-D MONO -D MONO_DEMO" in /etc/conf.d/apache2, restarted apache, pointed my browser to http://localhost/mono/, and everything worked just fine.

I'll attach the diff with the xsp ebuild.
Comment 7 Leonardo Boshell (RETIRED) gentoo-dev 2005-03-17 02:05:33 UTC
Created attachment 53686 [details, diff]
xsp-1.0.6.ebuild-install_mod-mono-server_files.patch
Comment 8 Tadas Dailyda 2005-05-07 04:37:38 UTC
Please apply xsp-1.0.6.ebuild-install_mod-mono-server_files.patch to xsp-1.0.6 and newer since in 70_mod_mono.conf there is directive 'MonoRunXSP false' by default and therefore it's impossible to run /etc/init.d/mod-mono-server when there is no such file :)
However I think 'MonoRunXSP true' would be better for most users to have mod-mono-server running out-of-the-box.
Comment 9 Leonardo Boshell (RETIRED) gentoo-dev 2005-06-23 00:30:57 UTC
In case you guys are busy, I'd like te fix this small issue so we can close this
bug.

Please let me know if it's okay to commit the following changes in xsp's ebuilds:

-	newexe ${FILESDIR}/mod-mono-server.initd
+	newexe ${FILESDIR}/mod-mono-server.initd mod-mono-server

-	newins ${FILESDIR}/mod-mono-server.confd
+	newins ${FILESDIR}/mod-mono-server.confd mod-mono-server


As you can see, it's just a typo that prevents the init and conf files from
actually getting installed.
Comment 10 Michael Tindal (RETIRED) gentoo-dev 2005-06-23 01:58:43 UTC
Committed to CVS.  Sorry it took so long to get to.
Comment 11 Christian Parpart (RETIRED) gentoo-dev 2005-06-23 02:20:43 UTC
ayeeeee.... thx ;-)