Hi,
I am testing an application of Ryu and was showing the following
error. This application is the same as that found in
https://github.com/osrg/ryu/blob/master/ryu/tests/mininet/packet_lib/arp/test_arp.py
hub: uncaught exception: Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/ryu/lib/hub.py", line 52, in
_launch
func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/ryu/base/app_manager.py",
line 274, in _event_loop
handler(ev)
File "/home/stack/arp_server.py", line 200, in handler_datapath
data = self._garp()
File "/home/stack/arp_server.py", line 130, in _garp
p = self._build_arp(arp.ARP_REQUEST, self.RYU_IP)
File "/home/stack/arp_server.py", line 110, in _build_arp
p.serialize()
File "/usr/local/lib/python2.7/dist-packages/ryu/lib/packet/packet.py",
line 73, in serialize
data = p.serialize(self.data, prev)
File "/usr/local/lib/python2.7/dist-packages/ryu/lib/packet/arp.py", line
93, in serialize
addrconv.mac.text_to_bin(self.src_mac),
File "/usr/local/lib/python2.7/dist-packages/ryu/lib/addrconv.py", line
27, in text_to_bin
return self._addr(text, **self._addr_kwargs).packed
File "/usr/lib/python2.7/dist-packages/netaddr/eui/__init__.py", line
376, in __init__
self.value = addr
File "/usr/lib/python2.7/dist-packages/netaddr/eui/__init__.py", line
434, in _set_value
% (value, self._module.version))
* AddrFormatError: address '\xfe\xee\xee\xee\xee\xef' is not an EUIv48*
Doing research, I found the following patch and made the change in
ofproto_v1_0_parser.py
- return cls(*port)
+ return cls(*(port[0], addrconv.mac.bin_to_text(port[1])) +
port[2:])
After making the change appeared the following error:
hub: uncaught exception: Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/ryu/lib/hub.py", line 52, in
_launch
func(*args, **kwargs)
File
"/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py", line
306, in datapath_connection_factory
datapath.serve()
File
"/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py", line
226, in serve
self._recv_loop()
File
"/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py", line
102, in deactivate
method(self)
File
"/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py", line
157, in _recv_loop
version, msg_type, msg_len, xid, buf)
File
"/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_parser.py",
line 63, in msg
version, msg_type, msg_len, xid, utils.bytearray_to_hex(buf))
File "/usr/local/lib/python2.7/dist-packages/ryu/utils.py", line 103, in
bytearray_to_hex
return ' '.join(hex(ord(byte)) for byte in data)
File "/usr/local/lib/python2.7/dist-packages/ryu/utils.py", line 103, in
<genexpr>
return ' '.join(hex(ord(byte)) for byte in data)
* TypeError: ord() expected string of length 1, but int found*
I tested the application with versions 1.0, 1.2 and 1.3 of OpenFlow, but
still giving the same error.
Could anyone help me?
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel