Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

nginx config problem?

933 views
Skip to first unread message

sbrel...@izotope.com

unread,
Dec 5, 2016, 11:04:42 AM12/5/16
to
Hi,
I'm trying to test my new socorro instance and getting a 404 when I try to submit the test dump. I am seeing this in /var/log/nginx/error.log :

"/usr/share/nginx/html/submit" failed (2: No such file or directory)

Indeed there's nothing there, but I don't see anything about populating that in the setup instructions.

I assume I am just missing a configuration somewhere but I've been through the setup instructions a number of times and haven't found anything.

Does anyone have any suggestions?

Evgeniy Zolenko

unread,
Dec 5, 2016, 11:41:50 AM12/5/16
to
You need /etc/nginx/socorro-collector.conf with something like this:

server {
listen 80;
server_name crash-reports.yourdomain.com;

# crash-reports needs to accept potentially large minidumps
client_max_body_size 20m;

location / {
uwsgi_pass unix:/var/run/uwsgi/socorro/socorro-collector.sock;
include uwsgi_params;
}
}

And you need socorro-collector service running.

Also restart nginx and see if it complains about virtual hosts conflicting -- maybe you have 2 endpoints configured on the same host:port. Check /etc/nginx/nginx.conf -- it might have a default endpoint configured.

Also check those out for configuration ideas:
https://github.com/mozilla/socorro-infra/blob/master/puppet/modules/socorro/files/etc_nginx/

sbrel...@izotope.com

unread,
Dec 5, 2016, 11:51:37 AM12/5/16
to
The socorro-collector.conf is configured fine and the socorro-collector service is indeed running.

This is what I have for the server config in nginx.conf:

server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /usr/share/nginx/html;

# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;

location / {
}

error_page 404 /404.html;
location = /40x.html {
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}

ezol...@smarttech.com

unread,
Dec 5, 2016, 5:11:46 PM12/5/16
to
Check /var/log/messages, you probably have a complaint about conflicts on port 80.

Try removing default server lines from main config and restart nginx. (both "listen" and "server_name").

This is my nginx.conf, copied from socorro-infra repo:

user nginx;
worker_processes 1;

error_log /var/log/nginx/error.log;

pid /run/nginx.pid;

events {
worker_connections 1024;
}

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

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;

keepalive_timeout 65;

index index.html index.htm;

include /etc/nginx/conf.d/*.conf;

sbrel...@izotope.com

unread,
Dec 6, 2016, 9:11:54 AM12/6/16
to
/var/log/messages doesn't have much happening in it - just a whole lot of this:
Dec 6 14:05:55 ip-10-0-115-142 bash: 2016-12-06 14:05:55,122 INFO - processor - - QueuingThread - there is nothing to do. Sleeping for 7 seconds
Dec 6 14:06:02 ip-10-0-115-142 bash: 2016-12-06 14:06:02,130 DEBUG - processor - - QueuingThread - received None

After removing the additional server_name and listen configs from the main nginx config I'm still not getting anywhere with testing. The response I get now is "502 Bad Gateway"

Looking at the nginx error log I see:
[crit] 5126#0: *3 connect() to unix:/var/run/uwsgi/socorro/socorro-collector.sock failed (2: No such file or directory) while connecting to upstream, client

Indeed, there is no socorro-collector.sock there.

As a test, I touched a file there (and gave it wide-open 777 permissions) and now I am seeing this in the nginx error log:

[error] 5210#0: *1 connect() to unix:/var/run/uwsgi/socorro/socorro-collector.sock failed (111: Connection refused)

sbrel...@izotope.com

unread,
Dec 6, 2016, 9:28:48 AM12/6/16
to
Sorry sorry - a reboot fixed this issue for me. Thanks very much for your help!
0 new messages