A TypeError is raised at startup if we bind to a unix socket with the gaiohttp worker. #822

Closed
ghost opened this Issue Jul 19, 2014 · 2 comments

Projects

None yet

2 participants

@ghost
ghost commented Jul 19, 2014

A TypeError is raised continuously as soon as we launch gunicorn, if we bind it to a unix socket, when we use the gaiohttp worker class.


Minimal test:

def app(environ, start_response):
    start_response('200 OK', [('Content-Type', 'text/plain')])
    return [b'Hello, World!']
$ gunicorn -b unix:/tmp/minimaltest.sock -k gaiohttp minimal:app

Traceback (repeated many times):

Traceback (most recent call last):
  File "/home/metathink/workspace/tests/venv/lib/python3.4/site-packages/gunicorn/arbiter.py", line 507, in spawn_worker
    worker.init_process()
  File "/home/metathink/workspace/tests/venv/lib/python3.4/site-packages/gunicorn/workers/gaiohttp.py", line 33, in init_process
    super().init_process()
  File "/home/metathink/workspace/tests/venv/lib/python3.4/site-packages/gunicorn/workers/base.py", line 120, in init_process
    self.run()
  File "/home/metathink/workspace/tests/venv/lib/python3.4/site-packages/gunicorn/workers/gaiohttp.py", line 39, in run
    self.loop.run_until_complete(self._runner)
  File "/usr/lib/python3.4/asyncio/base_events.py", line 208, in run_until_complete
    return future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 243, in result
    raise self._exception
  File "/usr/lib/python3.4/asyncio/tasks.py", line 302, in _step
    result = next(coro)
  File "/home/metathink/workspace/tests/venv/lib/python3.4/site-packages/gunicorn/workers/gaiohttp.py", line 75, in _run
    factory = self.get_factory(sock.sock, *sock.cfg_addr)
TypeError: get_factory() takes 4 positional arguments but 17 were given

Tested with gunicorn 19.0.0 and 1584023

@asvetlov
Collaborator

Thanks for report.

@asvetlov asvetlov self-assigned this Jul 23, 2014
@asvetlov asvetlov added the Bug label Jul 23, 2014
@benoitc benoitc added this to the R19.1 milestone Jul 25, 2014
@benoitc
Owner
benoitc commented Jul 26, 2014

fixed in 2b2725d

@benoitc benoitc closed this Jul 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment