Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

find_prefix errors #26

Open
idealerror opened this issue Dec 29, 2015 · 5 comments
Open

find_prefix errors #26

idealerror opened this issue Dec 29, 2015 · 5 comments

Comments

@idealerror
Copy link

I keep getting this when trying find_prefix or find_prefixes_asn

[2015-12-28 21:34:56 +0000] [9711] [ERROR] Error handling request /analytics/find_prefix
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/sync.py", line 130, in handle
self.handle_request(listener, req, client, addr)
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/sync.py", line 171, in handle_request
respiter = self.wsgi(environ, resp.start_response)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1836, in call
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functionsrule.endpoint
File "/usr/local/lib/python2.7/dist-packages/sir/agent.py", line 100, in analytics_view_find_prefix
return sir.analytics.views.find_prefix(request)
File "/usr/local/lib/python2.7/dist-packages/sir/analytics/views.py", line 104, in find_prefix
context['date'] = context['available_dates'][-1]
IndexError: list index out of range
172.249.142.103 - - [28/Dec/2015:21:34:56 -0800] "GET /analytics/find_prefix HTTP/1.1" 500 - "-" "-"

@dbarrosop
Copy link
Owner

Do you have data in your database? There is a bug that I haven't had time to fix that triggers that when the database is completely empty.

@idealerror
Copy link
Author

Ah yes. I do now. I didn't realize i could only query data after each hour.

Also I for some reason am unable to search the prefixes. For example I see all the prefixes in the bgp output file for pmacct but when I search any of them it gives me an internal error. Am I searching wrong?

@dbarrosop
Copy link
Owner

Ah yes. I do now. I didn't realize i could only query data after each hour.

That's a bug, would probably be nicer to don't break and inform there is no data yet but I haven't had the time to fix it.

Am I searching wrong?

Does gunicorn report anything back? How are you searching exactly?

@idealerror
Copy link
Author

Just noticed:

IOError: [Errno 13] Permission denied: '/pmacct-1.5.1/output/bgp-184_164_192_2-2015_12_29T01_00_01.txt'

Restarted in sudo and it works fine now.

Sorry for the headache. Snap: http://cl.ly/1L1b3L0h1w1u

@dbarrosop
Copy link
Owner

Glad to be your rubber duck : )

Feel free to provide feedback and report issues and even pull requests if you want to fix them : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants