我在 Flask 上创建网站。与服务器的所有通信都通过 WebSockets。当我使用带有 TCP/IP 的 gunicorn 时:
gunicorn --worker-class socketio.sgunicorn.GeventSocketIOWorker chat:app --bind=127.0.0.1:8800
一切正常。但是当我使用 Unix 套接字文件时:
gunicorn --worker-class socketio.sgunicorn.GeventSocketIOWorker chat:app -b unix:///var/sockets/gunicorn.sock
我在日志中有错误:
[root@localhost legalize]# gunicorn --worker-class socketio.sgunicorn.GeventSocketIOWorker chat:app -b unix:///var/sockets/gunicorn.sock
2015-04-03 13:32:26 [25392] [INFO] Starting gunicorn 18.0
2015-04-03 13:32:26 [25392] [INFO] Listening at: unix:/var/sockets/gunicorn.sock (25392)
2015-04-03 13:32:26 [25392] [INFO] Using worker: socketio.sgunicorn.GeventSocketIOWorker
2015-04-03 13:32:26 [25397] [INFO] Booting worker with pid: 25397
FAILED to start flash policy server: [Errno -2] Name or service not known: ('/', 10843)
FAILED to start flash policy server: [Errno -2] Name or service not known: ('/', 10843)
FAILED to start flash policy server: [Errno -2] Name or service not known: ('/', 10843)
我该如何解决这个错误?