Closed senthilkuma closed 10 years ago
As the error message explains, the OpenFlow component is unable to open a listening socket because something else is already listening on the same port. It's probably another controller. You might check that you don't have another controller running with the default port (which is 6633). There's also a small chance that some other non-controller is using the address.
You could also just specify a different port for POX to run on and then give that to your switches to connect to. As it indicates, you can do this by using the --port argument to the openflow.of_01 component. For example: ./pox.py openflow.of_01 --port=6655 You can find out more about this in the POX manual.
You may also find information on this subject by searching. For example, a quick Google search brings up the following related pox-dev mailing list post: https://www.mail-archive.com/pox-dev@lists.noxrepo.org/msg00563.html
hai dear murphy, again i got same error dear....what can i do. i can not start POX controller...
root@ubuntu:~/pox# ./pox.py openflow.of_01 --port=6634 forwarding.l2_learning
POX 0.2.0 (carp) / Copyright 2011-2013 James McCauley, et al.
INFO:core:POX 0.2.0 (carp) is up.
ERROR:openflow.of_01:Error 98 while binding socket: Address already in use
ERROR:openflow.of_01: You may have another controller running.
ERROR:openflow.of_01: Use openflow.of_01 --port=
Take a look at the following (or just google) to try to find what other process is holding the port open: http://serverfault.com/questions/25406/how-to-tell-what-process-has-a-specific-port-open-on-linux
hai dear murphy,
if i put this command it shows nothing
senthil@ubuntu:~/pox$ ./pox.py POX 0.3.0 (dart) / Copyright 2011-2014 James McCauley, et al. INFO:core:POX 0.3.0 (dart) is up.
it stoped then it shows nothing....
Do you have switches configured to connect to it? If you don't, then this is the expected behavior. Also, you might start with the example commandline recommended in the manual: ./pox.py samples.pretty_log forwarding.l2_learning
hai dear murphy, when i put this command ./pox.py samples.pretty_log forwarding.l2_learning
it shows like this
root@ubuntu:~# cd pox
root@ubuntu:~/pox# ls
debug-pox.py LICENSE pox pox.py setup.cfg tools
ext NOTICE poxmn.py README tests
root@ubuntu:~/pox# ./pox.py samples.pretty_log forwarding.l2_learning
POX 0.2.0 (carp) / Copyright 2011-2013 James McCauley, et al.
[core ] POX 0.2.0 (carp) is up.
[openflow.of_01 ] Error 98 while binding socket: Address already in use
[openflow.of_01 ] You may have another controller running.
[openflow.of_01 ] Use openflow.of_01 --port=
Which is what Murphy told you in his first reply -- you have another process on your machine listening on TCP socket 6633. Try "netstat -lnptu" to identify the culprit
hai dear when i put that command it shows like this
root@ubuntu:~# netstat -lnptu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 3683/cupsd
tcp 0 0 0.0.0.0:6655 0.0.0.0:* LISTEN 6863/python2.7
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN 6502/python2.7
tcp 0 0 0.0.0.0:6633 0.0.0.0:* LISTEN 7401/python2.7
tcp 0 0 10.0.3.1:6634 0.0.0.0:* LISTEN 6432/python2.7
tcp 0 0 10.0.3.1:53 0.0.0.0:* LISTEN 1492/dnsmasq
tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN 1312/dnsmasq
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1196/sshd
tcp6 0 0 ::1:631 :::* LISTEN 3683/cupsd
tcp6 0 0 fe80::6832:a8ff:fe55:53 :::* LISTEN 1492/dnsmasq
tcp6 0 0 :::22 :::* LISTEN 1196/sshd
udp 0 0 0.0.0.0:17973 0.0.0.0:* 1152/dhclient
udp 0 0 0.0.0.0:50798 0.0.0.0:* 705/avahi-daemon: r
udp 0 0 0.0.0.0:631 0.0.0.0:* 1230/cups-browsed
udp 0 0 10.0.3.1:53 0.0.0.0:* 1492/dnsmasq
udp 0 0 127.0.1.1:53 0.0.0.0:*
1312/dnsmasq
udp 0 0 0.0.0.0:67 0.0.0.0:* 1492/dnsmasq
udp 0 0 0.0.0.0:68 0.0.0.0:* 1152/dhclient
udp 0 0 0.0.0.0:5353 0.0.0.0:* 705/avahi-daemon: r
udp6 0 0 :::52231 :::* 705/avahi-daemon: r
udp6 0 0 fe80::6832:a8ff:fe55:53 :::* 1492/dnsmasq
udp6 0 0 :::5353 :::* 705/avahi-daemon: r
udp6 0 0 :::35057 :::* 1152/dhclient
tcp 0 0 0.0.0.0:6633 0.0.0.0:* LISTEN 7401/python2.7
There you have it -- Python process with pid 7401 is listening on the socket. I bet it is an another instance of pox you are running somewhere in the background
hai dear ppershing
how to solve it? how can i remove those issues?
hai dear can you please tel me how to solve that problem
Kill the other controllers.
As mentioned above, process 7401 is probably a POX instance running on the default port. Process 6863 is probably another one that you started running on port 6655 in response to my suggestion above, but then you never shut down. Process 6432 is probably one you started running on 6634 and then left running.
All of those processes (7401, 6863, 6432) probably should be killed using the kill command.
So besides killing off those processes, you should also stop starting them and leaving them running. I'm not sure how you're doing this, but it would appear to be the source of your problem. If you run them from the commandline, use Ctrl-C to quit them.
If you've accidentally suspended them instead (using Ctrl-Z), you should be able to use the fg command to bring them back to the front one at a time and then shut them down with Ctrl-C if you'd rather do that than use the kill command.
thanks dear i will try to solve it
but i do not how to kill those controller
Hello murphy can you suggest any idea how to solve below error
root@mininet-vm:/home/mininet/pox# ./pox.py POX 0.2.0 (carp) / Copyright 2011-2013 James McCauley, et al. INFO:core:POX 0.2.0 (carp) is up.
After this it shows nothing.It stopped.
That's not an issue. POX is quietly doing exactly what you told it to do: nothing.
You might look at my response to the similar post above from October 6, or read the "Invoking POX" section of the manual.
This problem pops up when I run my POX program. If the program fails (say due to some error) after the controller has started, then it looks like python 2.7 holds onto the socket. Best advice from reading the above is to use "netstat -lnptu" to see what process is tying up port 6633. That indicates python 2.7 as the culprit. It also has a process ID(say 1866). Kill the process by entering kill 1866 to kill the process. Typing killall controllers does not work.
This also works: sudo mn -c sudo fuser -k 6633/tcp
@MurphyMc I tried killing the process previously running on the default port (6633). But it doesn't seem to stop. The port continues to listen to that process for some reason. The process was a POX controller which I hadn't killed properly before. I checked the ports using netstat -lnptu and then tried killing the respective process using kill
Are you saying the POX process doesn't die? That's pretty strange, especially if you're just running OpenFlow components. If you kill -9 it do things work as expected?
First i start topology, sudo mn --topo single,6 --mac --switch ovsk --controller remote
then i start sudo ./pox.py forwarding.hub
and then i start LoadBalancing roudn robin using this command
sudo ./pox.py log.level --DEBUG LoadBalancer
then it generate the following error , any on help me ?
POX 0.2.0 (carp) / Copyright 2011-2013 James McCauley, et al.
DEBUG:core:POX 0.2.0 (carp) going up...
DEBUG:core:Running on CPython (2.7.6/Oct 26 2016 20:30:19)
DEBUG:core:Platform is Linux-3.13.0-133-generic-x86_64-with-Ubuntu-14.04-trusty
INFO:core:POX 0.2.0 (carp) is up.
ERROR:openflow.of_01:Error 98 while binding socket: Address already in use
ERROR:openflow.of_01: You may have another controller running.
ERROR:openflow.of_01: Use openflow.of_01 --port=
Right. You're trying to run two controllers at the same time on the same port.
I am assuming you want some switches to be acting like learning switches and one to be acting like a server load balancer (using some load balancer component of your own, not the one that comes with POX).
You need to do one of two things:
You may also use a different port number using the openflow.0f_01 -- port = XXXX where xxxx is your new desired port. for example if 6063 is busy and you prefer not to go through the all the process list to identify which process and kill it you may choose a different port like this
$ sudo ~/pox/pox.py openflow.of_01 --port=9090 \ forwarding.l2_learning \ openflow.spanning_tree --no-flood --hold-down \ log.level --DEBUG samples.pretty_log \ openflow.discovery host_tracker \ info.packet_dump
Sure, that's good advice. That's why it's given in the log and in the first reply to this issue. Of course, you really shouldn't be leaving controllers running and not knowing why or how anyway. coxjacob's suggestion of using fuser
to kill the processes is a pretty nice one (especially if you're sure they're just POX instances you'd abandoned somehow).
Unfortunately, none of that would have been sufficient for ghzeeshan, who was actually trying to run two controllers at the same time on purpose, though I did cover the related aspect in part 1 of my answer immediately above.
I'm using 3 pox controllers.I want to make 1 pox controller as master and the other two as slaves.Please help me on how to do it.
This seems like it should be its own issue. But answering here anyway...
None of the sample applications which POX comes with have any support for OpenFlow master/slave relationships. Indeed, controller roles were not part of the OpenFlow 1.0 specification which is the only version POX currently supports. However, POX does have support for the Nicira Open vSwitch extensions for controller roles (which, if I recall, were the basis for roles in subsequent OpenFlow versions). So if you're using Open vSwitch, you should be able to use nx_role_request from openflow/nicira.py to change roles. Of course, you'll still have to write control logic which takes advantage of it.
i still have this issue
POX 0.3.0 (dart) / Copyright 2011-2014 James McCauley, et al.
INFO:core:POX 0.3.0 (dart) is up.
ERROR:openflow.of_01:Error 98 while binding 0.0.0.0:6633: Address already in use
ERROR:openflow.of_01: You may have another controller running.
ERROR:openflow.of_01: Use openflow.of_01 --port=
can anyone help ?
As always, the answer is that you have something else (quite possibly another instance of POX) running on the same port.
The links posted above have lots of tips on resolving this by finding/killing the other process or running POX using a different port than 6633. Have you read those and tried what they suggest?
i have killed 6633 but still have the issue ?
and also not accept to run over other port !! i don't know why
when I running the command ./pox.py
it show me this message :
POX 0.3.0 (dart) / Copyright 2011-2014 James McCauley, et al. INFO:core:POX 0.3.0 (dart) is up.
That's expected. You're not telling it to do anything. Are you trying to run it as an OpenFlow controller? What happens if you run POX as:
./pox.py openflow.of_01 --port=12345
?
Hello, i try using pox and openwrt router when I run this command : ./pox.py openflow.of_01 --address=192.168.2.1 --port=6633
it shows me this error >>
POX 0.3.0 (dart) / Copyright 2011-2014 James McCauley, et al. INFO:core:POX 0.3.0 (dart) is up. ERROR:openflow.of_01:Error 99 while binding 192.168.2.1:6633: Cannot assign requested address ERROR:openflow.of_01: You may be specifying a local address which is not assigned to any interface.
any suggestion, please !!!
I imagine the address you're giving it there (192.168.2.1) is the address of the router which is acting as an OpenFlow switch. But that's not usually how OpenFlow works. Usually, switches connect to the controller (POX), not the other way around. If you give of_01 an address, it's the local address on which POX should listen for connections, not a remote address to try to connect to. Hence the error, "You may be specifying a local address which is not assigned to any interface." The address you're specifying isn't a local address at all (it's not assigned to any local interface).
Short answer: Configure your router to connect to POX, and you can probably leave the --address out entirely (POX will listen to all local addresses by default).
thank you so much for responding
i have changed the IP of 'of_01' to local , and try running this command : ./pox.py openflow.of_01 --address=127.0.0.1 --port=6633 it shows : POX 0.3.0 (dart) / Copyright 2011-2014 James McCauley, et al. INFO:core:POX 0.3.0 (dart) is up.
how can know if the controller sense the openwrt now ? or what should I do to test it ?
regards
Are you running POX on the OpenWRT device? If not, that won't work, since 127.0.0.1 is only the local device (where POX is running). It would be most usual to leave off --address
altogether. And --port
too, since 6633 is the default.
If you have things configured correctly and turn POX's log level up, you should be able to see when a switch connects. Add log.level --DEBUG
to your POX command line.
For this to work, you'll have had to configure OpenFlow on the switch to connect to whatever IP address the controller is reachable by. You may also need to configure the switch to speak a version of OpenFlow that POX knows (the stock POX only speaks OpenFlow 1.0 with Nicira extensions; Open vSwitch can do this, but I don't know if that's the switch software you're running).
" Are you running POX on the OpenWRT device? If not, that won't work, since 127.0.0.1 is only the local device (where POX is running)." <<
what did you mean by running POX on openWRT device ? my situation is I have openWRT device ------ Linux Ubuntu on VM ---- POX controller on ubuntu
I created openflow file on openWRT by this following script : config 'ofswitch' option 'dp' 'dp0' option 'dpid' '10feed4feeb2' option 'ofports' 'eth0.1 eth0.2 eth0.3 eth0.4 wlan0'
option 'ofctl' 'tcp:127.0.0.1:6633'
option 'mode' 'outofband'
----- related info. ------
I set ovs using this command > sudo ovs-vsctl set bridge br-int other_config:hwaddr=50:c7:bf:3b:08:f0 < (which is the MAC address of openWRT device )
when I running ; $sudo ovs-vsctl show
outputs when POX is down : 1c71fd5f-9008-468e-aa0d-327d510ce512 Bridge br-int Controller "tcp:127.0.0.1:6633" Port br-int Interface br-int type: internal ovs_version: "2.13.3"
outputs when POX is running : 1c71fd5f-9008-468e-aa0d-327d510ce512 Bridge br-int Controller "tcp:127.0.0.1:6633" is_connected: true << (showing when POX running) Port br-int Interface br-int type: internal ovs_version: "2.13.3"
when I running pox as : $ ./pox.py openflow.nicira --convert-packet-in forwarding.l2_nx log.level --DEBUG
it shows :
INFO:core:POX 0.3.0 (dart) is up. DEBUG:openflow.of_01:Listening on 127.0.0.1:6633 INFO:openflow.of_01:[50-c7-bf-3b-08-f0 1] connected DEBUG:nicira:[50-c7-bf-3b-08-f0 1] is Open vSwitch 2.13.3 INFO:forwarding.l2_nx:[50-c7-bf-3b-08-f0 1] ready
Thank you in advance
But "running POX on the OpenWRT device", I meant exactly that. OpenWRT is a Linux-based OS capable of running Python. You could run POX on the router or whatever that's running OpenWRT. But in your case, you're apparently not.
So to me it looks like you have it working. I'm not sure how it's working with 127.0.0.1, but it does seem to be working...
what is the main idea if POX working on openWRT or on ubuntu itself?
even when the result posted above shows everything working fine, POX can not sense the openWRT connection, from my last comments above, how can make sure the POX controller connected to OpenWRT , because even when router is off the output is still same :
" it shows :
INFO:core:POX 0.3.0 (dart) is up. DEBUG:openflow.of_01:Listening on 127.0.0.1:6633 INFO:openflow.of_01:[50-c7-bf-3b-08-f0 1] connected DEBUG:nicira:[50-c7-bf-3b-08-f0 1] is Open vSwitch 2.13.3 INFO:forwarding.l2_nx:[50-c7-bf-3b-08-f0 1] ready"
Thank you in advance [MurphyMc]
when I checked > /etc/init.d/ on openWRT > isn't contain openflow file :( which script needed there ?
Oh. Yeah, I see. You seem to be configuring Open vSwitch on the Ubuntu VM alongside POX. It's connecting to POX. But OVS is a software switch, and I don't think you want to be running it on the VM at all. This explains why 127.0.0.1 was working and was confusing me.
I think you are intending to use OpenFlow to control the OpenWRT device. You need to configure an OpenFlow switch (e.g., OVS) on the OpenWRT device itself, not in the VM. There was indeed an OVS package for OpenWRT at some point. I don't know if it still exists. Maybe you just need to install it. I don't follow OpenWRT closely, so I can't help you there.
can you please tell me what does "DEBUG:openflow.of_01:1 connection aborted". mean ?
and how the controller capture the traffic ? or if I sent the ping, how can see what happen in controller ?
regards
It means something connected but didn't get very far in the handshake process. It probably wasn't talking OpenFlow (or maybe a version that POX didn't understand). I have a vague recollection of an ancient bug where OVS would sometimes connect and... I think not do anything. Maybe that bug is still around. Or maybe something else is connecting. At least one switch seems to be connecting just fine here, though (once POX sees a DPID -- which it is seeing here as 00-00-00-00-00-01 -- it doesn't log it as aborted).
You could try to use lsof or netstat to figure out what else is connecting to port 6633. But this message doesn't necessarily indicate a significant problem (which is why it's only logged at DEBUG level).
hey murphy, I tried to run ./pox.py pox.forwarding.hub
and it is showing the error
Traceback (most recent call last):
File "./pox.py", line 43, in
can you help me because i am not able to run any other application using it
@SibasisRath, you should file this as a new issue, as it seems unrelated to this (closed) issue.
@MurphyMc Hello i want to build system model contain 2 program ( 1-pox controller ) program , and 2 program (Environment of IoT- MEC) program and i want to connect between them , give me tips about how to connect together ( i build Environment of IoT- MEC), but i dondt know how to connect togather
Hi Murphy, My problem seems to be with the pox loadbalancer component which when I run as the remote controller component doesn't seem to allow either pingall or ping commands from mininet single switch with any number of hosts topology set to remote controller running on port 6633. Every other pox component seems to work just okay with any topology from another terminal. Could you please explain if the pox loadbalancer component is still active or no longer recognized in pox/mininet topologies.
mininet@mininet-vm:~$ sudo mn --topo single,4 --controller remote Creating network Adding controller Unable to contact the remote controller at 127.0.0.1:6653 Connecting to remote controller at 127.0.0.1:6633 Adding hosts: h1 h2 h3 h4 Adding switches: s1 Adding links: (h1, s1) (h2, s1) (h3, s1) (h4, s1) Configuring hosts h1 h2 h3 h4 Starting controller c0 Starting 1 switches s1 ... Starting CLI: mininet> pingall Ping: testing ping reachability h1 -> X X X h2 -> X X X h3 -> X X X h4 -> X X X *** Results: 100% dropped (0/12 received) mininet>
mininet@mininet-vm:~$ sudo ~/pox/pox.py log.level --DEBUG misc.ip_loadbalancer --ip=10.0.1.1 --servers=10.0.0.2,10.0.0.3 POX 0.7.0 (gar) / Copyright 2011-2020 James McCauley, et al. DEBUG:core:POX 0.7.0 (gar) going up... DEBUG:core:Running on CPython (3.8.5/Jul 28 2020 12:59:40) DEBUG:core:Platform is Linux-5.4.0-42-generic-x86_64-with-glibc2.29 WARNING:version:Support for Python 3 is experimental. INFO:core:POX 0.7.0 (gar) is up. DEBUG:openflow.of_01:Listening on 0.0.0.0:6633 INFO:openflow.of_01:[00-00-00-00-00-01 1] connected INFO:iplb:IP Load Balancer Ready. INFO:iplb:Load Balancing on [00-00-00-00-00-01 1] INFO:iplb.00-00-00-00-00-01:Server 10.0.0.2 up INFO:iplb.00-00-00-00-00-01:Server 10.0.0.3 up
Thanks
The results are the same regardless of the commands I use in creating the topology. For example:
sudo mn --topo single,4 --controller =remote,port=6633
sudo mn --topo single,6 --controller=remote,port=6633
sudo mn --topo single,4 --controller remote
sudo mn --topo single,6 --controller=remote, ip=127.0.0.1,port=6633
mininet@mininet-vm:~$ sudo ~/pox/pox.py log.level --DEBUG misc.ip_loadbalancer1 --ip=10.0.1.1 --servers=10.0.0.1,10.0.0.2,10.0.0.3 POX 0.8.0 (halosaur) / Copyright 2011-2022 James McCauley, et al. DEBUG:core:POX 0.8.0 (halosaur) going up... DEBUG:core:Running on CPython (3.8.5/Jul 28 2020 12:59:40) DEBUG:core:Platform is Linux-5.4.0-42-generic-x86_64-with-glibc2.29 DEBUG:openflow.of_01:Listening on 0.0.0.0:6633 INFO:core:POX 0.8.0 (halosaur) is up. INFO:openflow.of_01:[00-00-00-00-00-01 2] connected INFO:iplb:IP Load Balancer Ready. INFO:iplb:Load Balancing on [00-00-00-00-00-01 2] INFO:iplb.00-00-00-00-00-01:Server 10.0.0.1 up INFO:iplb.00-00-00-00-00-01:Server 10.0.0.2 up INFO:iplb.00-00-00-00-00-01:Server 10.0.0.3 up DEBUG:openflow.of_01:1 connection aborted
Hi Murphy, if you are still around please note that this problem persists even with the latest pox upgrade ( in my case, halosaur) and as you can see from when I started posting in this thread, it did not work with gar either. I have even opened a new issue with the same complaint under different topological scenarios in the hope I'd get a response from either you or the community to no avail. There's not so much info available on the internet and the one that I came across (https://www.cnblogs.com/gddfg/p/16807891.html) had the DEBUG:openflow.of_01:3 connection aborted which recommended setting the openflows to "protocols=OpenFlow10" when creating the topology.
What should I do to clear the connection aborting bug? Thanks in advance.
mininet@mininet-vm:~$ sudo -E mn --topo=single,6 --controller=remote,ip=127.0.0.1,port=6633 --switch ovsk,protocols=OpenFlow13 Creating network Adding controller Adding hosts: h1 h2 h3 h4 h5 h6 Adding switches: s1 Adding links: (h1, s1) (h2, s1) (h3, s1) (h4, s1) (h5, s1) (h6, s1) Configuring hosts h1 h2 h3 h4 h5 h6 Starting controller c0 Starting 1 switches s1 ... *** Starting CLI: mininet> h1
mininet@mininet-vm:~$ sudo ~/pox/pox.py log.level --DEBUG misc.ip_loadbalancer1 --ip=10.0.1.1 --servers=10.0.0.1,10.0.0.2,10.0.0.3 POX 0.8.0 (halosaur) / Copyright 2011-2022 James McCauley, et al. DEBUG:core:POX 0.8.0 (halosaur) going up... DEBUG:core:Running on CPython (3.8.5/Jul 28 2020 12:59:40) DEBUG:core:Platform is Linux-5.4.0-42-generic-x86_64-with-glibc2.29 DEBUG:openflow.of_01:Listening on 0.0.0.0:6633 INFO:core:POX 0.8.0 (halosaur) is up. DEBUG:openflow.of_01:6 connections aborted DEBUG:openflow.of_01:3 connections aborted DEBUG:openflow.of_01:3 connections aborted DEBUG:openflow.of_01:3 connections aborted
These are the results when I try to change the openflow version from the default (1.0) to the latest (I used openflow 13). Would you kindly let me know which openflow version works with pox halosaur if that might be the case though I highly doubt it coz the connection aborted error happens as soon I start issuing mininet commands (pingall, ping) on the CLI upon creating the topology.
dear murphy,
i could not connect pox controller i got these type of errors..please help me to solve it..
root@ubuntu:~/pox# ./pox.py POX 0.2.0 (carp) / Copyright 2011-2013 James McCauley, et al. INFO:core:POX 0.2.0 (carp) is up. ERROR:openflow.of_01:Error 98 while binding socket: Address already in use ERROR:openflow.of_01: You may have another controller running. ERROR:openflow.of_01: Use openflow.of_01 --port= to run POX on another port.
i do not know what is this error?