开启了 flask-socketio 的日志,现在重新启动,ps -ef | grep guni 出现 2 行,其中 1 行是 work,work 数应该没错,日志现在报错,继续搜索解决方案,
[2018-10-11 15:19:04 +0800] [697] [INFO] Starting gunicorn 19.9.0
[2018-10-11 15:19:04 +0800] [697] [INFO] Listening at: http://127.0.0.1:5000 (697)
[2018-10-11 15:19:04 +0800] [697] [INFO] Using worker: geventwebsocket.gunicorn.workers.GeventWebSocketWorker
[2018-10-11 15:19:04 +0800] [700] [INFO] Booting worker with pid: 700
Server initialized for gevent.
bae5c5f54be848fcabd9e5cfe8ce59fa: Sending packet OPEN data {'sid': 'bae5c5f54be848fcabd9e5cfe8ce59fa', 'upgrades': ['websocket'], 'pingTimeout': 60000, 'pingInterval': 25000}
bae5c5f54be848fcabd9e5cfe8ce59fa: Sending packet MESSAGE data 0
bae5c5f54be848fcabd9e5cfe8ce59fa: Received packet MESSAGE data 0/process_upload_csv
bae5c5f54be848fcabd9e5cfe8ce59fa: Sending packet MESSAGE data 0/process_upload_csv
Traceback (most recent call last):
File "/root/.local/share/virtualenvs/asset-ar0OxIPP/lib/python3.7/site-packages/gevent/
pywsgi.py", line 975, in handle_one_response
self.run_application()
File "/root/.local/share/virtualenvs/asset-ar0OxIPP/lib/python3.7/site-packages/geventwebsocket/
handler.py", line 82, in run_application
self.process_result()
File "/root/.local/share/virtualenvs/asset-ar0OxIPP/lib/python3.7/site-packages/gevent/
pywsgi.py", line 909, in process_result
self.write(data)
File "/root/.local/share/virtualenvs/asset-ar0OxIPP/lib/python3.7/site-packages/gevent/
pywsgi.py", line 756, in write
self._write_with_headers(data)
File "/root/.local/share/virtualenvs/asset-ar0OxIPP/lib/python3.7/site-packages/gevent/
pywsgi.py", line 777, in _write_with_headers
self._write(data)
File "/root/.local/share/virtualenvs/asset-ar0OxIPP/lib/python3.7/site-packages/gevent/
pywsgi.py", line 741, in _write
self._sendall(data)
File "/root/.local/share/virtualenvs/asset-ar0OxIPP/lib/python3.7/site-packages/gevent/
pywsgi.py", line 703, in _sendall
self.socket.sendall(data)
File "/root/.local/share/virtualenvs/asset-ar0OxIPP/lib/python3.7/site-packages/gevent/
_socket3.py", line 457, in sendall
data_memory = _get_memory(data)
File "/root/.local/share/virtualenvs/asset-ar0OxIPP/lib/python3.7/site-packages/gevent/
_socket3.py", line 45, in _get_memory
mv = memoryview(data)
TypeError: memoryview: a bytes-like object is required, not 'str'
2018-10-11T07:20:48Z {'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '54310', 'HTTP_HOST': '10.26.15.222', (hidden keys: 31)} failed with TypeError
bae5c5f54be848fcabd9e5cfe8ce59fa: Client is gone, closing socket
bae5c5f54be848fcabd9e5cfe8ce59fa: Client is gone, closing socket
ca996671e95d4e54834a745c9129caa8: Sending packet OPEN data {'sid': 'ca996671e95d4e54834a745c9129caa8', 'upgrades': ['websocket'], 'pingTimeout': 60000, 'pingInterval': 25000}
ca996671e95d4e54834a745c9129caa8: Sending packet MESSAGE data 0
ca996671e95d4e54834a745c9129caa8: Received packet MESSAGE data 0/process_upload_csv
ca996671e95d4e54834a745c9129caa8: Sending packet MESSAGE data 0/process_upload_csv
Traceback (most recent call last):
File "/root/.local/share/virtualenvs/asset-ar0OxIPP/lib/python3.7/site-packages/gevent/
pywsgi.py", line 975, in handle_one_response
self.run_application()
File "/root/.local/share/virtualenvs/asset-ar0OxIPP/lib/python3.7/site-packages/geventwebsocket/
handler.py", line 82, in run_application
self.process_result()
File "/root/.local/share/virtualenvs/asset-ar0OxIPP/lib/python3.7/site-packages/gevent/
pywsgi.py", line 909, in process_result
self.write(data)
File "/root/.local/share/virtualenvs/asset-ar0OxIPP/lib/python3.7/site-packages/gevent/
pywsgi.py", line 756, in write