Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I don't understand why it refuses to connect.

ls -l to /tmp

srw-rw-rw-  1 root    root        0 mars   4 06:26 php5-fpm.sock=
srw-rw-rw-  1 root    root        0 mars   4 13:30 sgtu3.kernel.sock=

The php5 is the fpm socket which works.

nginx config

upstream servidor_node_u3 {
    server unix:/tmp/sgtu3.kernel.sock fail_timeout=0;
}
server{
    include /etc/nginx/conf.d/configuracioncomun.inc;
    root /var/www/stargatetravellers.com/u3/secret;
    server_name secret.u3.stargatetravellers.com;
    location /api{
            include /etc/nginx/conf.d/configuracionproxy.inc;
            proxy_pass http://servidor_node_u3/;
    }
    access_log /var/log/nginx/stargatetravellers.com/u3.access;
    error_log /var/log/nginx/stargatetravellers.com/u3.error;
}

Relevant node.js app code

var oldUmask = process.umask('0111');
server.listen('/tmp/sgtu3.kernel.sock');

u3.error file last line

2014/03/04 13:57:03 [error] 4560#0: *190 connect() to unix:/tmp/sgtu3.kernel.sock failed    (111: Connection refused) while connecting to upstream, client: 10.74.32.252, server: secret.u3.stargatetravellers.com, request: "POST /api/ADM_LOGIN
share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.