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

documentation error: httplib2.ServerNotFoundError: Unable to find the server at http #56

Open
justinc1 opened this issue Jul 3, 2018 · 2 comments

Comments

@justinc1
Copy link

justinc1 commented Jul 3, 2018

I believe in docs/index.rst line

cl = Client('http://localhost:55672/api', 'guest', 'guest')

should be

cl = Client('localhost:55672', 'guest', 'guest')

While copying example code, I first got:

root@2b2e772eeff1:/code# ./sender-http.py 
http://http:/rabbitmq:15672/api/api/exchanges/myvh/amq.default/publish
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/httplib2/__init__.py", line 1187, in _conn_request
    conn.connect()
  File "/usr/local/lib/python3.6/dist-packages/httplib2/__init__.py", line 918, in connect
    for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM):
  File "/usr/lib/python3.6/socket.py", line 745, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/pyrabbit/http.py", line 106, in do_call
    headers)
  File "/usr/local/lib/python3.6/dist-packages/httplib2/__init__.py", line 1514, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/local/lib/python3.6/dist-packages/httplib2/__init__.py", line 1264, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/local/lib/python3.6/dist-packages/httplib2/__init__.py", line 1194, in _conn_request
    raise ServerNotFoundError("Unable to find the server at %s" % conn.host)
httplib2.ServerNotFoundError: Unable to find the server at http

And string http://http:/rabbitmq:15672/api/api/exchanges/myvh/amq.default/publish has obvious errors.

@TTPerotti
Copy link

Thank you for this, it saved my evening! This certainly has been open a while. I wonder if it will get merged.

@norkos
Copy link

norkos commented Dec 11, 2022

thank you ! :)

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