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

Error when pointing to an url in ip and port. #4

Open
phalcon30964 opened this issue Jun 8, 2018 · 0 comments
Open

Error when pointing to an url in ip and port. #4

phalcon30964 opened this issue Jun 8, 2018 · 0 comments

Comments

@phalcon30964
Copy link

When I include an url with ip and port I get an error.

2018-06-08 14:48:32,622 - root - INFO - Starting server on port 9158

Traceback (most recent call last):
File "app/exporter.py", line 46, in
REGISTRY.register(JsonPathCollector(config))
File "/usr/local/lib/python2.7/dist-packages/prometheus_client/core.py", line 49, in register
names = self._get_names(collector)
File "/usr/local/lib/python2.7/dist-packages/prometheus_client/core.py", line 86, in _get_names
for metric in desc_func():
File "app/exporter.py", line 22, in collect
result = json.loads(urllib2.urlopen(config['json_data_url'], timeout=10).read())
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 473, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 406:

I have tested the url and it works

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

1 participant