weixin_39559097
2021-01-02 16:07 阅读 22

pox controller issue

dear murphy,

i could not connect pox controller i got these type of errors..please help me to solve it..

root:~/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?

该提问来源于开源项目:noxrepo/pox

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

26条回答 默认 最新

  • weixin_40002009 weixin_40002009 2021-01-02 16:07

    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.noxrepo.org/msg00563.html

    点赞 评论 复制链接分享
  • weixin_39559097 weixin_39559097 2021-01-02 16:07

    hai dear murphy, again i got same error dear....what can i do. i can not start POX controller...

    root:~/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= to run POX on another port.

    点赞 评论 复制链接分享
  • weixin_40002009 weixin_40002009 2021-01-02 16:07

    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

    点赞 评论 复制链接分享
  • weixin_39559097 weixin_39559097 2021-01-02 16:07

    hai dear murphy,

    if i put this command it shows nothing

    senthil:~/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....

    点赞 评论 复制链接分享
  • weixin_40002009 weixin_40002009 2021-01-02 16:07

    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

    点赞 评论 复制链接分享
  • weixin_39559097 weixin_39559097 2021-01-02 16:07

    hai dear murphy, when i put this command ./pox.py samples.pretty_log forwarding.l2_learning

    it shows like this

    root:~# cd pox root:~/pox# ls debug-pox.py LICENSE pox pox.py setup.cfg tools ext NOTICE poxmn.py README tests root:~/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= to run POX on another port.

    点赞 评论 复制链接分享
  • weixin_39627697 weixin_39627697 2021-01-02 16:07

    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

    点赞 评论 复制链接分享
  • weixin_39559097 weixin_39559097 2021-01-02 16:07

    hai dear when i put that command it shows like this

    root:~# 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

    点赞 评论 复制链接分享
  • weixin_39627697 weixin_39627697 2021-01-02 16:07

    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

    点赞 评论 复制链接分享
  • weixin_39559097 weixin_39559097 2021-01-02 16:07

    hai dear ppershing

    how to solve it? how can i remove those issues?

    点赞 评论 复制链接分享
  • weixin_39559097 weixin_39559097 2021-01-02 16:07

    hai dear can you please tel me how to solve that problem

    点赞 评论 复制链接分享
  • weixin_40002009 weixin_40002009 2021-01-02 16:07

    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.

    点赞 评论 复制链接分享
  • weixin_39559097 weixin_39559097 2021-01-02 16:07

    thanks dear i will try to solve it

    点赞 评论 复制链接分享
  • weixin_39559097 weixin_39559097 2021-01-02 16:07

    but i do not how to kill those controller

    点赞 评论 复制链接分享
  • weixin_39695306 weixin_39695306 2021-01-02 16:07

    Hello murphy can you suggest any idea how to solve below error

    root-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.

    点赞 评论 复制链接分享
  • weixin_40002009 weixin_40002009 2021-01-02 16:07

    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.

    点赞 评论 复制链接分享
  • weixin_39678531 weixin_39678531 2021-01-02 16:07

    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.

    点赞 评论 复制链接分享
  • weixin_39678531 weixin_39678531 2021-01-02 16:07

    This also works: sudo mn -c sudo fuser -k 6633/tcp

    点赞 评论 复制链接分享
  • weixin_39617470 weixin_39617470 2021-01-02 16:07

    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 .

    点赞 评论 复制链接分享
  • weixin_40002009 weixin_40002009 2021-01-02 16:07

    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?

    点赞 评论 复制链接分享
  • weixin_39601929 weixin_39601929 2021-01-02 16:07

    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= to run POX on another por

    点赞 评论 复制链接分享
  • weixin_40002009 weixin_40002009 2021-01-02 16:07

    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:

    1. Run two controllers on different ports. Configure one of the POXes to run on some port besides the default 6633 using "openflow.of_01 --port=". Then configure your switches to connect to the proper controller. I don't use Mininet anymore, so I don't know how to do this.
    2. Run a single controller, that has the ability to tell how to treat switches differently. Current versions of the POX l2_learning and ip_loadbalancer components can do this, though I'm not sure about the old (carp) versions you have. OpenFlow switches are identified by their datapath ID (DPID). l2_learning has an --ignore option which takes a list of DPIDs for it to ignore. You should set that to the DPID of the switch you want to be the load balancer. And POX's ip_loadbalancer takes a --dpid which is the DPID of a single switch to act as a load balancer, so that should be set to the same DPID.
    点赞 评论 复制链接分享
  • weixin_39978276 weixin_39978276 2021-01-02 16:07

    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

    点赞 评论 复制链接分享
  • weixin_40002009 weixin_40002009 2021-01-02 16:07

    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.

    点赞 评论 复制链接分享
  • weixin_39812065 weixin_39812065 2021-01-02 16:07

    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.

    点赞 评论 复制链接分享
  • weixin_40002009 weixin_40002009 2021-01-02 16:07

    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.

    点赞 评论 复制链接分享

相关推荐