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

getting 404 from testing collection

166 views
Skip to first unread message

patr...@z2.com

unread,
Nov 12, 2015, 7:01:09 PM11/12/15
to
I believe I've followed all the instructions in http://socorro.readthedocs.org/en/latest/configuring-socorro.html but at step 2.4 Test collection and processing I keep getting nginx's 404 page. I've tried with the local hostname matching or not matching the server_name in socorro-collector.conf but neither seems to make a difference. I've also made sure that the socorro-collector.sock that uwsgi_pass points to exists.

Contents of /etc/nginx/conf.d/socorro-collector.conf:
server {
listen 80;
server_name test-crash-reports;

# 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;
}
}

output from submitting via curl:

$ curl -H 'Host: test-crash-reports' -F 'ProductName=Test' -F 'Version=1.0' -F upload_file_minidump=@7d381dc5-51e2-4887-956b-1ae9c2130109.dump http://localhost/submit
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>The page is not found</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">
/*<![CDATA[*/
body {
background-color: #fff;
color: #000;
font-size: 0.9em;
font-family: sans-serif,helvetica;
margin: 0;
padding: 0;
}
:link {
color: #c00;
}
:visited {
color: #c00;
}
a:hover {
color: #f50;
}
h1 {
text-align: center;
margin: 0;
padding: 0.6em 2em 0.4em;
background-color: #294172;
color: #fff;
font-weight: normal;
font-size: 1.75em;
border-bottom: 2px solid #000;
}
h1 strong {
font-weight: bold;
font-size: 1.5em;
}
h2 {
text-align: center;
background-color: #3C6EB4;
font-size: 1.1em;
font-weight: bold;
color: #fff;
margin: 0;
padding: 0.5em;
border-bottom: 2px solid #294172;
}
h3 {
text-align: center;
background-color: #ff0000;
padding: 0.5em;
color: #fff;
}
hr {
display: none;
}
.content {
padding: 1em 5em;
}
.alert {
border: 2px solid #000;
}

img {
border: 2px solid #fff;
padding: 2px;
margin: 2px;
}
a:hover img {
border: 2px solid #294172;
}
.logos {
margin: 1em;
text-align: center;
}
/*]]>*/
</style>
</head>

<body>
<h1><strong>nginx error!</strong></h1>

<div class="content">

<h3>The page you are looking for is not found.</h3>

<div class="alert">
<h2>Website Administrator</h2>
<div class="content">
<p>Something has triggered missing webpage on your
website. This is the default 404 error page for
<strong>nginx</strong> that is distributed with
Fedora. It is located
<tt>/usr/share/nginx/html/404.html</tt></p>

<p>You should customize this error page for your own
site or edit the <tt>error_page</tt> directive in
the <strong>nginx</strong> configuration file
<tt>/etc/nginx/nginx.conf</tt>.</p>

</div>
</div>

<div class="logos">
<a href="http://nginx.net/"><img
src="/nginx-logo.png"
alt="[ Powered by nginx ]"
width="121" height="32" /></a>

<a href="http://fedoraproject.org/"><img
src="/poweredby.png"
alt="[ Powered by Fedora ]"
width="88" height="31" /></a>
</div>
</div>
</body>
</html>

and from nginx's error.log:
2015/11/12 18:36:01 [error] 3396#0: *1 open() "/usr/share/nginx/html/submit" failed (2: No such file or directory), client: ::1, server: _, request: "POST /submit HTTP/1.1", host: "test-crash-reports"

the various socorro processes (from ps -xa | grep socorro):
746 ? Ssl 0:01 envconsul -once -upcase=false -prefix socorro/common -prefix socorro/collector /data/socorro/socorro-virtualenv/bin/uwsgi -H /data/socorro/socorro-virtualenv -M --need-app -w wsgi.collector -s /var/run/uwsgi/socorro/socorro-collector.sock --chmod-socket=664 --uid=socorro --gid=nginx
747 ? Ssl 0:01 envconsul -upcase=false -prefix socorro/common -prefix socorro/processor /data/socorro/socorro-virtualenv/bin/socorro processor
3672 ? S 0:00 /data/socorro/socorro-virtualenv/bin/uwsgi -H /data/socorro/socorro-virtualenv -M --need-app -w wsgi.collector -s /var/run/uwsgi/socorro/socorro-collector.sock --chmod-socket=664 --uid=socorro --gid=nginx
3673 ? Sl 0:03 /data/socorro/socorro-virtualenv/bin/python /data/socorro/socorro-virtualenv/bin/socorro processor
3682 ? S 0:00 /data/socorro/socorro-virtualenv/bin/uwsgi -H /data/socorro/socorro-virtualenv -M --need-app -w wsgi.collector -s /var/run/uwsgi/socorro/socorro-collector.sock --chmod-socket=664 --uid=socorro --gid=nginx

Robert Helmer

unread,
Nov 12, 2015, 7:58:43 PM11/12/15
to patr...@z2.com, tools-socorro
cc'ing the list

On Thu, Nov 12, 2015 at 4:58 PM, Robert Helmer <rhe...@mozilla.com> wrote:
> I wouldn't expect a 404 for this - are you absolutely certain nginx is
> reading your config file? Did you restart nginx?
>
> From nginx's error log it's clear that it's not forwarding traffic to
> the socket but instead trying to load a static HTML file, which is the
> default behavior.
>
> What OS+distro is this on, and how are you installing nginx (e.g. from
> package or from source etc?)
>> _______________________________________________
>> tools-socorro mailing list
>> tools-...@lists.mozilla.org
>> https://lists.mozilla.org/listinfo/tools-socorro

poday

unread,
Nov 12, 2015, 8:34:19 PM11/12/15
to
OS: CentOS Linux release 7.1.1503 (Core)

I believe nginx is installed via this line from the setup page:
sudo yum install java-1.7.0-openjdk python-virtualenv elasticsearch nginx envconsul consul socorro

nginx lists version 1.6.3 Release 7.el7 for x86_64

I use "sudo systemctl restart nginx" to restart nginx and I've verified that the "nginx: master process /usr/sbin/nginx" and the worker processes all get new pids after restart.

I'm not positive that it's reading the config file. But there isn't any output regarding it in the nginx error.log. And according to the nginx.conf file it "include /etc/nginx/conf.d/*.conf;" which "/etc/nginx/conf.d/socorro-collector.conf" should match. The permissions on socorro-collector.conf is: -rw-r--r--.

Robert Helmer

unread,
Nov 12, 2015, 8:46:04 PM11/12/15
to poday, tools-socorro
Hm yes I agree this all sounds correct. Maybe trying modifying
/etc/nginx.conf directly?

Is SELinux enabled? If so you might check there or try disabling it to
see if that's the problem.

poday

unread,
Nov 12, 2015, 10:29:37 PM11/12/15
to
Ah! found it!

needed to add
listen [::]:80;
to the server to handle ipv6.

xavier...@gmail.com

unread,
Mar 21, 2016, 5:16:53 AM3/21/16
to
Hello,

I'm encountering the exact same problem.

However, adding listen [::]:80; to the /etc/nginx/conf.d/socorro-collector.conf did not help.

I am now getting a "bad gateway" error message :

curl -H 'Host: crash-reports' -F 'ProductName=Test' -F 'Version=1.0' -F upload_file_minidump=@7d381dc5-51e2-4887-956b-1ae9c2130109.dump http://localhost/submit
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.6.3</center>
</body>
</html>


Here is what I get in nginx error log :

[error] 18000#0: *8 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: ::1, server: crash-reports, request: "POST /submit HTTP/1.1", upstream: "uwsgi://unix:/var/run/uwsgi/socorro/socorro-collector.sock:", host: "crash-reports"


Any idea how to fix this ?

Robert Helmer

unread,
Mar 21, 2016, 1:05:14 PM3/21/16
to xavier...@gmail.com, tools-socorro
Hi!
Does /var/run/uwsgi/socorro/socorro-collector.sock exist and is it
readable/writable by the nginx user? The collector uwsgi app must be
running and connected to that socket too.

xavier...@gmail.com

unread,
Mar 22, 2016, 4:34:21 AM3/22/16
to
Thank you very much for your answer !

Actually you are right, /var/run/uwsgi/socorro/socorro-collector.sock does not exist.

ls -la /var/run/uwsgi/socorro/
total 0
drwxr-xr-x 2 socorro nginx 40 Mar 22 04:29 .
drwxr-xr-x 3 root root 60 Mar 21 17:39 ..

However the collector process is running :

ps -ef |grep collector
root 2957 1 0 04:28 ? 00:00:00 envconsul -once -upcase=false -prefix socorro/common -prefix socorro/collector /data/socorro/socorro-virtualenv/bin/uwsgi -H /data/socorro/socorro-virtualenv -M --need-app -w wsgi.collecto -s /var/run/uwsgi/socorro/socorro-collector.sock --chmod-socket=664 --uid=socorro --gid=nginx

Do you know how I can fix this ? Who is supposed to create the socorro-collector.sock ?

I followed this http://socorro.readthedocs.org/en/latest/production-install.html very precisely, but maybe I messed up.

An Nguyen

unread,
Aug 18, 2016, 7:08:08 PM8/18/16
to
check if consul is active via
sudo systemctl status consul

if not,
sudo systemctl start consul
sudo systemctl enable consul

xings...@gmail.com

unread,
Aug 31, 2016, 3:04:22 AM8/31/16
to
Hi, I have the same problem with xavier except that my /var/run/uwsgi/socorro/socorro-collector.sock (chmoded to 777) does exist, and my consul service seems active too:

sudo systemctl status consul
ā— consul.service - Consul is a tool for service discovery and configuration. Consul is distributed, highly available, and extremely scalable.
Loaded: loaded (/usr/lib/systemd/system/consul.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2016-08-31 15:40:29 CST; 9min ago
Docs: http://www.consul.io
Main PID: 2626 (consul)
CGroup: /system.slice/consul.service
└─2626 /usr/bin/consul agent -config-dir=/etc/consul -data-dir=/var/lib/consul

Aug 31 15:40:32 bogon consul[2626]: 2016/08/31 15:40:32 [INFO] raft: Node at 10.0.8.249:8300 [Candidate] ent... state
Aug 31 15:40:32 bogon consul[2626]: 2016/08/31 15:40:32 [INFO] raft: Election won. Tally: 1
Aug 31 15:40:32 bogon consul[2626]: 2016/08/31 15:40:32 [INFO] raft: Node at 10.0.8.249:8300 [Leader] enteri... state
Aug 31 15:40:32 bogon consul[2626]: 2016/08/31 15:40:32 [INFO] consul: cluster leadership acquired
Aug 31 15:40:32 bogon consul[2626]: 2016/08/31 15:40:32 [INFO] consul: New leader elected: bogon
Aug 31 15:40:32 bogon consul[2626]: 2016/08/31 15:40:32 [INFO] raft: Disabling EnableSingleNode (bootstrap)
Aug 31 15:40:32 bogon consul[2626]: 2016/08/31 15:40:32 [INFO] consul: member 'bogon' joined, marking health alive
Aug 31 15:40:32 bogon consul[2626]: 2016/08/31 15:40:32 [INFO] consul: member 'localhost.localdomain' reaped...tering
Aug 31 15:40:33 bogon consul[2626]: 2016/08/31 15:40:33 [INFO] agent: Synced service 'consul'
Aug 31 15:40:59 bogon consul[2626]: ==> Newer Consul version available: 0.6.4
Hint: Some lines were ellipsized, use -l to show in full.

but when I was uploading the dump file, I got this:
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.6.3</center>
</body>
</html>


nginx error log file:
2016/08/31 14:50:47 [error] 3101#0: *7 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 127.0.0.1, server: crash-reports, request: "POST /submit HTTP/1.1", upstream: "uwsgi://unix:/var/run/uwsgi/socorro/socorro-collector.sock:", host: "crash-reports"

socorro collector:
ps -ef |grep collector
root 2604 1 0 15:39 ? 00:00:00 envconsul -once -upcase=false -prefix socorro/common -prefix socorro collector /data/socorro/socorro-virtualenv/bin/uwsgi -H /data/socorro/socorro-virtualenv -M --need-app -w wsgi.collector -s /var/run/uwsgi/socorro/socorro-collector.sock --chmod-socket=664 --uid=socorro --gid=nginx
socorro 2635 2604 0 15:40 ? 00:00:00 /data/socorro/socorro-virtualenv/bin/uwsgi -H /data/socorro/socorro-virtualenv -M --need-app -w wsgi.collector -s /var/run/uwsgi/socorro/socorro-collector.sock --chmod-socket=664 --uid=socorro --gid=nginx
socorro 2643 2635 0 15:40 ? 00:00:00 /data/socorro/socorro-virtualenv/bin/uwsgi -H /data/socorro/socorro-virtualenv -M --need-app -w wsgi.collector -s /var/run/uwsgi/socorro/socorro-collector.sock --chmod-socket=664 --uid=socorro --gid=nginx
root 2825 2450 0 16:02 pts/0 00:00:00 grep --color=auto collector

Any ideas? please help
0 new messages