-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Gunicorn fail to bind abstract unix domain socket #2699
Comments
I'll just add that abstract Unix domain sockets "is a nonportable Linux extension". |
@horowity an abstract socket address is not (yet) supported by Gunicorn: https://github.com/benoitc/gunicorn/blob/master/gunicorn/sock.py#L101-L139 Support of it seems easy. You will need to check the pattern in init (https://github.com/benoitc/gunicorn/blob/master/gunicorn/sock.py#L105) and when Fd is none, ignore the filesystem check that use os.stat when this is an abstract socket. Similarly in bind, ignore the Please add a test for it creating such socket and testing if launch is OK. Let me know if you have any other questions. |
@benoitc - could you please review the proposed PR - Abstract unix #2700 for adding such support? |
@benoitc - kind reminder, we are waiting for your approval for the PR. |
I worked around this like so. In real code you'd likely want to do something a bit more robust. I haven't tested this much yet but it works so far.
|
Abstract Unix domain sockets are not related to the file system and their path starts with \0.
When trying to bind gunicorn to such socket we get the following exception:
2 questions:
The text was updated successfully, but these errors were encountered: