Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad argument in call to lists:keyfind(port_no, 1, {queues,[]}) in linc_capable_sup #349

Open
topspeedbell opened this issue Jan 22, 2015 · 3 comments

Comments

@topspeedbell
Copy link

Hi, Dear all,

I have two issues about linc-swtich.

  1. I installed linc-switch in the Raspberry pi devices in Dec. 2013, and Ryu controller in a PC. The linc-switch can connect to the controller, and the Ryu controlled the linc-switch well.
    I connected a host to a server through the linc-switch, and added the flow table to the linc-swith by the Ryu controller. The commands are as follows:
    curl -X POST -d '{
    "dpid": 202481586003128,
    "cookie": 1,
    "cookie_mask": 1,
    "table_id": 0,
    "priority": 11111,
    "flags": 1,
    "match":{
    "in_port":3
    },
    "actions":[
    {
    "type":"OUTPUT",
    "port": 2
    }
    ]
    }' http://localhost:8080/stats/flowentry/add

curl -X POST -d '{
"dpid": 202481586003128,
"cookie": 1,
"cookie_mask": 1,
"table_id": 0,
"priority": 111111,
"flags": 1,
"match":{
"in_port":2
},
"actions":[
{
"type":"OUTPUT",
"port": 3
}
]
}' http://localhost:8080/stats/flowentry/add

I can ping the host and server each other. But when I accessed the server, it always automatically downloaded the html file. If I connected directly the host to the server, it worked well.

  1. I’m not sure if the reason is that the linc-switch version is old, so I want to update it. While I updated(reinstalled) the latest linc-switch in the Raspberry pi in Jan. 2015, there is an error like this:
    pi@raspberrypi ~/LINC-Switch $ sudo rel/linc/bin/linc console
    Exec: /home/pi/LINC-Switch/rel/linc/erts-5.9.3.1/bin/erlexec -boot /home/pi/LINC-Switch/rel/linc/releases/1.0/linc -mode embedded -config /home/pi/LINC-Switch/rel/linc/releases/1.0/sys.config -args_file /home/pi/LINC-Switch/rel/linc/releases/1.0/vm.args -- console
    Root: /home/pi/LINC-Switch/rel/linc
    Erlang R15B03 (erts-5.9.3.1) [source] [async-threads:0] [kernel-poll:false]

18:18:55.861 [info] Application lager started on node linc@raspberrypi
18:18:55.870 [info] Application ssh started on node linc@raspberrypi
18:18:55.926 [info] Application enetconf started on node linc@raspberrypi
18:18:55.948 [error] CRASH REPORT Process <0.129.0> with 0 neighbours exited with reason: bad argument in call to lists:keyfind(port_no, 1, {queues,[]}) in linc_capable_sup:'-create_mapping_between_capable_and_logical_ports/2-lc$^0/1-0-'/2 line 164 in application_master:init/4 line 138
18:18:56.073 [info] Application linc exited with reason: bad argument in call to lists:keyfind(port_no, 1, {queues,[]}) in linc_capable_sup:'-create_mapping_between_capable_and_logical_ports/2-lc$^0/1-0-'/2 line 164
Eshell V5.9.3.1 (abort with ^G)
(linc@raspberrypi)1> {"Kernel pid terminated",application_controller,"{application_start_failure,linc,{bad_return,{{linc,start,[normal,[]]},{'EXIT',{badarg,[{lists,keyfind,[port_no,1,{queues,[]}],[]},{linc_capable_sup,'-create_mapping_between_capable_and_logical_ports/2-lc$^0/1-0-',2,[{file,[115,114,99,47,108,105,110,99,95,99,97,112,97,98,108,101,95,115,117,112,46,101,114,108]},{line,164}]},{linc_capable_sup,'-create_mapping_between_capable_and_logical_ports/0-lc$^0/1-0-',1,[{file,[115,114,99,47,108,105,110,99,95,99,97,112,97,98,108,101,95,115,117,112,46,101,114,108]},{line,159}]},{linc_capable_sup,start_link,0,[{file,[115,114,99,47,108,105,110,99,95,99,97,112,97,98,108,101,95,115,117,112,46,101,114,108]},{line,61}]},{application_master,start_it_old,4,[{file,[97,112,112,108,105,99,97,116,105,111,110,95,109,97,115,116,101,114,46,101,114,108]},{line,274}]}]}}}}}"}

Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller) ({application_start_failure,linc,{bad_return,{{linc,start,[normal,[]]},{'EXIT',{badarg,[{lists,keyfind,[port_no,1,{queues,[]}],[]},{linc_capable_sup,'-
pi@raspberrypi ~/LINC-Switch $

Could you give some support?
thanks a lot!

@mentels
Copy link
Contributor

mentels commented Jan 22, 2015

Hi,

The problem is that the format for ports of the Logical Switch has changed
and we have not merged backward compatibility yet. See the description here
1 and just put the queues config of the ports in the list.

If that does not help please let me know.

On Thu, Jan 22, 2015 at 10:14 AM, topspeedbell [email protected]
wrote:

Hi, Dear all,

I have two issues about linc-swtich.

  1. I installed linc-switch in the Raspberry pi devices in Dec. 2013, and
    Ryu controller in a PC. The linc-switch can connect to the controller, and
    the Ryu controlled the linc-switch well.
    I connected a host to a server through the linc-switch, and added the flow
    table to the linc-swith by the Ryu controller. The commands are as follows:
    curl -X POST -d '{
    "dpid": 202481586003128,
    "cookie": 1,
    "cookie_mask": 1,
    "table_id": 0,
    "priority": 11111,
    "flags": 1,
    "match":{
    "in_port":3
    },
    "actions":[
    {
    "type":"OUTPUT",
    "port": 2
    }
    ]
    }' http://localhost:8080/stats/flowentry/add

curl -X POST -d '{
"dpid": 202481586003128,
"cookie": 1,
"cookie_mask": 1,
"table_id": 0,
"priority": 111111,
"flags": 1,
"match":{
"in_port":2
},
"actions":[
{
"type":"OUTPUT",
"port": 3
}
]
}' http://localhost:8080/stats/flowentry/add

I can ping the host and server each other. But when I accessed the server,
it always automatically downloaded the html file. If I connected directly
the host to the server, it worked well.

  1. I’m not sure if the reason is that the linc-switch version is old,
    so I want to update it. While I updated(reinstalled) the latest linc-switch
    in the Raspberry pi in Jan. 2015, there is an error like this:
    pi@raspberrypi ~/LINC-Switch $ sudo rel/linc/bin/linc console Exec:
    /home/pi/LINC-Switch/rel/linc/erts-5.9.3.1/bin/erlexec -boot
    /home/pi/LINC-Switch/rel/linc/releases/1.0/linc -mode embedded -config
    /home/pi/LINC-Switch/rel/linc/releases/1.0/sys.config -args_file
    /home/pi/LINC-Switch/rel/linc/releases/1.0/vm.args -- console Root:
    /home/pi/LINC-Switch/rel/linc Erlang R15B03 (erts-5.9.3.1) [source]
    [async-threads:0] [kernel-poll:false]

18:18:55.861 [info] Application lager started on node linc@raspberrypi
18:18:55.870 [info] Application ssh started on node linc@raspberrypi
18:18:55.926 [info] Application enetconf started on node linc@raspberrypi
18:18:55.948 [error] CRASH REPORT Process with 0 neighbours exited with
reason: bad argument in call to lists:keyfind(port_no, 1, {queues,[]}) in
linc_capable_sup:'-create_mapping_between_capable_and_logical_ports/2-lc$^0/1-0-'/2
line 164 in application_master:init/4 line 138
18:18:56.073 [info] Application linc exited with reason: bad argument in
call to lists:keyfind(port_no, 1, {queues,[]}) in
linc_capable_sup:'-create_mapping_between_capable_and_logical_ports/2-lc$^0/1-0-'/2
line 164
Eshell V5.9.3.1 (abort with ^G)
(linc@raspberrypi)1> {"Kernel pid
terminated",application_controller,"{application_start_failure,linc,{bad_return,{{linc,start,[normal,[]]},{'EXIT',{badarg,[{lists,keyfind,[port_no,1,{queues,[]}],[]},{linc_capable_sup,'-create_mapping_between_capable_and_logical_ports/2-lc$^0/1-0-',2,[{file,[115,114,99,47,108,105,110,99,95,99,97,112,97,98,108,101,95,115,117,112,46,101,114,108]},{line,164}]},{linc_capable_sup,'-create_mapping_between_capable_and_logical_ports/0-lc$^0/1-0-',1,[{file,[115,114,99,47,108,105,110,99,95,99,97,112,97,98,108,101,95,115,117,112,46,101,114,108]},{line,159}]},{linc_capable_sup,start_link,0,[{file,[115,114,99,47,108,105,110,99,95,99,97,112,97,98,108,101,95,115,117,112,46,101,114,108]},{line,61}]},{application_master,start_it_old,4,[{file,[97,112,112,108,105,99,97,116,105,111,110,95,109,97,115,116,101,114,46,101,114,108]},{line,274}]}]}}}}}"}

Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller)
({application_start_failure,linc,{bad_return,{{linc,start,[normal,[]]},{'EXIT',{badarg,[{lists,keyfind,[port_no,1,{queues,[]}],[]},{linc_capable_sup,'-
pi@raspberrypi ~/LINC-Switch $

Could you give some support?
thanks a lot!


Reply to this email directly or view it on GitHub
#349.

Szymon Mentel
Erlang Solutions Ltd.

@topspeedbell
Copy link
Author

another question. If I add the flow table with this command, the host and server can ping each other.
curl -X POST -d '{
"dpid": 202481586003128,
"cookie": 1,
"cookie_mask": 1,
"table_id": 0,
"priority": 11111,
"flags": 1,
"match":{
"in_port":3
},
"actions":[
{
"type":"OUTPUT",
"port": 2
}
]
}' http://localhost:8080/stats/flowentry/add

curl -X POST -d '{
"dpid": 202481586003128,
"cookie": 1,
"cookie_mask": 1,
"table_id": 0,
"priority": 111111,
"flags": 1,
"match":{
"in_port":2
},
"actions":[
{
"type":"OUTPUT",
"port": 3
}
]
}' http://localhost:8080/stats/flowentry/add

But, if I change the command to :
curl -X POST -d '{
....
"match":{
"in_port":3, "ipv4_dst":"192.168.1.122 ", "eth_type":2048 <note: add the host IP>
},
...
}' http://localhost:8080/stats/flowentry/add

curl -X POST -d '{
...
"match":{
"in_port":2, "ipv4_dst":"192.168.1.110 ", "eth_type":2048 <note: add the Server IP>
},
...
}' http://localhost:8080/stats/flowentry/add

the flow table can be added to the LINC-Switch, but the host and the server can not be pinged each other.

why?

@topspeedbell
Copy link
Author

tcp-shakehands

when I use the LINC switch and add flow tables as the above described, I to catch the packets in the wireshark, and find that the third -shake hands of tcp is not correct. which segment len should be "0", but "6", and then tcp out of order.

Your help is appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants