Mono + nginx (OpenBSD 5.3)

Hi

I am having trouble getting Mono to work with nginx. I installed my OS
(OpenBSD 5.3) and set up ports. I built mono, mono-xsp and nginx - all
without incident. All three appear to be working OK, but not in
conjunction.

I am trying to run the default MVC3 web app, but keep getting a 502 (Bad
gateway). In the log, I see the following:

[crit] 31764#0: *1 connect() to unix:/tmp/fastcgi.socket failed (2: No
such
file or directory) while connecting to upstream,

The frustrating thing here is that /tmp/fastcgi.socket does actually
exist.
I tried ‘touch’ and making sure ‘wheel’ has the appropriate
permissions.
The result of ‘ls -la /tmp/fastcgi.socket’ revealed nothing awry.

Does anyone have any ideas/hints?

To try and save time, here is my config:

worker_processes 1;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

server {
    listen 80;
    access_log   /home/www/nginx.log;
    error_log    /home/www/errors.log;

    # root /home/www/test;
    # index index.html index.htm index.aspx default.aspx;

    location ^~ /Scripts/ { }
    location ^~ /Content/ { }

    location / {
        root /home/www/test;
        # fastcgi_index /Home/Index;

        fastcgi_pass   unix:/tmp/fastcgi.socket;
        # include        fastcgi_params;
        include /etc/nginx/fastcgi_params;
    }
}

}

Thanks
G

On 06/05/13 18:47, Gee wrote:

see if you can connect to the unix/fcgi socket like this:
http://www.ralf-lang.de/2011/11/22/using-socat-to-debug-unix-sockets-like-telnet-for-tcp/
other than that… I’m out of ideas :slight_smile:

On 6 May 2013 18:47, Gee [email protected] wrote:

[crit] 31764#0: *1 connect() to unix:/tmp/fastcgi.socket failed (2: No such
file or directory) while connecting to upstream,

I vaguely recall seeing this when running some Mono stuff behind a
local nginx proxy. I moved off the project before seeing how people
fixed it, but ISTR that it was a permissions issue.

As a test(!), chmod 777 /tmp/fastcgi.socket andrestarteverything.
That’s obviously not a fix, but it’ll at least show you if you’re
heading in the right direction.

Jonathan

Jonathan M. // Oxford, London, UK
http://www.jpluscplusm.com/contact.html