ConnectionAbortedError на gevent с использованием колбы-сокета - PullRequest
0 голосов
/ 14 декабря 2018

Я использую Flask с flask-socketio и gevent, работаю с Windows.

Сокет работает хорошо, но когда я меняю страницу в клиентской сети, на терминале появляется эта ошибка gevent:

ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

это журнал ошибок:

Traceback (most recent call last):
  File "C:\Program Files\Python36\lib\site-packages\gevent\pywsgi.py", line 935, in handle_one_response
    self.run_application()
  File "C:\Program Files\Python36\lib\site-packages\gevent\pywsgi.py", line 909, in run_application
    self.process_result()
  File "C:\Program Files\Python36\lib\site-packages\gevent\pywsgi.py", line 895, in process_result
    self.write(data)
  File "C:\Program Files\Python36\lib\site-packages\gevent\pywsgi.py", line 741, in write
    self._write_with_headers(data)
  File "C:\Program Files\Python36\lib\site-packages\gevent\pywsgi.py", line 763, in _write_with_headers
    self._write(data)
  File "C:\Program Files\Python36\lib\site-packages\gevent\pywsgi.py", line 726, in _write
    self._sendall(data)
  File "C:\Program Files\Python36\lib\site-packages\gevent\pywsgi.py", line 701, in _sendall
    self.socket.sendall(data)
  File "C:\Program Files\Python36\lib\site-packages\gevent\_socket3.py", line 418, in sendall
    data_sent += self.send(data_memory[data_sent:], flags)
  File "C:\Program Files\Python36\lib\site-packages\gevent\_socket3.py", line 390, in send
    return _socket.socket.send(self._sock, data, flags)
ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine
Fri Dec 14 10:44:35 2018 {'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '56659', 'HTTP_HOST': 'localhost:5000', (hidden keys: 23)} failed with ConnectionAbortedError

И это мое замораживание пункта:

asn1crypto==0.22.0
astroid==1.6.3
autopep8==1.3.5
Babel==2.4.0
beautifulsoup4==4.6.0
bleach==2.1.3
cairocffi==0.8.0
CairoSVG==2.1.3
certifi==2017.4.17
cffi==1.10.0
chardet==3.0.3
click==6.7
colorama==0.3.9
crypto==1.4.1
cryptography==2.2.2
cssselect2==0.2.1
cycler==0.10.0
dateutils==0.6.6
decorator==4.0.11
defusedxml==0.5.0
dnspython==1.16.0
docutils==0.14
dxfgrabber==0.8.4
dxfwrite==1.2.1
entrypoints==0.2.3
et-xmlfile==1.0.1
Flask==0.12.2
Flask-Babel==0.11.2
Flask-Login==0.4.1
Flask-SocketIO==3.1.1
Flask-SQLAlchemy==2.2
Flask-WeasyPrint==0.5
Flask-WTF==0.14.2
freeopcua==0.90.3
Genshi==0.7.1
gevent==1.2.2
greenlet==0.4.13
hgapi==1.7.4
html5lib==1.0.1
idna==2.5
ipykernel==4.8.0
ipython==6.2.1
ipython-genutils==0.2.0
ipywidgets==7.2.1
isort==4.3.4
itsdangerous==0.24
jdcal==1.3
jedi==0.11.1
Jinja2==2.9.6
jsonpickle==0.9.4
jsonschema==2.6.0
jupyter==1.0.0
jupyter-client==5.2.2
jupyter-console==5.2.0
jupyter-core==4.4.0
kiwisolver==1.0.1
lazy-object-proxy==1.3.1
lxml==3.8.0
MarkupSafe==1.0
matplotlib==2.2.2
mccabe==0.6.1
mistune==0.8.3
monotonic==1.5
mpmath==1.0.0
Naked==0.1.31
nbconvert==5.3.1
nbformat==4.4.0
netifaces==0.10.6
nose==1.3.7
notebook==5.4.1
numpy==1.14.2
openpyxl==2.4.9
pandas==0.22.0
pandocfilters==1.4.2
parso==0.1.1
pbr==3.0.1
pdfrw==0.4
pickleshare==0.7.4
Pillow==5.0.0
prompt-toolkit==1.0.15
pycodestyle==2.4.0
pycparser==2.17
Pygments==2.2.0
pylint==1.8.4
pyparsing==2.2.0
PyPDF2==1.26.0
Pyphen==0.9.4
pypng==0.0.18
PyQRCode==1.2.1
PyQt5==5.8.2
python-dateutil==2.6.0
python-engineio==3.0.0
python-hglib==2.6.1
python-socketio==2.1.1
pytz==2017.2
pywinpty==0.5.1
PyYAML==3.12
pyzmq==16.0.4
qtconsole==4.3.1
queuelib==1.5.0
requests==2.17.3
rope==0.10.7
rst2html5==1.9.4
scipy==1.0.1
Send2Trash==1.5.0
shellescape==3.4.1
simplegeneric==0.8.1
sip==4.19.2
six==1.10.0
SQLAlchemy==1.1.10
sqlalchemy-migrate==0.11.0
sqlparse==0.2.3
svgwrite==1.1.11
sympy==1.1.1
Tempita==0.5.2
terminado==0.8.1
testpath==0.3.1
tinycss2==0.6.1
tornado==4.5.3
traitlets==4.3.2
urllib3==1.21.1
wcwidth==0.1.7
WeasyPrint==0.42
webencodings==0.5.1
Werkzeug==0.12.2
widgetsnbextension==3.2.1
wrapt==1.10.11
WTForms==2.1
xlrd==1.1.0
yolk3k==0.9

Я не могу найти решение, может бытьбрандмауэр убивает сокеты, если их больше одного?любая идея?Эта проблема не останавливает сервер, но это раздражает.большое спасибо

...