Mono Apache 14.04 LTS

Bug #1308202 reported by Zachary Burns
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
mono
New
Undecided
Unassigned
mod-mono (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Installed mono, apache2, etc (auto hosted install) as per the instructions at

https://help.ubuntu.com/community/ModMono

root@zhbprod:/var/log/apache2# cat error.log
[Tue Apr 15 14:31:00.828448 2014] [so:warn] [pid 9827] AH01574: module mono_module is already loaded, skipping
[Tue Apr 15 14:31:00.838301 2014] [mpm_event:notice] [pid 9828:tid 140166894430080] AH00489: Apache/2.4.7 (Ubuntu) mod_mono/2.11 configured -- resuming normal operations
[Tue Apr 15 14:31:00.838363 2014] [core:notice] [pid 9828:tid 140166894430080] AH00094: Command line: '/usr/sbin/apache2'
[Tue Apr 15 14:31:00.838932 2014] [:error] [pid 9832:tid 140166894430080] Failed running '/usr/bin/mod-mono-server2 --filename /tmp/mod_mono_server_global --nonstop --master (null) (null) (null) (null) (null) (null) (null) (null)'. Reason: No such file or directory
Listening on: /tmp/.mod_mono_server4
Root directory: /
root@zhbprod:/var/log/apache2#

Then when I go to a web page - I get a 500 error and this is in the error log now...

Stacktrace:

  at <unknown> <0xffffffff>
  at Mono.WebServer.VPathToHost.CreateHost (Mono.WebServer.ApplicationServer,Mono.WebServer.WebSource) <0x000a3>
  at Mono.WebServer.ApplicationServer.GetApplicationForPath (string,int,string,bool) <0x0016f>
  at (wrapper remoting-invoke-with-check) Mono.WebServer.ApplicationServer.GetApplicationForPath (string,int,string,bool) <0xffffffff>
  at Mono.WebServer.ModMonoWorker.GetOrCreateApplication (string,int,string,string) <0x0023f>
  at Mono.WebServer.ModMonoWorker.InnerRun (object) <0x002ab>
  at Mono.WebServer.ModMonoWorker.Run (object) <0x0002f>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        /usr/bin/mono() [0x4b73d8]
        /lib/x86_64-linux-gnu/libpthread.so.0(+0x10340) [0x7f41933ba340]
        /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39) [0x7f419301af79]
        /lib/x86_64-linux-gnu/libc.so.6(abort+0x148) [0x7f419301e388]
        /usr/bin/mono() [0x638575]
        /usr/bin/mono() [0x6386b6]
        /usr/bin/mono() [0x5298e6]
        /usr/bin/mono(mono_class_get_full+0xe2) [0x52a0c2]
        /usr/bin/mono(mono_class_from_name+0xfe) [0x52a4ae]
        /usr/bin/mono(mono_class_from_typeref+0x190) [0x529d00]
        /usr/bin/mono(mono_class_get_full+0x145) [0x52a125]
        /usr/bin/mono(mono_metadata_parse_mh_full+0x49f) [0x56c17f]
        /usr/bin/mono() [0x43b316]
        /usr/bin/mono() [0x421e2e]
        /usr/bin/mono() [0x4253cd]
        /usr/bin/mono() [0x425ecb]
        /usr/bin/mono() [0x4b845b]
        [0x41287166]

Debug info from gdb:

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

[Tue Apr 15 14:47:05.706709 2014] [:error] [pid 9835:tid 140166810810112] (70014)End of file found: read_data failed
[Tue Apr 15 14:47:05.706789 2014] [:error] [pid 9835:tid 140166810810112] Command stream corrupted, last command was -1
root@zhbprod:/var/log/apache2#

Revision history for this message
Zachary Burns (zburns) wrote :

This also was the sample "default.aspx" in the "/var/www/html" directory as per the sample

<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>ASP Test Page</title>
  </head>
  <body>
        <form id="form1" runat="server">
          <asp:label id="lbl1" runat="server">ASP Test Page</asp:label>
        </form>
  </body>
</html>

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1308202/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Zachary Burns (zburns) wrote :

Code works fine with nginx installed - so must have something to do with apache? Not sure.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
Revision history for this message
Diego Serpa (diegoserpa) wrote :

Looking at the apache's error.log, you can see the following:

"[Tue Apr 15 14:31:00.838932 2014] [:error] [pid 9832:tid 140166894430080] Failed running '/usr/bin/mod-mono-server2 --filename /tmp/mod_mono_server_global --nonstop --master (null) (null) (null) (null) (null) (null) (null) (null)'. Reason: No such file or directory"

Important to notice that the apache server is configured to run mod-mono-server-4, but the errors.log show a mod-mono-server-2 "file not found" error.

I tested the code on xsp4 web server, and it worked fine. So, I think that it is a apache's issue.

Revision history for this message
Zachary Burns (zburns) wrote :

Installer will hang due to mod_mono and mod_mono_auto - so you have to kill all instances of Apache when installing libapache2-mo-mono (see screenshot attached)

Then edit MonoPath link in /etc/mono-server4/mono-server4-hosts.conf and change to the following

MonoPath default /usr/lib/mono/4.5:/usr/lib

Then everything works with Apache just fine in 14.04 LTS

Revision history for this message
Diego Serpa (diegoserpa) wrote :

It worked like a charm.
My mono-server4-hosts.conf was like "MonoPath default /usr/lib/mono/4.0:/usr/lib" instead of "MonoPath default /usr/lib/mono/4.5:/usr/lib". Is this a package config error?

Thank you!

Revision history for this message
Rodney Edmondson (rodney-edmondson) wrote :

Zachary. I too used your solution

Then edit MonoPath link in /etc/mono-server4/mono-server4-hosts.conf and change to the following

MonoPath default /usr/lib/mono/4.5:/usr/lib

This solved my problem albeit after many wasted hours.

Thank you!

Revision history for this message
Michal (kontokala) wrote :

It looks like mod_mono.so is loaded twice ...

grep -ri "LoadModule" /etc/apache2 | grep mono

/etc/apache2/mods-available/mod_mono.load:LoadModule mono_module /usr/lib/apache2/modules/mod_mono.so
/etc/apache2/mods-available/mod_mono_auto.load: LoadModule mono_module /usr/lib/apache2/modules/mod_mono.so

then
a2dismod mod_mono_auto

service apache2 restart

Mathew Hodson (mhodson)
affects: ubuntu → mod-mono (Ubuntu)
tags: added: trusty
removed: 14.04 beta lts two
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.