OneSourceConsult / floodlight-queuepusher

Queue Pusher module for Floodlight
Apache License 2.0
2 stars 7 forks source link

Response :ovs not found #1

Open Jesan opened 9 years ago

Jesan commented 9 years ago

I am currently working on usage control project for home newtorking and i am trying to use your module for pushing queues and response i am getting is OVS_NOT _FOUND when i use that curl command .

The requirement is met for ovs ,floodlight, curl. Any suggestions .

joagoncaonesource commented 9 years ago

Basically the module searches for the executable ovs-vsctl. Check if it is in the path of the machine where Floodlight is running.

Otherwise, I can add that I've seen a (albeit rare) bug where the Unix system is not replying correctly to the command which. To remove the OvS verification from the code, go to line 236 of the file Utils.java and find the following piece of code:

public static boolean checkOVS() {
    Runtime rt = Runtime.getRuntime();
    Process proc = null;
    try {
        proc = rt.exec("which " + OVS);
        proc.waitFor();
        return proc.exitValue() == 0 ? true : false;
    } catch (InterruptedException e) {
        return false;
    } catch(IOException e) {
        return false;
    }
}

Just do return true; at the top of the function and comment out the remaining piece of code.

Jesan commented 9 years ago

Hi , I Just did that and got an error

[n.f.q.QueuePusherCreateResource:Dispatcher: Thread-22] JSON returned: {"id":"","queueuuid":"","qosuuid":"","err":"","exitcode":"CREATE_FAIL","out":"null"}

I am running mininet by ssh into another terminal and also i am running my controller in eclipse in IP:10.0.2.2. is there anything wrong i am doing ??

On Wed, Nov 5, 2014 at 9:00 PM, João Gonçalves notifications@github.com wrote:

Basically the module searches for the executable ovs-vsctl. Check if it is in the path of the machine where Floodlight is running.

Otherwise, I can add that I've seen a (albeit rare) bug where the Unix system is not replying correctly to the command which. To remove the OvS verification from the code, go to line 236 of the file Utils.java and find the following piece of code:

public static boolean checkOVS() { Runtime rt = Runtime.getRuntime(); Process proc = null; try { proc = rt.exec("which " + OVS); proc.waitFor(); return proc.exitValue() == 0 ? true : false; } catch (InterruptedException e) { return false; } catch(IOException e) { return false; } }

Just do return true; at the top of the function and comment out the remaining piece of code.

— Reply to this email directly or view it on GitHub https://github.com/OneSourceConsult/floodlight-queuepusher/issues/1#issuecomment-61784019 .

joagoncaonesource commented 9 years ago

Hi,

Given that no error output is given, I'm inclined to say that you do not have the binary ovs-vsctl in your path.

Can you check this? If it exists within the machine where Floodlight is being executed.

Best, João Gonçalves On 6 Nov 2014 00:22, "Jesan" notifications@github.com wrote:

Hi , I Just did that and got an error

[n.f.q.QueuePusherCreateResource:Dispatcher: Thread-22] JSON returned: {"id":"","queueuuid":"","qosuuid":"","err":"","exitcode":"CREATE_FAIL","out":"null"}

I am running mininet by ssh into another terminal and also i am running my controller in eclipse in IP:10.0.2.2. is there anything wrong i am doing ??

On Wed, Nov 5, 2014 at 9:00 PM, João Gonçalves notifications@github.com wrote:

Basically the module searches for the executable ovs-vsctl. Check if it is in the path of the machine where Floodlight is running.

Otherwise, I can add that I've seen a (albeit rare) bug where the Unix system is not replying correctly to the command which. To remove the OvS verification from the code, go to line 236 of the file Utils.java and find the following piece of code:

public static boolean checkOVS() { Runtime rt = Runtime.getRuntime(); Process proc = null; try { proc = rt.exec("which " + OVS); proc.waitFor(); return proc.exitValue() == 0 ? true : false; } catch (InterruptedException e) { return false; } catch(IOException e) { return false; } }

Just do return true; at the top of the function and comment out the remaining piece of code.

Reply to this email directly or view it on GitHub < https://github.com/OneSourceConsult/floodlight-queuepusher/issues/1#issuecomment-61784019>

.

Reply to this email directly or view it on GitHub https://github.com/OneSourceConsult/floodlight-queuepusher/issues/1#issuecomment-61907236 .

Jesan commented 9 years ago

hi , I am not sure how we can check that ?? . But I can run ovs commands in my mininet machine which is A VM and i create a topology calling remotely floodlight controller . sorry i am new to this . can u help me out???

Btw i can create queues using ovs commands from mininet and able to see in floodlight....

Regards, Jesan

On Thu, Nov 6, 2014 at 11:30 AM, João Gonçalves notifications@github.com wrote:

Hi,

Given that no error output is given, I'm inclined to say that you do not have the binary ovs-vsctl in your path.

Can you check this? If it exists within the machine where Floodlight is being executed.

Best, João Gonçalves On 6 Nov 2014 00:22, "Jesan" notifications@github.com wrote:

Hi , I Just did that and got an error

[n.f.q.QueuePusherCreateResource:Dispatcher: Thread-22] JSON returned:

{"id":"","queueuuid":"","qosuuid":"","err":"","exitcode":"CREATE_FAIL","out":"null"}

I am running mininet by ssh into another terminal and also i am running my controller in eclipse in IP:10.0.2.2. is there anything wrong i am doing ??

On Wed, Nov 5, 2014 at 9:00 PM, João Gonçalves notifications@github.com

wrote:

Basically the module searches for the executable ovs-vsctl. Check if it is in the path of the machine where Floodlight is running.

Otherwise, I can add that I've seen a (albeit rare) bug where the Unix system is not replying correctly to the command which. To remove the OvS verification from the code, go to line 236 of the file Utils.java and find the following piece of code:

public static boolean checkOVS() { Runtime rt = Runtime.getRuntime(); Process proc = null; try { proc = rt.exec("which " + OVS); proc.waitFor(); return proc.exitValue() == 0 ? true : false; } catch (InterruptedException e) { return false; } catch(IOException e) { return false; } }

Just do return true; at the top of the function and comment out the remaining piece of code.

Reply to this email directly or view it on GitHub <

https://github.com/OneSourceConsult/floodlight-queuepusher/issues/1#issuecomment-61784019>

.

Reply to this email directly or view it on GitHub < https://github.com/OneSourceConsult/floodlight-queuepusher/issues/1#issuecomment-61907236>

.

— Reply to this email directly or view it on GitHub https://github.com/OneSourceConsult/floodlight-queuepusher/issues/1#issuecomment-61908106 .

joagoncaonesource commented 9 years ago

Hi,

Sorry, but checking that is a bit Linux 101 :) Just see if the command ovs-vsctl can be run from the machine where Floodlight is running. If not, you need to install OvS on that machine as well.

Best of luck!

Jesan commented 9 years ago

Hi . Thanks for ur reply . Actually I am running floodlight in Linux and in vm I am using mininet .I am just wondering is that the oly way to connect both Ovs and floodlight to have Ovs running on Linux ??? I facing problems in installing Ovs

Regards , Jesanraj

On 6 Nov 2014, at 7:29 pm, João Gonçalves notifications@github.com wrote:

Hi,

Sorry, but checking that is a bit Linux 101 :) Just see if the command ovs-vsctl can be run from the machine where Floodlight is running. If not, you need to install OvS on that machine as well.

Best of luck!

— Reply to this email directly or view it on GitHub.

joagoncaonesource commented 9 years ago

Try to copy the binary from one machine to another to see if it works. Worth a shot, I guess...

Jesan commented 9 years ago

Hi , I have another queury. I am running ovs version 1.9.0 running and floodlight is running on the same path . I uploaded the queue pusher into floodlight and when i run that curl command i am unable to get anything . its returning as

{"code":404,"description":"The server has not found anything matching the request URI","reasonPhrase":"Not Found","throwable":null,"uri":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5","error":true,"globalError":false,"redirection":false,"recoverableError":false,"informational":false,"serverError":false,"connectorError":false,"clientError":true,"success":false}

can u tell me y ???

Thanks, jesan

On Fri, Nov 7, 2014 at 1:02 AM, João Gonçalves notifications@github.com wrote:

Try to copy the binary from one machine to another to see if it works. Worth a shot, I guess...

— Reply to this email directly or view it on GitHub https://github.com/OneSourceConsult/floodlight-queuepusher/issues/1#issuecomment-61982592 .

dfpalma commented 9 years ago

Hi Jesan,

Please try to provide as much information as you can when posting an issue so that we can try to replicate it.

What curl command are you referring to?

Jesan commented 9 years ago

hi , this is the curl command i used to insert the queue on port s1-eth1 on switch 1.

curl -d '{"switchid": "00:00:00:00:00:00:00:01", "port":"s1-eth1", "rate":20}' http://127.0.0.1:8080/wm/queuepusher/qpc/json

Regards , jesan

joagoncaonesource commented 9 years ago

That is probably because Floodlight failed to start the QueuePusher module. Check your logs, please.

Jesan commented 9 years ago

hi

17:22:34.436 INFO [n.f.q.QueuePusherCreateResource:Dispatcher: Thread-12] JSON Received: {"switchid": "00:00:00:00:00:00:00:01", "port":"s1-eth1", "rate":20} 17:22:34.611 INFO [n.f.q.QueuePusherSwitchMapper:Dispatcher: Thread-12] JSON received from CURL: [] 17:22:34.622 INFO [n.f.q.Utils:Dispatcher: Thread-12] RUNNING: ovs-vsctl --db=tcp:null:9091 set port s1-eth1 qos=@leqos -- --id=@leqos create qos type=linux-htb other-config:max-rate=10000000000000000000000000 queues:1=@lequeue -- --id=@lequeue create queue other-config:max-rate=20 17:22:34.661 INFO [n.f.q.QueuePusherCreateResource:Dispatcher: Thread-12] JSON returned: {"id":"","queueuuid":"","qosuuid":"","err":"2014-11-12T01:22:34Z|00002|socket_util|ERR|\"null\" is not a valid IP address\n2014-11-12T01:22:34Z|00003|stream_tcp|ERR|tcp:null:9091: connect: Address family not supported by protocol\n2014-11-12T01:22:34Z|00004|reconnect|WARN|tcp:null:9091: connection attempt failed (Address family not supported by protocol)\novs-vsctl: tcp:null:9091: database connection failed (Address family not supported by protocol)\n","exitcode":"CREATE_FAIL","out":""}

This is the error i am getting when i load the module and run

regards , jesan

Jesan commented 9 years ago

Hi , IS der any problem regarding the address matching which caused the error . Reply asap.

Regards , Jesan

joagoncaonesource commented 9 years ago

Are you running that inside mininet?

Jesan commented 9 years ago

Yes the mininet and floodlight are running . I run the command in mininet itself .

Jesanraj

On 20 Nov 2014, at 11:01 pm, João Gonçalves notifications@github.com wrote:

Are you running that inside mininet?

— Reply to this email directly or view it on GitHub.

Jesan commented 9 years ago

hi I am not sure whats the error . It would be great if module returns the queue id from ovsdb so i can use it for my thesis.

regards, jesan

joagoncaonesource commented 9 years ago

According to what you left here, this is the error that OvS itself is returning an error to a null IP address. That happens because the Mapper is unable to find an IP address from your home network, for the switch ID you have.

I recommend you go to this file (https://github.com/OneSourceConsult/floodlight-queuepusher/blob/master/net/floodlightcontroller/queuepusher/QueuePusherSwitchMapper.java#L61), in the line pointed by the link and print the whole response to see what CURL is responding. See if there is any matching switches.

Jesan commented 9 years ago

hi

this is the response i got from curl

JSON received from CURL: [{"harole":"MASTER","ports":[{"portNumber":1,"hardwareAddress":"1e:40:31:30:58:27","name":"s1-eth1","config":0,"state":0,"currentFeatures":192,"advertisedFeatures":0,"supportedFeatures":0,"peerFeatures":0},{"portNumber":2,"hardwareAddress":"da:47:61:7f:98:09","name":"s1-eth2","config":0,"state":0,"currentFeatures":192,"advertisedFeatures":0,"supportedFeatures":0,"peerFeatures":0},{"portNumber":65534,"hardwareAddress":"4e:93:ac:85:ea:20","name":"s1","config":1,"state":1,"currentFeatures":0,"advertisedFeatures":0,"supportedFeatures":0,"peerFeatures":0}],"buffers":256,"description":{"software":"2.0.2","hardware":"Open vSwitch","manufacturer":"Nicira, Inc.","serialNum":"None","datapath":"None"},"capabilities":199,"inetAddress":"/127.0.0.1:58961","connectedSince":1416573640517,"dpid":"00:00:00:00:00:00:00:01","actions":4095,"attributes":{"supportsOfppFlood":true,"supportsNxRole":true,"FastWildcards":4194303,"supportsOfppTable":true}},{"harole":"MASTER","ports":[{"portNumber":3,"hardwareAddress":"36:b1:c7:4b:7a:ec","name":"s2-eth3","config":0,"state":0,"currentFeatures":192,"advertisedFeatures":0,"supportedFeatures":0,"peerFeatures":0},{"portNumber":1,"hardwareAddress":"fe:7f:a7:e7:0d:55","name":"s2-eth1","config":0,"state":0,"currentFeatures":192,"advertisedFeatures":0,"supportedFeatures":0,"peerFeatures":0},{"portNumber":2,"hardwareAddress":"1a:3b:ee:76:fe:df","name":"s2-eth2","config":0,"state":0,"currentFeatures":192,"advertisedFeatures":0,"supportedFeatures":0,"peerFeatures":0},{"portNumber":65534,"hardwareAddress":"8a:26:00:a3:eb:49","name":"s2","config":0,"state":0,"currentFeatures":0,"advertisedFeatures":0,"supportedFeatures":0,"peerFeatures":0}],"buffers":256,"description":{"software":"2.0.2","hardware":"Open vSwitch","manufacturer":"Nicira, Inc.","serialNum":"None","datapath":"None"},"capabilities":199,"inetAddress":"/127.0.0.1:58960","connectedSince":1416573640515,"dpid":"00:00:00:00:00:00:00:02","actions":4095,"attributes":{"supportsOfppFlood":true,"supportsNxRole":true,"FastWildcards":4194303,"supportsOfppTable":true}},{"harole":"MASTER","ports":[{"portNumber":3,"hardwareAddress":"f6:96:21:bb:ea:14","name":"s3-eth3","config":0,"state":0,"currentFeatures":192,"advertisedFeatures":0,"supportedFeatures":0,"peerFeatures":0},{"portNumber":1,"hardwareAddress":"02:90:f4:b6:0e:b8","name":"s3-eth1","config":0,"state":0,"currentFeatures":192,"advertisedFeatures":0,"supportedFeatures":0,"peerFeatures":0},{"portNumber":2,"hardwareAddress":"6a:3d:ad:e8:d3:e2","name":"s3-eth2","config":0,"state":0,"currentFeatures":192,"advertisedFeatures":0,"supportedFeatures":0,"peerFeatures":0},{"portNumber":65534,"hardwareAddress":"0e:71:36:ab:8a:42","name":"s3","config":0,"state":0,"currentFeatures":0,"advertisedFeatures":0,"supportedFeatures":0,"peerFeatures":0}],"buffers":256,"description":{"software":"2.0.2","hardware":"Open vSwitch","manufacturer":"Nicira, Inc.","serialNum":"None","datapath":"None"},"capabilities":199,"inetAddress":"/127.0.0.1:58959","connectedSince":1416573640514,"dpid":"00:00:00:00:00:00:00:03","actions":4095,"attributes":{"supportsOfppFlood":true,"supportsNxRole":true,"FastWildcards":4194303,"supportsOfppTable":true}}]

regards, Jesan

joagoncaonesource commented 9 years ago

Try a different hardware address (one present in that response), and see what OvS responds to, please.

Jesan commented 9 years ago

hi

![Uploading Screenshot from 2014-11-24 13:48:51.png . . .]()

curl -d '{"switchid": "00:00:00:00:00:00:00:01", "port":"s1-eth2", "rate":20}' http://127.0.0.1:8080/wm/queuepusher/qpc/json

{"id":"","queueuuid":"","qosuuid":"","err":"2014-11-24T02:48:07Z|00002|reconnect|WARN|tcp:127.0.0.1:9091: connection attempt failed (Connection refused)\novs-vsctl: tcp:127.0.0.1:9091: database connection failed ()\n","exitcode":"CREATE_FAIL","out":""}

this is the error .

Jesan commented 9 years ago

these are the topology and port i used .

screenshot from 2014-11-24 13 48 51 screenshot from 2014-11-24 13 51 29

RaviCharanReddy commented 9 years ago

Hi Jesan,

I trying to run queuepusher module, I also got the same error. Did you find any fix for that ?

root@ubuntu:~# curl -d '{"switchid": "00:00:00:00:00:00:00:03", "port":"eth1", "rate":20}' http://127.0.0.1:8080/wm/queuepusher/qpc/json {"id":"","queueuuid":"","qosuuid":"","err":"2015-04-14T22:29:08Z|00002|reconnect|WARN|tcp:127.0.0.1:9091: connection attempt failed (Connection refused)\novs-vsctl: tcp:127.0.0.1:9091: database connection failed ()\n","exitcode":"CREATE_FAIL","out":""}

Jesan commented 9 years ago

Hi Ravi ,

No I didn't get that fixed and I tried to implement in another way ...

Jesanraj

On 15-Apr-2015, at 4:09 am, RaviCharan notifications@github.com wrote:

Hi Jesan,

I trying to run queuepusher module, I also got the same error. Did you find any fix for that ?

root@ubuntu:~# curl -d '{"switchid": "00:00:00:00:00:00:00:03", "port":"eth1", "rate":20}' http://127.0.0.1:8080/wm/queuepusher/qpc/json {"id":"","queueuuid":"","qosuuid":"","err":"2015-04-14T22:29:08Z|00002|reconnect|WARN|tcp:127.0.0.1:9091: connection attempt failed (Connection refused)\novs-vsctl: tcp:127.0.0.1:9091: database connection failed ()\n","exitcode":"CREATE_FAIL","out":""}

— Reply to this email directly or view it on GitHub.

RaviCharanReddy commented 9 years ago

Hi Jesan,

Thanks for your reply. What is the other way ?

On Wednesday, April 15, 2015, Jesan notifications@github.com wrote:

Hi Ravi ,

No I didn't get that fixed and I tried to implement in another way ...

Jesanraj

On 15-Apr-2015, at 4:09 am, RaviCharan <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

Hi Jesan,

I trying to run queuepusher module, I also got the same error. Did you find any fix for that ?

root@ubuntu:~# curl -d '{"switchid": "00:00:00:00:00:00:00:03", "port":"eth1", "rate":20}' http://127.0.0.1:8080/wm/queuepusher/qpc/json

{"id":"","queueuuid":"","qosuuid":"","err":"2015-04-14T22:29:08Z|00002|reconnect|WARN|tcp: 127.0.0.1:9091: connection attempt failed (Connection refused)\novs-vsctl: tcp:127.0.0.1:9091: database connection failed ()\n","exitcode":"CREATE_FAIL","out":""}

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/OneSourceConsult/floodlight-queuepusher/issues/1#issuecomment-93192525 .

Thanks & Regards,

RaviCharan Masters - Network Communications E-mail: rrkallem@uh.edu Contact: 832-914-3923

berririasma commented 8 years ago

Hi guys, I am facing the same error "connection attempt failed (Connection refused)\novs-vsctl connection attempt failed (Connection refused)\novs-vsctl: tcp:127.0.0.1:9091: database connection failed ()\n","exitcode":"CREATE_FAIL","out":""}" Did you manage to fix the issue, if yes please let me know how Thanks

berririasma commented 8 years ago

Hi again, I am not getting the same error anymore, I fixed a part of the issue BUT I am getting a permission denied error now!!! I figured out that when the program (in floodlight) is attempting to execute this command ovs-vsctl set port s1 qos=@leqos -- --id=@leqos create qos type=linux-htb other-config:max-rate=10000000000000000000000000 queues:1=@lequeue -- --id=@lequeue create queue other-config:max-rate=20 The output is as you are trying to execute this command without root permission so it is normal I am getting this error now : unix:/var/run/openvswitch/db.sock: connection attempt failed (Permission denied)\novs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (Permission denied)\n" so the trick is how to grant opendaylight the root permission to execute the creation of the queue I can not find any solution Please help Thanks Asma

Rizaarda commented 6 years ago

I also get the error and I explained it in detail here : google forum I am not able to allocate a queue with a curl command. I started eclipse as root (floodlight controller) and give permissions to jar file.