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

Index out of range in create_wsgi_environ #653

Closed
alex-kaufman opened this issue Dec 3, 2015 · 3 comments · Fixed by #654
Closed

Index out of range in create_wsgi_environ #653

alex-kaufman opened this issue Dec 3, 2015 · 3 comments · Fixed by #654
Labels

Comments

@alex-kaufman
Copy link

Gunicorn version 19.4.1
aiohttp version 0.19.0
nginx 1.4.6
Ubuntu 14.04

[2015-12-03 13:24:27 -0500] [12308] [ERROR] Error handling request
Traceback (most recent call last):
File "/home/vagrant/.virtualenvs/mighty/lib/python3.4/site-packages/aiohttp/server.py", line 262, in start
yield from self.handle_request(message, payload)
File "/home/vagrant/.virtualenvs/mighty/lib/python3.4/site-packages/aiohttp/wsgi.py", line 127, in handle_request
environ = self.create_wsgi_environ(message, payload)
File "/home/vagrant/.virtualenvs/mighty/lib/python3.4/site-packages/aiohttp/wsgi.py", line 93, in create_wsgi_environ
environ['REMOTE_ADDR'] = remote[0]
IndexError: index out of range

This change occurred in between the two releases d904071#diff-58081209a1b73c318d74d4fe7ad41460L91
to
eb54e6c#diff-58081209a1b73c318d74d4fe7ad41460R92
which may be related to the issue

This gunicorn issue from June 2014 is somewhat similar benoitc/gunicorn#785.

Downgrading to aiohttp 0.18.4 fixes the issue.

@redixin
Copy link
Contributor

redixin commented Dec 3, 2015

@alex-kaufman could you please check this patch? It should work and REMOTE_* and SERVER_* vars should be set.

Or at least tell me how to start app with gunicorn and unix socket.

@alex-kaufman
Copy link
Author

@redixin that works, thanks!

@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants