[Mono-list] Using mod-mono from source

Mike Morano mmorano at mikeandwan.us
Thu Jul 4 16:59:44 UTC 2013


Hello,

I was doing something similar today - moving a working site to a different
machine (running a new fedora19 install).  Your issue sounds a bit
different from mine, but thought I'd send some of the things that caught me
when getting this up and running again in apache:

1) selinux - although I don't know what a good fix for this is, i had to
disable selinux.
  - edit /etc/selinux/config:  SELINUX=disabled
  - reboot (perhaps there is a way to reload the config if not done
manually, but my machine is not a production server)

2) mono prefix location
  - I compile all of mono to a unique prefix on my machine:  /opt/mono-3.0
  - When I ran apache, was getting issue where it could not find
libmonoPosixHelper.so.  To fix this, I did the following:
       a) cd /etc/ld.so.conf.d/
       b) echo '/opt/mono-3.0/lib' > mod_mono.conf
       c) ldconfig
       d) systemctl restart httpd.service   (restart apache - not sure if
this is the same as what you would need to do on ubuntu)


In terms of permissions, I had previously made sure that the user that runs
apache has appropriate access to the directory structure hosting the site.
 On my system, that is the apache user/group.  Just make sure the directory
hosting the site and parent paths are accessible.

Also, I have a couple extra settings in my apache config, so perhaps take a
look at this in the mod_mono man pages to see if it helps:  MonoWapiDir,
MonoUnixSocket.  In particular, make sure apache has rw acess to the
location pointed to by MonoWapiDir.


After the above was completed, my site worked via apache on the new
machine.

Good luck,
Mike


On Wed, Jul 3, 2013 at 9:21 PM, Danny <dgortonii at gmail.com> wrote:

> No idea.
>
>
> On 07/03/2013 05:30 PM, Martin Thwaites wrote:
>
>> Is this message not getting through? is it just that no one knows the
>> answer, can someone just send a simple "No idea" so I know this is
>> getting through.  It's the first time I've used the list.
>>
>>
>> On Mon, Jul 1, 2013 at 9:49 PM, Martin Thwaites
>> <monoforum at my2cents.co.uk <mailto:monoforum at my2cents.co.**uk<monoforum at my2cents.co.uk>>>
>> wrote:
>>
>>     I'm trying to get mono working from source so i can try and get some
>>     .net 4.5 website stuff working.  I'm using Ubuntu Server 13.04, and
>>     I followed this:
>>
>>     http://stackoverflow.com/**questions/13365158/installing-**mono-3-0<http://stackoverflow.com/questions/13365158/installing-mono-3-0>
>>
>>     Apart from the libgdiplus, I can get everything to compile, however,
>>     when I've installed mod_mono, I keep getting the following in the
>> log...
>>
>>     [Mon Jul 01 21:20:57 2013] [error] Failed to connect to
>>     mod-mono-server after several attempts to spawn the process.
>>
>>     I enable debug on the compile and got this in the logs..
>>
>>     [Mon Jul 01 21:20:55 2013] [warn] getting unix socket path
>>     [Mon Jul 01 21:20:55 2013] [warn] Socket file name
>>     /tmp/mod_mono_server_**GalleryLive
>>     [Mon Jul 01 21:20:55 2013] [warn] try_connect: -1
>>     [Mon Jul 01 21:20:55 2013] [warn] After setup_socket
>>     [Mon Jul 01 21:20:55 2013] [warn] No backend found, will start a new
>>     copy.
>>     [Mon Jul 01 21:20:55 2013] [warn] Acquiring the
>>     /tmp/mod_mono_dashboard_**GalleryLive_2.lock lock for backend start
>>     [Mon Jul 01 21:20:55 2013] [warn] config->servers [0]->dashboard ==
>> 0x0
>>     [Mon Jul 01 21:20:55 2013] [warn] config->servers [1]->dashboard ==
>>     0x7F2F61407000
>>     [Mon Jul 01 21:20:55 2013] [warn] xsp address 0x7f2f6599c6c8,
>>     dashboard 0x7f2f61407000
>>     [Mon Jul 01 21:20:55 2013] [warn] getting unix socket path
>>     [Mon Jul 01 21:20:55 2013] [warn] Socket file name
>>     /tmp/mod_mono_server_**GalleryLive
>>     [Mon Jul 01 21:20:55 2013] [warn] try_connect: -1
>>     [Mon Jul 01 21:20:55 2013] [warn] backend cannot be connected to.
>>     [Mon Jul 01 21:20:55 2013] [warn] Starting backend for alias
>> GalleryLive
>>     [Mon Jul 01 21:20:55 2013] [warn] Applications: /:/var/www/gallery/
>>     [Mon Jul 01 21:20:55 2013] [warn] Config file: (null)
>>     [Mon Jul 01 21:20:55 2013] [warn] Config dir.: (null)
>>     [Mon Jul 01 21:20:55 2013] [warn] Listen port: (null)
>>     [Mon Jul 01 21:20:55 2013] [warn] Listen address: (null)
>>     [Mon Jul 01 21:20:55 2013] [warn] Started new backend, sleeping 2s
>>     to let it configure
>>     [Mon Jul 01 21:20:55 2013] [warn] child started
>>     [Mon Jul 01 21:20:55 2013] [warn] PATH: /usr/local/bin:/usr/bin:/bin
>>     [Mon Jul 01 21:20:55 2013] [warn] serverdir: /usr/bin
>>     [Mon Jul 01 21:20:55 2013] [warn] PATH after:
>>     /usr/bin:/usr/local/bin:/usr/**bin:/bin
>>     [Mon Jul 01 21:20:55 2013] [warn] getting unix socket path
>>     [Mon Jul 01 21:20:55 2013] [warn] Backend socket path:
>>     /tmp/mod_mono_server_**GalleryLive
>>     Warning: unparsed command line arguments:
>>     /tmp/mod_mono_server_**GalleryLive /:/var/www/gallery/
>>
>>
>>     It seems there there is no "/tmp/mod_mono_server_**GalleryLive"
>> socket
>>     for it to connect to, so the error makes sense, but I can't see why
>>     this is the case.
>>
>>     I can run mod-mono-server4 from the desired directory, and it seems
>>     to run fine.
>>
>>     I've run sites using mod-mono from the repos before, but this is the
>>     first time I've compiled from source.
>>
>>     vhost config is (this is also copied some a server using the repos
>>     and is working):
>>
>>     <VirtualHost *:80>
>>              ServerAdmin webmaster at localhost
>>              ServerName gallery.internal.com <http://gallery.internal.com
>> >
>>
>>
>>              DocumentRoot /var/www/gallery/
>>              MonoServerPath GalleryLive "/usr/bin/mod-mono-server4"
>>
>>              MonoApplications GalleryLive "/:/var/www/gallery/"
>>              <Location "/">
>>                      Allow from all
>>                      Order allow,deny
>>                      MonoSetServerAlias GalleryLive
>>                      SetHandler mono
>>              </Location>
>>
>>              ErrorLog /var/log/apache2/error.log
>>
>>              # Possible values include: debug, info, notice, warn,
>>     error, crit,
>>              # alert, emerg.
>>              LogLevel debug
>>
>>              CustomLog /var/log/apache2/access.log combined
>>
>>     </VirtualHost>
>>
>>     I'm thinking that this could be a permissions error somewhere, but
>>     I've run out of places to look.
>>
>>     Any ideas?
>>
>>
>>
>>
>> ______________________________**_________________
>> Mono-list maillist  -  Mono-list at lists.ximian.com
>> http://lists.ximian.com/**mailman/listinfo/mono-list<http://lists.ximian.com/mailman/listinfo/mono-list>
>>
>>  ______________________________**_________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/**mailman/listinfo/mono-list<http://lists.ximian.com/mailman/listinfo/mono-list>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20130704/7ded61bb/attachment.html>


More information about the Mono-list mailing list