Hi,

I'm trying to run the app/cli.py application. I've found 2 versions of the
file: an older one supporting telnet and a newer one supporting ssh.

I've also created the required logger.py, management.py, plogger.py and
call_via_pipe.py files.

They both run, but when trying to connect the server it fails. It seems the
server is not running at all (netstat -lutpn doesn't show any listening
4989, nor 4990, ports)

Would anyone shed some light on this issue?

Note: I've got the latest Ryu code (from github/osrg) and the OS in Linux
Ubuntu12.04 32bit with python2.7.5

 

I tried to replace gevent.spawn() and gevent.server.StreamServer with
hub.spwan() and hub.StreamServer (from ryu.lib.hub).

Now, I see the server is running, but any telnet client attempting to
connect,  result with the following hub/greenlet exception:

 

CLI ('127.0.0.1', 41423) Setting termtype to ansi

hub: uncaught exception: Traceback (most recent call last):

  File
"/usr/local/lib/python2.7/dist-packages/ryu-2.0-py2.7.egg/ryu/lib/hub.py",
line 50, in _launch

    func(*args, **kwargs)

  File "/usr/local/lib/python2.7/dist-packages/telnetsrv/telnetsrvlib.py",
line 494, in streamserver_handle

    cls(request, address, server)

  File "/home/oliver/ryu/ryu/app/cli_telnet.py", line 85, in __init__

    TelnetHandler.__init__(self, request, client_address, server)

  File "/usr/local/lib/python2.7/dist-packages/telnetsrv/green.py", line 14,
in __init__

    TelnetHandlerBase.__init__(self, request, client_address, server)

  File "/usr/local/lib/python2.7/dist-packages/telnetsrv/telnetsrvlib.py",
line 481, in __init__

    SocketServer.BaseRequestHandler.__init__(self, request, client_address,
server)

  File "/usr/lib/python2.7/SocketServer.py", line 636, in __init__

    self.setup()

  File "/usr/local/lib/python2.7/dist-packages/telnetsrv/green.py", line 20,
in setup

    self.greenlet_ic = gevent.spawn(self.inputcooker)

  File "/usr/lib/python2.7/dist-packages/gevent/greenlet.py", line 243, in
spawn

    g = cls(*args, **kwargs)

  File "/usr/lib/python2.7/dist-packages/gevent/greenlet.py", line 133, in
__init__

    greenlet.__init__(self, parent=get_hub())

  File "/usr/lib/python2.7/dist-packages/gevent/hub.py", line 135, in
get_hub

    raise NotImplementedError('gevent is only usable from a single thread')

NotImplementedError: gevent is only usable from a single thread

 

So, I guess I'm not using hub in the correct way. Can anyone point me to the
correct path of using hub module?

 

 

Thank you and regards,

David Ganor

 

|||||||||||||||||||||||||||||||||||||||||

Oliver Solutions Ltd.

www.oliver-solutions.com <http://www.oliver-solutions.com/> 

 

cell: +972-54-3090299

|||||||||||||||||||||||||||||||||||||||||

 

 

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to