flask-socketio + gunicorn + nginx through unix socket file [Errno -2] flask-socketio + gunicorn + nginx through unix socket file [Errno -2] unix unix

flask-socketio + gunicorn + nginx through unix socket file [Errno -2]


Project gevent-socketio (the dependency of Flask-SocketIO that handles the Socket.IO protocol) starts a secondary web server used for the Flash transport. This server listens on the same host as your main server, but at port 10843. Clearly that logic fails when the main server listens on a unix socket.

Do you need to offer Flash support? If not, I recommend that you disable it altogether, by setting environment variable POLICY_SERVER to a non-null value. Here is the logic that disables the policy server, in case you are curious: https://github.com/abourget/gevent-socketio/blob/668d11edbd62052cde1583be1e1d0512c930f16d/socketio/sgunicorn.py#L43-L47