faucetsdn / ryu

Ryu component-based software defined networking framework
https://ryu-sdn.org
Apache License 2.0
1.5k stars 1.16k forks source link

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

Open paaguti opened 2 years ago

paaguti commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

Thanks, I went for virtualenv directly... ;-) the hard way :-) /PA

On Fri, 10 Jun 2022 at 04:12, Coding_Panda @.***> wrote:

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.

— Reply to this email directly, view it on GitHub https://github.com/faucetsdn/ryu/issues/169#issuecomment-1151839933, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZKU4FGIRUATBMNCZQBKTDVOKQANANCNFSM5X4Z23UQ . You are receiving this because you authored the thread.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

PatrickTague commented 1 year ago

@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 commented 1 year ago

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

paaguti commented 1 year ago

Thx, I'l try, but I haven't had any crashes up until now... /PA

On Mon, 27 Feb 2023 at 01:18, PatrickTague @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/faucetsdn/ryu/issues/169#issuecomment-1445514575, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZKU4FZFAFNBEGJTMJACV3WZPXFNANCNFSM5X4Z23UQ . 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

jachermocilla commented 1 year ago

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 commented 1 year ago

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 https://github.com/faucetsdn/ryu/issues/169#issuecomment-1537440144, 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

arifhakimi commented 1 year ago

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 commented 1 year ago

Nope, I started dissecting problems and updating dependencies... a hell of a work. Currently looking at 3.11 ...

/PA

On Mon, 10 Jul 2023 at 23:26, DEFCON @.***> wrote:

My fork now works with Python3.10+ … <#m-9131552920404379117> 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) https://github.com/faucetsdn/ryu/issues/169#issuecomment-1537440144>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZKU4BJTTCPAAHP2FR53UDXE6OBRANCNFSM5X4Z23UQ 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 https://github.com/jachermocilla steps or any other ways?

— Reply to this email directly, view it on GitHub https://github.com/faucetsdn/ryu/issues/169#issuecomment-1629753895, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZKU4GHSOVMOGENRBILNCDXPRXQFANCNFSM5X4Z23UQ . 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

pdumais commented 1 year ago

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

paaguti commented 1 year ago

Don’t know if there ever will be. That’s why I forked…Enviado desde mi iPhoneEl 15 ago 2023, a las 21:05, Patrick Dumais @.***> escribió: So I guess the PR won't be merged until a new maintainer is found?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

arifhakimi commented 11 months ago

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 commented 11 months ago

Hey, can’t reproduce on my Intel platform Enviado desde mi iPhoneEl 9 oct 2023, a las 15:43, DEFCON @.***> escribió:

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? @.*:~/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'

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Musya-Lungi commented 2 weeks ago

it helped thanks