gunicorn
gunicorn copied to clipboard
Gunicorn errors on WSL when binding to unix socket
My system:
Windows version: 10.0.19045 WSL version: Ubuntu 20.04.3 LTS Python version: 3.9.3 My installed python packages: requirements.txt
My observation
I'm following this tutorial and everything works fine - I can run my flask app using flast itself:
python app.py
It works fine using gunicorn with an IP address:
gunicorn --bind 0.0.0.0:5000 wsgi:app
But when I execute the next step binding it to a unix socket the following error happens:
gunicorn --bind=unix:/mnt/c/Users/myapp/app.sock -m 777 wsgi:app
[2022-11-26 19:30:44 +0100] [2738] [INFO] Starting gunicorn 20.1.0
[2022-11-26 19:30:44 +0100] [2738] [ERROR] Retrying in 1 second.
[2022-11-26 19:30:45 +0100] [2738] [ERROR] Retrying in 1 second.
[2022-11-26 19:30:46 +0100] [2738] [ERROR] Retrying in 1 second.
[2022-11-26 19:30:47 +0100] [2738] [ERROR] Retrying in 1 second.
[2022-11-26 19:30:48 +0100] [2738] [ERROR] Retrying in 1 second.
[2022-11-26 19:30:49 +0100] [2738] [ERROR] Can't connect to /mnt/c/Users/myapp/app.sock
Also while this runs, there is no app.sock
showing up in the directory.
Any idea what this could be about? I was thinking of some problem with sockets on WSL?
same here
@ashasanm Only --log-level debug
gives you the error (PR #3191 is one suggestion how making this easier to figure out).
You probably did not want to create a Win32 (C:) Unix socket anyway, they are different from WSL Unix sockets.
no activity since awhile. closing feel free to create a new ticket if needed.