[P4-dev] 回复:Re: 回复:Re: make bm error, who know how to resolve

Antonin Bas antonin at barefootnetworks.com
Sun Dec 25 14:00:08 EST 2016


This is a Mininet issue.I think I saw this issue in the past and fixed it
by uninstalling the ubuntu mininet package with apt-get and re-installing
mininet from source (https://github.com/mininet/mininet). You may also want
to reach out to the mininet developers.

On Sun, Dec 25, 2016 at 6:48 AM, <dida_327 at sina.com> wrote:

> I use mn -v debug  for trace infomation:
>
> dida at ubuntu:~/P4/P4factory/p4factory$ sudo mn -v debug
> *** Setting resource limits
> *** Creating network
> *** Adding controller
> *** c0 : ('ifconfig lo up',)
> bash: cannot set terminal process group (-1): Inappropriate ioctl for
> device
> bash: no job control in this shell
> *** c0 : ('echo A | telnet -e A 127.0.0.1 6633',)
> telnet: Unable to connect to remote host: Connection refused
> Telnet escape character is 'A'.
> Trying 127.0.0.1...
> bash: line 2: echo: write error: Broken pipe
> *** Adding hosts:
> h1 h2
> *** Adding switches:
>
> added intf lo:0 to node s1
> *** s1 : ('ifconfig', 'lo', 'up')
> bash: cannot set terminal process group (-1): Inappropriate ioctl for
> device
> bash: no job control in this shell
> *** s1 : ('ifconfig', 'lo')
> lo        Link encap:Local Loopback
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           inet6 addr: ::1/128 Scope:Host
>           UP LOOPBACK RUNNING  MTU:65536  Metric:1
>           RX packets:208 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:208 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0
>           RX bytes:15600 (15.6 KB)  TX bytes:15600 (15.6 KB)
>
> *** s1 : ('ifconfig', 'lo')
> lo        Link encap:Local Loopback
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           inet6 addr: ::1/128 Scope:Host
>           UP LOOPBACK RUNNING  MTU:65536  Metric:1
>           RX packets:208 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:208 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0
>           RX bytes:15600 (15.6 KB)  TX bytes:15600 (15.6 KB)
>
> *** s1 : ('ifconfig', 'lo')
> lo        Link encap:Local Loopback
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           inet6 addr: ::1/128 Scope:Host
>           UP LOOPBACK RUNNING  MTU:65536  Metric:1
>           RX packets:208 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:208 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0
>           RX bytes:15600 (15.6 KB)  TX bytes:15600 (15.6 KB)
>
> s1
> *** Adding links:
>
> added intf h1-eth0:0 to node h1
> moving h1-eth0 into namespace for h1
> *** h1 : ('ip link show',)
> bash: cannot set terminal process group (-1): Inappropriate ioctl for
> device
> bash: no job control in this shell
> 1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group
> default
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> 4: h1-eth0 at if3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode
> DEFAULT group default qlen 1000
>     link/ether fe:54:78:7e:c0:ed brd ff:ff:ff:ff:ff:ff
> *** h1 : ('ip link show',)
> 1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group
> default
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> 4: h1-eth0 at if3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode
> DEFAULT group default qlen 1000
>     link/ether fe:54:78:7e:c0:ed brd ff:ff:ff:ff:ff:ff
> *** h1 : ('ip link show',)
> 1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group
> default
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> 4: h1-eth0 at if3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode
> DEFAULT group default qlen 1000
>     link/ether fe:54:78:7e:c0:ed brd ff:ff:ff:ff:ff:ff
> *** h1 : ('ip link show',)
> 1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group
> default
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> 4: h1-eth0 at if3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode
> DEFAULT group default qlen 1000
>     link/ether fe:54:78:7e:c0:ed brd ff:ff:ff:ff:ff:ff
> *** gave up after 3 retries
>
>
>  seems operation on "lo" interface are not permitted, but i exec the mn
> with "sudo", why ?
>
>
> ----- 原始邮件 -----
> 发件人:<dida_327 at sina.com>
> 收件人:"Antonin Bas" <antonin at barefootnetworks.com>
> 抄送人:"David Hancock" <dhancock at cs.utah.edu>, "p4-dev" <p4-dev at lists.p4.org>
> 主题:回复:Re: [P4-dev] 回复:Re: make bm error, who know how to resolve
> 日期:2016年12月25日 15点01分
>
>
> I met some new issue on mininet.
>
> when I try to use simple_router target
>
> cd p4factory/targets/simple_router/
> make bm
> ./run_demo.bash
>
> I was told mininet link can't be established, so i doubt something wrong
> with mininet, I just run "sudo mn",  and it can't work correctly.
> error is below:
>
> dida at ubuntu:~/P4/P4factory/p4factory$ sudo mn
> [sudo] password for dida:
> *** Creating network
> *** Adding controller
> ------------------------------------------------------------
> --------------------
> Caught exception. Cleaning up...
>
> Exception: Please shut down the controller which is running on port 6633:
> Active Internet connections (servers and established)
> tcp        0      0 *:6633                  *:*                     LISTEN
>      1164/ovs-controller
> tcp        0      0 localhost:47598         localhost:6633
>  TIME_WAIT   -
> ------------------------------------------------------------
> --------------------
> *** Removing excess controllers/ofprotocols/ofdatapaths/pings/noxes
> killall controller ofprotocol ofdatapath ping nox_core lt-nox_core
> ovs-openflowd ovs-controller udpbwtest mnexec ivs 2> /dev/null
> killall -9 controller ofprotocol ofdatapath ping nox_core lt-nox_core
> ovs-openflowd ovs-controller udpbwtest mnexec ivs 2> /dev/null
> pkill -9 -f "sudo mnexec"
> *** Removing junk from /tmp
> rm -f /tmp/vconn* /tmp/vlogs* /tmp/*.out /tmp/*.log
> *** Removing old X11 tunnels
> *** Removing excess kernel datapaths
> ps ax | egrep -o 'dp[0-9]+' | sed 's/dp/nl:/'
> ***  Removing OVS datapathsovs-vsctl --timeout=1 list-br
> *** Removing all links of the pattern foo-ethX
> ip link show | egrep -o '(\w+-eth\w+)'
> *** Cleanup complete.
> dida at ubuntu:~/P4/P4factory/p4factory$
> dida at ubuntu:~/P4/P4factory/p4factory$ sudo mn
> *** Creating network
> *** Adding controller
> *** Adding hosts:
> h1 h2
> *** Adding switches:
> s1
> *** Adding links:
> *** gave up after 3 retries
>
>
> I use mininet before on other environment , so i don't think mininet has
> some bug,  is there anything conflict with mininet in P4factory environment?
>
> according to the output, I think it has killed ovs-controller which must
> be conflict with mininet but it seems link among h1,h2,s1 can't be setup.
>
> do you know the cause? thanks a lot !
>
>
>
> ----- 原始邮件 -----
> 发件人:Antonin Bas <antonin at barefootnetworks.com>
> 收件人:dida_327 at sina.com
> 抄送人:David Hancock <dhancock at cs.utah.edu>, p4-dev <p4-dev at lists.p4.org>
> 主题:Re: [P4-dev] 回复:Re: make bm error, who know how to resolve
> 日期:2016年12月21日 03点10分
>
> A recent change to p4-hlir caused dependencies to no longer be installed
> automatically when installing the p4-hlir package. This should have been
> fixed today by the following 2 commits:
> https://github.com/p4lang/p4-hlir/commit/98ffdbb2e882ec3fd36f18b420e35c
> 7434b120f8
> https://github.com/p4lang/p4-hlir/commit/8bd5b1156dd8266d596b99b3c53d21
> 1e1e439d83
> If you are facing this issue, you can either pull the p4-hlir code and
> reinstall it, or simply install ply as described in the previous email.
>
> On Mon, Dec 19, 2016 at 5:23 PM, Antonin Bas <antonin at barefootnetworks.com
> > wrote:
>
> You can install ply with "sudo pip install ply"
>
> On Mon, Dec 19, 2016 at 4:56 PM, <dida_327 at sina.com> wrote:
>
>
> thanks david.
>
> yes , i have run ./install_deps.sh,  and i checked each step in this
> shell.
> i think everything should be fine except thrift.
> since there is some warning when make thrift, but no error info, so I
> suppose it is OK but not sure
>
> do you know how can I install ply ? or should i reinstall thrift?
> by the way, the version of thrift I use is 0.9.3
>
> ----- 原始邮件 -----
> 发件人:David Hancock <dhancock at cs.utah.edu>
> 收件人:p4-dev at lists.p4.org
> 主题:Re: [P4-dev] make bm error, who know how to resolve
> 日期:2016年12月20日 01点33分
>
> Did you run ./install_deps.sh?  You are missing ply for some reason.
>
> --David
>
> On 12/19/2016 09:03 AM, dida_327 at sina.com wrote:
>
> I think I have done all things requested on https://github.com/p4lang/p
> 4factory, but unfortunately I can't make it work correctly.
>
> is there anyone know how to do with the error below:
>
> dida at ubuntu:~/P4/P4factory/p4factory/targets/basic_routing$ make bm
> /home/dida/P4/P4factory/p4factory/submodules/p4c-behavioral/p4c_bm/shell.py
> p4src/basic_routing.p4 --gen-dir=/home/dida/P4/P4fact
> ory/p4factory/targets/basic_routing/build//bm/ --thrift
> --public-inc-path=/home/dida/P4/P4factory/p4factory/targets/
> basic_routing/build//inc/p4_sim --p4-prefix=basic_routing
> Traceback (most recent call last):
>   File "/home/dida/P4/P4factory/p4factory/submodules/p4c-behavioral/p4c_bm/shell.py",
> line 20, in <module>
>     from p4_hlir.main import HLIR
>   File "/usr/local/lib/python2.7/dist-packages/p4_hlir/main.py", line 16,
> in <module>
>     from frontend.tokenizer import *
>   File "/usr/local/lib/python2.7/dist-packages/p4_hlir/frontend/tokenizer.py",
> line 15, in <module>
>     from ply import lex
> ImportError: No module named ply
> make: *** [bm_tenjin_output_oldest] Error 1
>
> thanks a lot!
>
>
>
> _______________________________________________
> P4-dev mailing listP4-dev at lists.p4.orghttp://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>
>
> _______________________________________________
> P4-dev mailing list
> P4-dev at lists.p4.org
> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>
> _______________________________________________
> P4-dev mailing list
> P4-dev at lists.p4.org
> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>
>
>
>
> --
> Antonin
>
>
>
>
> --
> Antonin
>



-- 
Antonin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20161225/1547f1bf/attachment-0002.html>


More information about the P4-dev mailing list