Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible eventlet issue breaks simple_switch #180

Open
lantz opened this issue Apr 27, 2023 · 4 comments
Open

Possible eventlet issue breaks simple_switch #180

lantz opened this issue Apr 27, 2023 · 4 comments

Comments

@lantz
Copy link

lantz commented Apr 27, 2023

On Ubuntu 22.04, I'm seeing this error which may be related to #138 .

$ ryu run simple_switch
Traceback (most recent call last):
  File "/usr/local/bin/ryu", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/ryu/cmd/ryu_base.py", line 72, in main
    subcmd_mod = utils.import_module(subcmd_mod_name)
  File "/usr/local/lib/python3.10/dist-packages/ryu/utils.py", line 108, in import_module
    return importlib.import_module(modname)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/local/lib/python3.10/dist-packages/ryu/cmd/manager.py", line 33, in <module>
    from ryu.app import wsgi
  File "/usr/local/lib/python3.10/dist-packages/ryu/app/wsgi.py", line 109, in <module>
    class _AlreadyHandledResponse(Response):
  File "/usr/local/lib/python3.10/dist-packages/ryu/app/wsgi.py", line 111, in _AlreadyHandledResponse
    from eventlet.wsgi import ALREADY_HANDLED
ImportError: cannot import name 'ALREADY_HANDLED' from 'eventlet.wsgi' (/home/openflow/.local/lib/python3.10/site-packages/eventlet/wsgi.py)

$ pip3 list | egrep 'ryu|eventlet|dnspython'
dnspython                     2.2.1
eventlet                      0.33.1
ryu                           4.34

$ pip3 --version
pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)

@lantz
Copy link
Author

lantz commented Apr 27, 2023

Note to get to that point I had to downgrade dnspython from 2.3.0 to 2.2.1 to avoid another error:

File "/usr/local/lib/python3.10/dist-packages/dns/zone.py", line 86, in <module>
    class Zone(dns.transaction.TransactionManager):
  File "/usr/local/lib/python3.10/dist-packages/dns/zone.py", line 757, in Zone
    ) -> dns.rdtypes.ANY.SOA.SOA:
AttributeError: module 'dns.rdtypes' has no attribute 'ANY'

@991jo
Copy link

991jo commented May 29, 2023

Looks like the issue is a change of the eventlet API in eventlet 0.30.3: benoitc/gunicorn#2581

However downgrading to older versions of eventlet only leads to other errors.

@haseebkhan611
Copy link

haseebkhan611 commented Jan 21, 2024

I resolved this issue by creating a venv and downgrading eventlet to 0.30.2

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get install virtualenv python3.9 python3.9-distutils

#create the virtualenv 
virtualenv -p`which python3.9` ryu-python3.9-venv
source ryu-python3.9-venv/bin/activate
echo $VIRTUAL_ENV #check if we are indeed in the virtual environment
pip install ryu
pip uninstall eventlet
pip install eventlet==0.30.2
ryu-manager --help

Reference: #169 (comment)

@AnthonVal21
Copy link

Gracias amigo [haseebkhan611] , tenia ese problema y puede solucionarlo .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants