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

aiohttp.worker.GunicornUVLoopWebWorker + unix sockets Nginx - error #59

Closed
Dexus77 opened this issue Oct 26, 2016 · 5 comments
Closed

Comments

@Dexus77
Copy link

Dexus77 commented Oct 26, 2016

  • uvloop version: 0.5.4
  • python version: 3.5.2
  • platform: Centos7

Aiohttp recomended deploy Gunicorn + Nginx
Gunicorn (aiohttp.worker.GunicornWebWorker) + unix socket Nginx - OK
Ginicorn (aiohttp.worker.GunicornUVLoopWebWorker) + unix sockets Nginx - error

Traceback (most recent call last):
File "/usr/local/python/3.5.2/lib/python3.5/site-packages/aiohttp/helpers.py", line 407, in log
[message, environ, response, transport, time]))
File "/usr/local/python/3.5.2/lib/python3.5/site-packages/aiohttp/helpers.py", line 394, in _format_line
return tuple(m(args) for m in self._methods)
File "/usr/local/python/3.5.2/lib/python3.5/site-packages/aiohttp/helpers.py", line 394, in
return tuple(m(args) for m in self._methods)
File "/usr/local/python/3.5.2/lib/python3.5/site-packages/aiohttp/helpers.py", line 347, in _format_a
peername = args[3].get_extra_info('peername')
File "uvloop/handles/tcp.pyx", line 150, in uvloop.loop.TCPTransport.get_extra_info (uvloop/loop.c:66876)
File "uvloop/dns.pyx", line 60, in uvloop.loop.__convert_sockaddr_to_pyaddr (uvloop/loop.c:82997)
RuntimeError: cannot convert sockaddr into Python object

@1st1
Copy link
Member

1st1 commented Oct 26, 2016

I'll need some details on this:

  • What kind of socket connection is the transport working with? I.e. this exception can only be triggered if the socket is not AF_INET or AF_INET6.
  • Can you provide the source code that exhibits the problem?
  • Were you able to reproduce this on other OSes?

@Dexus77
Copy link
Author

Dexus77 commented Oct 26, 2016

  1. Yes, the problem is when connect via unix socket.
  2. Test add. Main config Nginx - default.
  3. Sorry, no other OS.

testapp.zip

@1st1
Copy link
Member

1st1 commented Nov 6, 2016

Seems that somehow gunicorn or aiohttp bind UNIX address using a TCP server (loop.create_server, instead of loop.create_unix_server).

@asvetlov Do you have any idea what's going on?

@1st1
Copy link
Member

1st1 commented Nov 6, 2016

Ah, I got it: python/asyncio#453

@1st1
Copy link
Member

1st1 commented Nov 10, 2016

This should be fixed in aiohttp 1.1.2 and uvloop 0.6.1. Feel free to reopen if anything.

@1st1 1st1 closed this as completed Nov 10, 2016
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