Permission denied; greenlet.error: can not switch to a different thread

110 views Asked by At

i have a flask web-application, which works fine on Windows but not on Linux. When i am trying to run this, i got an issue :

> Traceback (most recent call last):
> File "/home/rostyk/Downloads/ms4quality-ms4quality_licensing/Host/ms4bikeGIIHost/app.py", line 751, in <module>
> socketio.run(app, host='0.0.0.0', port=80)
> File "/home/rostyk/.local/lib/python3.10/site-packages/flask_socketio/__init__.py", line 684, in run
> run_server()
> File "/home/rostyk/.local/lib/python3.10/site-packages/flask_socketio/__init__.py", line 661, in run_server
> eventlet_socket = eventlet.listen(addresses[0][4],
> File "/home/rostyk/.local/lib/python3.10/site-packages/eventlet/convenience.py", line 78, in listen
> sock.bind(addr)
> PermissionError: [Errno 13] Permission denied
> Traceback (most recent call last):
> File "/home/rostyk/.local/lib/python3.10/site-packages/eventlet/hubs/hub.py", line 476, in fire_timers
> timer()
> File "/home/rostyk/.local/lib/python3.10/site-packages/eventlet/hubs/timer.py", line 59, in __call__
> cb(*args, **kw)
> File "/home/rostyk/.local/lib/python3.10/site-packages/eventlet/semaphore.py", line 147, in _do_acquire
> waiter.switch()
> greenlet.error: cannot switch to a different thread

I am sure that the problem is in this block of code:

import eventlet
if not os.name == 'nt':
    eventlet.monkey_patch()

I read that the problem indicates that the process doesn't have the necessary permissions to bind to the specified address and port.And i tried to use reverse proxy Nginx, but it didnt work.

0

There are 0 answers