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

Ryu-manager crash on Ubuntu 22.04 (Python3.10.4) #169

Open
paaguti opened this issue Jun 5, 2022 · 15 comments
Open

Ryu-manager crash on Ubuntu 22.04 (Python3.10.4) #169

paaguti opened this issue Jun 5, 2022 · 15 comments

Comments

@paaguti
Copy link

paaguti commented Jun 5, 2022

Installed ryu on Ubuntu22.04. Trying to run the simple-switch-13 application:

student@uc3m:~$ ryu-manager ryu.app.simple_switch_13
Traceback (most recent call last):
  File "/home/student/.local/bin/ryu-manager", line 5, in <module>
    from ryu.cmd.manager import main
  File "/home/student/.local/lib/python3.10/site-packages/ryu/cmd/manager.py", line 33, in <module>
    from ryu.app import wsgi
  File "/home/student/.local/lib/python3.10/site-packages/ryu/app/wsgi.py", line 109, in <module>
    class _AlreadyHandledResponse(Response):
  File "/home/student/.local/lib/python3.10/site-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/student/.local/lib/python3.10/site-packages/eventlet/wsgi.py)
student@uc3m:~$ python3 --version
Python 3.10.4```
@paaguti
Copy link
Author

paaguti commented Jun 6, 2022

Another crash:

student@mininet:~/Install/ryu$ ryu-manager ryu.app.simple_switch_13
Traceback (most recent call last):
  File "/home/student/.local/bin/ryu-manager", line 5, in <module>
    from ryu.cmd.manager import main
  File "/home/student/.local/lib/python3.10/site-packages/ryu/cmd/manager.py", line 22, in <module>
    from ryu.lib import hub
  File "/home/student/.local/lib/python3.10/site-packages/ryu/lib/hub.py", line 30, in <module>
    import eventlet
  File "/home/student/.local/lib/python3.10/site-packages/eventlet/__init__.py", line 17, in <module>
    from eventlet import convenience
  File "/home/student/.local/lib/python3.10/site-packages/eventlet/convenience.py", line 7, in <module>
    from eventlet.green import socket
  File "/home/student/.local/lib/python3.10/site-packages/eventlet/green/socket.py", line 4, in <module>
    __import__('eventlet.green._socket_nodns')
  File "/home/student/.local/lib/python3.10/site-packages/eventlet/green/_socket_nodns.py", line 11, in <module>
    from eventlet import greenio
  File "/home/student/.local/lib/python3.10/site-packages/eventlet/greenio/__init__.py", line 3, in <module>
    from eventlet.greenio.base import *  # noqa
  File "/home/student/.local/lib/python3.10/site-packages/eventlet/greenio/base.py", line 32, in <module>
    socket_timeout = eventlet.timeout.wrap_is_timeout(socket.timeout)
  File "/home/student/.local/lib/python3.10/site-packages/eventlet/timeout.py", line 166, in wrap_is_timeout
    base.is_timeout = property(lambda _: True)
TypeError: cannot set 'is_timeout' attribute of immutable type 'TimeoutError'

after fixing with the requirements generated on a working Ryu on Ubuntu 20.04

@zhiwayzhang
Copy link

It's because this project not support for python 3.10, use python 3.9 or previous version may be useful, in my ubuntu I choose install anaconda to manager multi python version.

@paaguti
Copy link
Author

paaguti commented Jun 17, 2022 via email

@PatrickTague
Copy link

PatrickTague commented Feb 26, 2023

@paaguti i saw you created a PR to a fork with this working in 22.04. i followed your instructions but it's still not working (different error related to module 'collections'). any suggestions to make this continue to work?

@PatrickTague
Copy link

ah, possibly just need to add dnspython==2.2.1 to pip-requires

@paaguti
Copy link
Author

paaguti commented Feb 27, 2023 via email

@jachermocilla
Copy link

jachermocilla commented May 7, 2023

Here's how I got it working:

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

@paaguti
Copy link
Author

paaguti commented May 8, 2023 via email

@arifhakimi
Copy link

My fork now works with Python3.10+

On Sun, 7 May 2023 at 15:16, Joseph Anthony C. Hermocilla < @.> wrote: Here's how I got it working: sudo add-apt-repository ppa:deadsnakes/ppa sudo apt-get install virtualenv python3.9 #create the virtualenv virtualenv -pwhich 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 — Reply to this email directly, view it on GitHub <#169 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZKU4BJTTCPAAHP2FR53UDXE6OBRANCNFSM5X4Z23UQ . You are receiving this because you were mentioned.Message ID: @.>
-- Fragen sind nicht da, um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler Headaches with a Juju log: unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run a leader-deposed hook here, but we can't yet

how did you got it working? are you following the @jachermocilla steps or any other ways?

@paaguti
Copy link
Author

paaguti commented Jul 11, 2023 via email

@pdumais
Copy link

pdumais commented Aug 15, 2023

So I guess the PR won't be merged until a new maintainer is found?

@paaguti
Copy link
Author

paaguti commented Aug 16, 2023 via email

@arifhakimi
Copy link

My fork now works with Python3.10+

On Sun, 7 May 2023 at 15:16, Joseph Anthony C. Hermocilla < @.> wrote: Here's how I got it working: sudo add-apt-repository ppa:deadsnakes/ppa sudo apt-get install virtualenv python3.9 #create the virtualenv virtualenv -pwhich 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 — Reply to this email directly, view it on GitHub <#169 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZKU4BJTTCPAAHP2FR53UDXE6OBRANCNFSM5X4Z23UQ . You are receiving this because you were mentioned.Message ID: @.>
-- Fragen sind nicht da, um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler Headaches with a Juju log: unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run a leader-deposed hook here, but we can't yet

hey Paaguti! I just tried out the latest Ryu, but seems another error appears. I wonder if you familiar with this error when testing ryu?

defcon@defcon-Parallels-ARM-Virtual-Machine:~/ryu$ ryu-manager ryu.app.simple_switch
Traceback (most recent call last):
File "/usr/local/bin/ryu-manager", line 33, in
sys.exit(load_entry_point('ryu==4.34', 'console_scripts', 'ryu-manager')())
File "/usr/local/bin/ryu-manager", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.10/importlib/metadata/init.py", line 171, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/defcon/.local/lib/python3.10/site-packages/ryu/cmd/manager.py", line 22, in
from ryu.lib import hub
File "/home/defcon/.local/lib/python3.10/site-packages/ryu/lib/hub.py", line 30, in
import eventlet
File "/home/defcon/.local/lib/python3.10/site-packages/eventlet/init.py", line 17, in
from eventlet import convenience
File "/home/defcon/.local/lib/python3.10/site-packages/eventlet/convenience.py", line 7, in
from eventlet.green import socket
File "/home/defcon/.local/lib/python3.10/site-packages/eventlet/green/socket.py", line 21, in
from eventlet.support import greendns
File "/home/defcon/.local/lib/python3.10/site-packages/eventlet/support/greendns.py", line 79, in
setattr(dns, pkg, import_patched('dns.' + pkg))
File "/home/defcon/.local/lib/python3.10/site-packages/eventlet/support/greendns.py", line 61, in import_patched
return patcher.import_patched(module_name, **modules)
File "/home/defcon/.local/lib/python3.10/site-packages/eventlet/patcher.py", line 132, in import_patched
return inject(
File "/home/defcon/.local/lib/python3.10/site-packages/eventlet/patcher.py", line 109, in inject
module = import(module_name, {}, {}, module_name.split('.')[:-1])
File "/usr/local/lib/python3.10/dist-packages/dns/namedict.py", line 35, in
class NameDict(collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'

@paaguti
Copy link
Author

paaguti commented Oct 9, 2023 via email

@Musya-Lungi
Copy link

it helped thanks

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

7 participants