[Mono-aspnet-list] Mod_mono and apache issue.

dejavu vijay.ellu at gmail.com
Thu Aug 20 08:01:00 EDT 2009


Hey gary, Im kind of a noob in linux, so i didn't have much idea what i was
doing! =^D .
Apache was running as root, but mono was running as user. So i logged off
and logged in as root, and now if i check, both runs as root. So i guess
that should be correct right? But now, i'm unable to start apache server if
i include mod_mono.so . In my error.log, i get the following critical
error:- "The unix daemon module not initialized yet. Please make sure that
your mod_mono module is loaded after the User/Group directives have been
parsed. Not initializing the dashboard."
I had seen in mono official site itself that the mod_mono module has to be
loaded after the User/Group directives. Either that or put it at the end of
the config file. I've done the latter. I dont see why this error should
come.

Any idea what this might be?

Thanks, 
Vijay.


gazzyt wrote:
> 
> When you run xsp2 it will run as your login. Apache, however, is a
> daemon (like a service in Windows) and it'll run as a different account.
> Apache (via mod_mono) launches an app called mod-mono-server2 which
> hosts your application. This will need to read your aspx files and dlls
> in order to do so.
> You can see those processes by running the following commands:
> 
> ps -ef | grep apache
> on my machine I see:
> www-data  4409 22479  0 Aug16 ?        00:00:00 /usr/sbin/apache2 -k
> start
> root     22479     1  0 Aug15 ?        00:00:17 /usr/sbin/apache2 -k
> start
> www-data 31551 22479  0 Aug16 ?        00:00:00 /usr/sbin/apache2 -k
> start
> www-data 31552 22479  0 Aug16 ?        00:00:00 /usr/sbin/apache2 -k
> start
> www-data 31553 22479  0 Aug16 ?        00:00:00 /usr/sbin/apache2 -k
> start
> www-data 31554 22479  0 Aug16 ?        00:00:00 /usr/sbin/apache2 -k
> start
> www-data 31555 22479  0 Aug16 ?        00:00:00 /usr/sbin/apache2 -k
> start
> 
> the first column shows the user(login) that the process is running as.
> 
> ps -ef | grep mono
> on my machine I see:
> www-data 31550     1  0 Aug16 ?        00:00:06 /usr/bin/mono
> /usr/lib/mono/2.0/mod-mono-server2.exe --filename
> /tmp/mod_mono_server_default --applications
> /TaskListWS:/home/garyt/software/TaskList,/TaskListRESTService:/home/gar
> yt/software/TaskListRESTService --nonstop
> 
> So, the account www-data will need read access to your application files
> and if it doesn't it'll fail.
> 
> Gary
> 
> 
> -----Original Message-----
> From: mono-aspnet-list-bounces at lists.ximian.com
> [mailto:mono-aspnet-list-bounces at lists.ximian.com] On Behalf Of dejavu
> Sent: 20 August 2009 06:39
> To: mono-aspnet-list at lists.ximian.com
> Subject: Re: [Mono-aspnet-list] Mod_mono and apache issue.
> 
> 
> 
> @gary: I didn't get you there. What did u mean by  "user that
> mod-mono-server2 is
> running as has access to your application files"?
> 
> @mark: I did try out that tool earlier, and that still didnt help.
> 
> Vijay. 
> 
> 
> gazzyt wrote:
>> 
>> The other thing to check is that the user that mod-mono-server2 is
>> running as has access to your application files (aspx's & dlls).
>> On my Ubuntu box it runs as www-data.
>> 
>> Gary
>> 
>> -----Original Message-----
>> From: mono-aspnet-list-bounces at lists.ximian.com
>> [mailto:mono-aspnet-list-bounces at lists.ximian.com] On Behalf Of dejavu
>> Sent: 17 August 2009 12:27
>> To: mono-aspnet-list at lists.ximian.com
>> Subject: Re: [Mono-aspnet-list] Mod_mono and apache issue.
>> 
>> 
>> Hey gary, thanks for the reply. I did try installing the following
>> packages
>> that u mentioned. Sadly, it still shows no sign of working. Could it
> be
>> because i'm doing something else wrong? 
>> 
>> Regards,
>> Vijay.
>> 
>> 
>> gazzyt wrote:
>>> 
>>> I'm using ubuntu rather than openSUSE. I seem to remember having to
>>> install the following packages before it would work but I can't
>> remember
>>> what the actual error message was.
>>> 
>>> apache2-mpm-prefork
>>> apache2-threaded-dev
>>> 
>>> Regards,
>>> Gary
>>> 
>>> -----Original Message-----
>>> From: mono-aspnet-list-bounces at lists.ximian.com
>>> [mailto:mono-aspnet-list-bounces at lists.ximian.com] On Behalf Of
> dejavu
>>> Sent: 14 August 2009 12:28
>>> To: mono-aspnet-list at lists.ximian.com
>>> Subject: [Mono-aspnet-list] Mod_mono and apache issue.
>>> 
>>> 
>>> Hello all. Ive been stuck with this problem for a few days now. I
> cant
>>> seem
>>> to figure out what the real problem is. I've installed apache 2.2,
>>> mono-2.4.2 with xsp, and mod_mono. I have the same setup in a linux
>>> openSUSE
>>> 11.1 and a windows system. Im exactly following the instructions that
>>> are
>>> given  http://www.codeproject.com/KB/cross-platform/introtomono2.aspx
>>> here. 
>>> Towards the end of that article, it's mentioned 2 ways to serve
>> ASP.NET
>>> pages using mono. 
>>> 
>>> 1) Running the xsp server.
>>> 2) Modifying the httpd.conf file of the apache server to include the
>>> mod_mono module. 
>>> 
>>> Now by both the ways, i should be able to see my ASPnet page. But I'm
>>> able
>>> to get it only throug the 1st way, ie through xsp. When i try the
> same
>>> through apache, it gives me a 503. Service temporarily unavailable
>>> error.
> 
>>> Also in the error log, i get "Failed to connect to mod-mono-server
>> after
>>> several attempts to spawn the process." 
>>> 
>>> Could somebody please point out to me what im doing wrong. Ive
>> literally
>>> swept google for solutions on this. I couldnt fine any, or ive missed
>>> it.
>>> Hopping someone could help me out with this.
>>> 
>>> Thanks,
>>> Vijay
>>> -- 
>>> View this message in context:
>>>
>>
> http://www.nabble.com/Mod_mono-and-apache-issue.-tp24934731p24934731.htm
>>> l
>>> Sent from the Mono - ASP.NET mailing list archive at Nabble.com.
>>> 
>>> _______________________________________________
>>> Mono-aspnet-list mailing list
>>> Mono-aspnet-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
>>> _______________________________________________
>>> Mono-aspnet-list mailing list
>>> Mono-aspnet-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
>>> 
>>> 
>> 
>> -- 
>> View this message in context:
>>
> http://www.nabble.com/Mod_mono-and-apache-issue.-tp24934731p25005092.htm
>> l
>> Sent from the Mono - ASP.NET mailing list archive at Nabble.com.
>> 
>> _______________________________________________
>> Mono-aspnet-list mailing list
>> Mono-aspnet-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
>> _______________________________________________
>> Mono-aspnet-list mailing list
>> Mono-aspnet-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Mod_mono-and-apache-issue.-tp24934731p25056285.htm
> l
> Sent from the Mono - ASP.NET mailing list archive at Nabble.com.
> 
> _______________________________________________
> Mono-aspnet-list mailing list
> Mono-aspnet-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
> _______________________________________________
> Mono-aspnet-list mailing list
> Mono-aspnet-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
> 
> 

-- 
View this message in context: http://www.nabble.com/Mod_mono-and-apache-issue.-tp24934731p25060717.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.



More information about the Mono-aspnet-list mailing list