# mod_mono does not run mod-mono-server

## Twix

I have installed mono, apache2, xsp and mod_mono.

I have configured things like it should, but when I access a page under /mono, I get a 503 error (service not available).

In the apache2 logs, I can see 

```

Could not connect. No such file or directory

```

Normally, mod_mono should run mod-mono-server, which opens the /tmp/mod_mono_server socket. This socket isn't on my system, so apache2 cannot open it to talk to mono.

How can I fix that?

----------

## Haqqax

Hi,

I am inexperienced user myself and I just stumbled on this an hor ago. I did not find out yet how to fix this (I came to this forum to look for the fix  :Smile:  )

This is what I already know:

1) I can run manually mod-mono-server.exe and it works.

2) XSP does not work when run from /etc.init.d/xsp - it seems to start - no error message is displayed, but you can not connect to the service nor ps -A shows any process for it (I am not sure whether it has anything to do with mod_mono problems)

3) Even when you start in manually, Apache will return 503 Service unavailable, unless you chmod access rights to the mod_mono unix socket. Error log says it clearly.

4) Without manual start for mod_mono, all you get is an error and error log entry in Apache error log, saying that apache can not find the file.

I think the problem is that Apache does not use correct path or file name to start mod_mono, and that is the bug. If Apache started mod_mono, there should be no problem with access rights to the socket. OK, I am continuing my search for solution. If anyone knows the answer, please post it here  :Smile: 

----------

## Haqqax

Uff, I did not expect it will take half of the evening to solve  :Sad:  Does anyone know where mod-mono-server.exe keeps it's logs???????

The problem was incorrect permissions to /tmp/.wapi

To solve it, just run:

```
rm -R /tmp/.wapi
```

You also have to have at least one application configured for mono - otherwise it will not start.

----------

## Twix

I removed /tmp/.wapi, even if its permissions were

drwx------ apache apache

Started apache, pointed it to http://localhost/mono, but still the same error.

mod-mono-server.exe is running, but the socket file /tmp/mod_mono_server is missing.

----------

## BlackHand

change the owner and group of /usr/bin/mod-mono-server to apache:apache

```
chown apache:apache /usr/bin/mod-mono-*
```

and after this, that:

```
chmod 6755 /usr/bin/mod-mono-*
```

for precaution do  

```
rm /tmp/mod_mono_server
```

now try again, for me, it works....

maybe is needed a little change in the ebuilds  :Smile: 

----------

## Twix

Well,

re-emerging apache2 without the "threads" USE flag fixed the thing. It's been 2 months I've been fighting with this issue. I just didn't remember that threading support in apache2 was somewhat beta and I did enable it.

I'll update my bug report.

----------

## zambizzi

I tried the last two suggestions and it did not resolve the problem...see my thread here:

https://forums.gentoo.org/viewtopic-p-2290662.html#2290662

----------

