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

start_http_server fails when given an IPv6 address to bind #69

Closed
prophile opened this issue Nov 27, 2015 · 4 comments
Closed

start_http_server fails when given an IPv6 address to bind #69

prophile opened this issue Nov 27, 2015 · 4 comments

Comments

@prophile
Copy link

It would be good not to force an IPv4 fallback.

@brian-brazil
Copy link
Contributor

What was the exact code you used?

@prophile
Copy link
Author

% python                                                                                                                                    [master] 
Python 3.5.0 (default, Sep 14 2015, 02:37:27) 
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import prometheus_client
>>> prometheus_client.start_http_server(port=9097, addr='::')
>>> Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/threading.py", line 923, in _bootstrap_inner
    self.run()
  File "/Users/alynn/Thread/hamon/venv/lib/python3.5/site-packages/prometheus_client/exposition.py", line 64, in run
    httpd = HTTPServer((addr, port), MetricsHandler)
  File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/socketserver.py", line 443, in __init__
    self.server_bind()
  File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/server.py", line 138, in server_bind
    socketserver.TCPServer.server_bind(self)
  File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/socketserver.py", line 457, in server_bind
    self.socket.bind(self.server_address)
socket.gaierror: [Errno 8] nodename nor servname provided, or not known

@brian-brazil
Copy link
Contributor

That looks more like an issue down in cPython, we're passing the addr straight down.

@rud
Copy link

rud commented Sep 27, 2016

Vote to close.

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

3 participants