Hi Tarun, I guess you need to find out why your switch do reconnect to Ryu in your situation, first. Please confirm your switches' settings and logs. (e.g., Do your switch check the connection to Ryu with OFPT_ECHO message?)
Thanks, Iwase On 2017年04月20日 13:10, Fujimoto Satoshi wrote: > Hi, Tarun > > Sorry for the delay in my response. > We are finding what happens in your situation. > It will take a little more time. > > Thanks, > Fujimoto > > On 2017年04月20日 05:01, Tarun Kumar Sarkar wrote: >> Hello Fujimoto, >> >> Did you got any idea about what is going wrong? I tried to run 100 >> switch in my network and that time the controller not able to survive >> 3 minutes. My ulimit -n set to 1024. >> >> Regards, >> Tarun >> >> Quoting Tarun Kumar Sarkar <tksar...@campus.uni-paderborn.de>: >> >>> Hi Fujimoto, >>> >>> You are correct almost. There is a no duplicate datapath, but I >>> think a second connection request came from the same switch after >>> some time. >>> Initially all my 25 switch got connected to my controller, after >>> running for some time controller got another connection request form >>> the switch with datapath_id=5253150801927 (line no 322 to 330 in the >>> log file). First connection request of the same switch is in the log >>> at line no 88-96. >>> I am attaching the log of first 500 lines removing some unnecessary >>> message for your reference. I hope it will help you understand the >>> problem better. >>> >>> Thank you! >>> >>> Regards, >>> Tarun >>> >>> >>> Quoting Fujimoto Satoshi <satoshi.fujimo...@gmail.com>: >>> >>>> Hi, Tarun >>>> >>>> I'm not sure, but it may be caused by the duplication of Datapath ID. >>>> Could you confirm the Datapath IDs of your switches are not duplicated? >>>> >>>> Thanks, >>>> Fujimoto >>>> >>>> On 2017年04月13日 07:59, Tarun Kumar Sarkar wrote: >>>>> Dear Team, >>>>> >>>>> Could anyone please suggest me how to solve the problem? >>>>> >>>>> BACKGROUND:: >>>>> >>>>> I am running a custom controller with wsgi option for accepting REST >>>>> call for adding and deleting switch forward entry. I am running around >>>>> 25 switch in my network and my application communicate to the >>>>> controller very frequently to modify the forwarding entries. After >>>>> running it for an hour or so I am geeting the belwo issue. >>>>> >>>>> ISSUE:: >>>>> I am seeing many socket are in state of CLOSE_WAIT. I observed socket >>>>> are starting to go in that state after getting a message like >>>>> "Multiple connections from 000004c718300007". >>>>> I tried the fix provided in the link >>>>> https://sourceforge.net/p/ryu/mailman/message/34320802/. >>>>> >>>>> @_deactivate >>>>> def _recv_loop(self): >>>>> buf = bytearray() >>>>> count = 0 >>>>> min_read_len = remaining_read_len = >>>>> ofproto_common.OFP_HEADER_SIZE >>>>> >>>>> while self.state != DEAD_DISPATCHER: >>>>> try: >>>>> read_len = min_read_len >>>>> if (remaining_read_len > min_read_len): >>>>> read_len = remaining_read_len >>>>> ret = self.socket.recv(read_len) >>>>> if len(ret) == 0: >>>>> self.is_active = False >>>>> self.socket.close() >>>>> break >>>>> >>>>> But it does not work for me. >>>>> >>>>> LOG:: >>>>> Multiple connections from 000004c718300007 >>>>> EVENT ofp_event->switches EventOFPStateChange >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> Datapath in process of terminating; send() to ('127.0.0.1', 59464) >>>>> discarded. >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> Datapath in process of terminating; send() to ('127.0.0.1', 59464) >>>>> discarded. >>>>> Datapath in process of terminating; send() to ('127.0.0.1', 59464) >>>>> discarded. >>>>> connected socket:<eventlet.greenio.base.GreenSocket object at >>>>> 0x7fb92bf3b510> address:('127.0.0.1', 59566) >>>>> hello ev <ryu.controller.ofp_event.EventOFPHello object at 0x7fb92bffa790> >>>>> move onto config mode >>>>> EVENT ofp_event->FCPFControllerApplication EventOFPSwitchFeatures >>>>> switch features ev >>>>> version=0x4,msg_type=0x6,msg_len=0x20,xid=0x45883c60,OFPSwitchFeatures(auxiliary_id=0,capabilities=71,datapath_id=59307123015704,n_buffers=256,n_tables=254) >>>>> move onto main mode >>>>> EVENT ofp_event->switches EventOFPStateChange >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> Datapath in process of terminating; send() to ('127.0.0.1', 59464) >>>>> discarded. >>>>> EVENT ofp_event->switches EventOFPPacketIn >>>>> >>>>> ..... >>>>> ...... >>>>> ... >>>>> connected socket:<eventlet.greenio.base.GreenSocket object at >>>>> 0x7f14b4826f50> address:('127.0.0.1', 57490) >>>>> hello ev <ryu.controller.ofp_event.EventOFPHello object at 0x7f14b47da1d0> >>>>> move onto config mode >>>>> hub: uncaught exception: Traceback (most recent call last): >>>>> File "/usr/local/lib/python2.7/dist-packages/ryu/lib/hub.py", line >>>>> 56, in _launch >>>>> File >>>>> "/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py", >>>>> line 100, in __call__ >>>>> File >>>>> "/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py", >>>>> line 126, in server_loop >>>>> File "/usr/local/lib/python2.7/dist-packages/ryu/lib/hub.py", line >>>>> 136, in serve_forever >>>>> File >>>>> "/usr/local/lib/python2.7/dist-packages/eventlet/greenio/base.py", >>>>> line 214, in accept >>>>> File >>>>> "/usr/local/lib/python2.7/dist-packages/eventlet/greenio/base.py", >>>>> line 56, in socket_accept >>>>> File "/usr/lib/python2.7/socket.py", line 202, in accept >>>>> error: [Errno 24] Too many open files >>>>> >>>>> >>>>> netstat shows something like >>>>> python 7849 tarun 558u IPv4 103608559 0t0 TCP >>>>> localhost:6633->localhost:60844 (CLOSE_WAIT) >>>>> >>>>> >>>>> Regards, >>>>> Tarun >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Check out the vibrant tech community on one of the world's most >>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>> _______________________________________________ >>>>> Ryu-devel mailing list >>>>> Ryu-devel@lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/ryu-devel >> >> >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Ryu-devel mailing list >> Ryu-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/ryu-devel > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Ryu-devel mailing list > Ryu-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ryu-devel > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel