vimeo / graph-explorer

A graphite dashboard powered by structured metrics
http://vimeo.github.io/graph-explorer/
Apache License 2.0
1.06k stars 93 forks source link

500 Internal server error #117

Closed fote closed 10 years ago

fote commented 10 years ago

Hello.

I'm trying to install graph-explorer, but when i try to run update-metrics.py i get this error:

2014-05-29 19:09:10,941 - update_metrics - ERROR - sorry, something went wrong: HTTP Error 500: INTERNAL SERVER ERROR Traceback (most recent call last): File "./update_metrics.py", line 31, in main backend.download_metrics_json() File "/usr/local/lib/python2.7/dist-packages/graph_explorer-1.95-py2.7.egg/graph_explorer/backend.py", line 35, in download_metrics_json response = urllib2.urlopen(url) File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen return _opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 406, in open response = meth(req, response) File "/usr/lib/python2.7/urllib2.py", line 519, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python2.7/urllib2.py", line 444, in error return self._call_chain(_args) File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain result = func(_args) File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) HTTPError: HTTP Error 500: INTERNAL SERVER ERROR

Then I tried to send GET request to /metrics/index.json, and it work! I can get list of metrics. Can you pls help me?

Thank you =)

My config.cfg: [graph_explorer] listen_host = 0.0.0.0 ; defaults to "all interfaces" listen_port = 8080 filename_metrics = metrics.json log_file = /var/log/graph-explorer/graph-explorer.log

[graphite] url_server = http://graphite.local url_client = http://graphite.local username = password =

[anthracite] host = port = 9200 index = anthracite add_url =

[locations] plugins_structured_metrics = builtins dashboards = builtins

[elasticsearch] host = localhost port = 9200 index = graphite_metrics2 limit_es_metrics = 10000

process_native_proto2 = True

[alerting] alerting = True db = /var/lib/graph-explorer/alerting.db smtp = your-smtp-server from = Graph Explorer graph-explorer@example.com backoff = 1800 base_uri = http://graph-explorer:8080

[collectd] StoreRates = True prefix = ^collectd.

Dieterbe commented 10 years ago

i would recommend using ngrep or tcpdump to look at the request, usually graphite dumps a stacktrace when it returns http 500.

fote commented 10 years ago

Debug output in graphite log: [30/May/2014 13:42:41] "GET /metrics/index.json HTTP/1.0" 500 34890484 Traceback (most recent call last): File "/usr/lib64/python2.7/wsgiref/handlers.py", line 86, in run self.finish_response() File "/usr/lib64/python2.7/wsgiref/handlers.py", line 128, in finish_response self.write(data) File "/usr/lib64/python2.7/wsgiref/handlers.py", line 217, in write self._write(data) File "/usr/lib64/python2.7/socket.py", line 324, in write self.flush() File "/usr/lib64/python2.7/socket.py", line 303, in flush self._sock.sendall(view[write_offset:write_offset+buffer_size]) error: [Errno 32] Broken pipe [30/May/2014 13:42:41] "GET /metrics/index.json HTTP/1.0" 500 59 Traceback (most recent call last): File "/usr/lib64/python2.7/SocketServer.py", line 593, in process_request_thread self.finish_request(request, client_address) File "/usr/lib64/python2.7/SocketServer.py", line 334, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/lib64/python2.7/site-packages/django/core/servers/basehttp.py", line 126, in init super(WSGIRequestHandler, self).init(_args, *_kwargs) File "/usr/lib64/python2.7/SocketServer.py", line 651, in init self.finish() File "/usr/lib64/python2.7/SocketServer.py", line 710, in finish self.wfile.close() File "/usr/lib64/python2.7/socket.py", line 279, in close self.flush() File "/usr/lib64/python2.7/socket.py", line 303, in flush self._sock.sendall(view[write_offset:write_offset+buffer_size]) error: [Errno 32] Broken pipe

I have no idea what it is.

Dieterbe commented 10 years ago

neither do i. are you sure that corresponds to the graph-explorer request? again, ngrep is more useful here.

fote commented 10 years ago

This is really strange. When i use urllib - it works, when i use urllib2 - don't

Dieterbe commented 10 years ago

looks like a problem with graphite itself anyway.