Hi,

On 2015年06月05日 14:37, 曾惠萍 wrote:
> Hello, Iwase,
> 
> when i interrupt my program by press ctrl+c, and the error msg is as follow:
> -------------------------Error msg-----------------------------------------
> Traceback (most recent call last):
>   File "./bin/ryu-manager", line 19, in <module>
>     main()
>   File "/usr/local/lib/python2.7/dist-packages/ryu/cmd/manager.py", line 101, 
> in main
>     app_mgr.close()
>   File "/usr/local/lib/python2.7/dist-packages/ryu/base/app_manager.py", line 
> 514, in close
>     close_all(self.applications)
>   File "/usr/local/lib/python2.7/dist-packages/ryu/base/app_manager.py", line 
> 511, in close_all
>     self._close(app)
>   File "/usr/local/lib/python2.7/dist-packages/ryu/base/app_manager.py", line 
> 495, in _close
>     close_method()
>   File "/usr/local/lib/python2.7/dist-packages/ryu/topology/switches.py", 
> line 470, in close
>     hub.joinall(self.threads)
>   File "/usr/local/lib/python2.7/dist-packages/ryu/lib/hub.py", line 89, in 
> joinall
>     t.wait()
>   File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 168, 
> in wait
>     return self._exit_event.wait()
>   File "/usr/lib/python2.7/dist-packages/eventlet/event.py", line 116, in wait
>     return hubs.get_hub().switch()
>   File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 187, in 
> switch
>     return self.greenlet.switch()
>   File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 236, in 
> run
>     self.wait(sleep_time)
>   File "/usr/lib/python2.7/dist-packages/eventlet/hubs/poll.py", line 84, in 
> wait
>     presult = self.do_poll(seconds)
>   File "/usr/lib/python2.7/dist-packages/eventlet/hubs/epolls.py", line 61, 
> in do_poll
>     return self.poll.poll(seconds)
> -------------------------Error msg-----------------------------------------
>   what does the function t.wait() wait for? 

Sorry, I don't know a lot.
From the source code, it seems to wait for joining lldp_loop and link_loop 
threads,
the one sends LLDP packets periodically, the other one observes links status.

Thanks,
Iwase

> 
> Thanks,
> Ping
> 
> 2015-06-03 14:34 GMT+08:00 Yusuke Iwase <iwase.yusu...@gmail.com 
> <mailto:iwase.yusu...@gmail.com>>:
> 
>     Hi,
> 
>     On 2015年05月31日 23:57, 曾惠萍 wrote:
>     > Hi,
>     >
>     > sometime my program is normally work, but sometime it hang up.
>     > when i get switch object, sometime it 's hangup and later it show error 
> message.
>     >
>     > *command:*
>     > PYTHON=. ./bin/ryu-manager --observe-links ryu/app/address.py
>     >
>     > *my program as follow:*
>     > @handler.set_ev_cls(event.EventLinkAdd)
>     >     def link_add_handler(self, ev):
>     > link = ev.link
>     > self.logger.info <http://self.logger.info> 
> <http://self.logger.info>("link add: %s",link.to_dict())
>     > linkarray = link.to_dict()
>     >
>     > src_sw = api.get_switch(self, link.src.dpid)[0]
>     > dst_sw = api.get_switch(self, link.dst.dpid)[0]
>     > src_dp = src_sw.dp
>     > dst_dp = dst_sw.dp
>     > src_parser = src_sw.dp.ofproto_parser
>     > dst_parser = dst_sw.dp.ofproto_parser
>     >
>     > *error message:*
>     > hub: uncaught exception: Traceback (most recent call last):
>     >   File "/usr/local/lib/python2.7/dist-packages/ryu/lib/hub.py", line 
> 52, in _launch
>     >   File 
> "/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py", line 
> 70, in __call__
>     >     self.server_loop()
>     >   File 
> "/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py", line 
> 96, in server_loop
>     >     server.serve_forever()
>     >   File "/usr/local/lib/python2.7/dist-packages/ryu/lib/hub.py", line 
> 120, in serve_forever
>     >   File "/usr/lib/python2.7/dist-packages/eventlet/greenio.py", line 
> 179, in accept
>     >   File "/usr/lib/python2.7/dist-packages/eventlet/greenio.py", line 56, 
> in socket_accept
>     >   File "/usr/lib/python2.7/socket.py", line 202, in accept
>     > error: [Errno 24] Too many open files
> 
>     This message shows that the number of open files per process reached the 
> limit, I think.
>     Please check the limit of your system (eg. with "ulimit -n" command).
> 
>     Thanks,
>     Iwase
> 
>     >
>     >
>     >
>     > i think get_switch function is the point.
>     > but i don't know how to correct it.
>     >
>     > Thanks,
>     > Ping
>     >
>     >
>     >
>     > 
> ------------------------------------------------------------------------------
>     >
>     >
>     >
>     > _______________________________________________
>     > Ryu-devel mailing list
>     > Ryu-devel@lists.sourceforge.net <mailto:Ryu-devel@lists.sourceforge.net>
>     > https://lists.sourceforge.net/lists/listinfo/ryu-devel
>     >
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> 
> 
> 
> _______________________________________________
> Ryu-devel mailing list
> Ryu-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
> 

------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to