[P4-dev] Help needed for p4 INT example

Manish Jangid manish.jangid08 at gmail.com
Fri Jul 7 12:15:40 EDT 2017


Hi Avinash,

Thanks for your response.
Yes, I had installed the submodules correctly and followed every
instruction specified in the readme file. I had even installed a VM of
Ubuntu 14.04 version to make sure I don't get into issues related to
vxlan-gpe driver compilation with latest Ubuntu 16.04. After sending the
mail earlier, I rebooted the VM and again tried to run the command :

 sudo ./int_ref_topology.py --model-dir=$HOME/install

and now I am getting the following error every time I try to run the command:

ubuntu14.04 at ubuntu:~/Desktop/p4git/p4factory/mininet$ sudo
./int_ref_topology.py --model-dir=/usr/local
Adding switch spine1
Adding switch spine2
Adding switch leaf1
Adding switch leaf2
Waiting 10 seconds for switches to intialize...
INT Config  spine1
Traceback (most recent call last):
  File "./int_ref_topology.py", line 131, in <module>
    run_cfg(model_dir)
  File "./int_ref_topology.py", line 91, in run_cfg
    net = mgr.setupAndStartNetwork()
  File "/home/projectx/Desktop/p4git/p4factory/mininet/int_cfg.py", line
147, in setupAndStartNetwork
    self.configSwitches()
  File "/home/projectx/Desktop/p4git/p4factory/mininet/int_cfg.py", line
237, in configSwitches
    self.configSwitch(s)
  File "/home/projectx/Desktop/p4git/p4factory/mininet/int_cfg.py", line
251, in configSwitch
    client.switcht_api_init( device )
  File
"/home/projectx/Desktop/p4git/p4factory/submodules/switch/switchapi/switch_api_thrift/switch_api_rpc.py",
line 1565, in switcht_api_init
    return self.recv_switcht_api_init()
  File
"/home/projectx/Desktop/p4git/p4factory/submodules/switch/switchapi/switch_api_thrift/switch_api_rpc.py",
line 1577, in recv_switcht_api_init
    (fname, mtype, rseqid) = iprot.readMessageBegin()
  File
"/usr/local/lib/python2.7/dist-packages/thrift/protocol/TBinaryProtocol.py",
line 134, in readMessageBegin
    sz = self.readI32()
  File
"/usr/local/lib/python2.7/dist-packages/thrift/protocol/TBinaryProtocol.py",
line 217, in readI32
    buff = self.trans.readAll(4)
  File
"/usr/local/lib/python2.7/dist-packages/thrift/transport/TTransport.py",
line 60, in readAll
    chunk = self.read(sz - have)
  File
"/usr/local/lib/python2.7/dist-packages/thrift/transport/TTransport.py",
line 161, in read
    self.__rbuf = BufferIO(self.__trans.read(max(sz, self.__rbuf_size)))
  File
"/usr/local/lib/python2.7/dist-packages/thrift/transport/TSocket.py", line
132, in read
    message='TSocket read 0 bytes')


*thrift.transport.TTransport.TTransportException: TSocket read 0 bytes*



*And when I try to check the logs for docker image :
:~/Desktop/p4git/p4factory/mininet$ docker exec -t 2497b64adc67
bashroot at spine1:/# cd /tmp*

*<< bash gets stuck at this point>*
Kindly let me know if you need any info, as I have been trying to make it
run since many days. Thanks in advance.

Regards
Manish

On 7 July 2017 at 21:31, Avinash Herle <aherle at barefootnetworks.com> wrote:

> Hi Manish,
>
> Did you get any errors while building and installing the submodules? Looks
> like while starting the containers, the model and driver failed to start.
> You can confirm this by consoling into the docker container (docker exec
> -it <container-name> bash). You'll find logs under /tmp folder. Also, did
> you follow the setup instructions in this readme
> <https://github.com/p4lang/p4factory/tree/master/apps/int>?
>
> Thanks,
> Avinash
>
> On Fri, Jul 7, 2017 at 1:33 AM, Manish Jangid <manish.jangid08 at gmail.com>
> wrote:
>
>> Hello all,
>>
>> Good afternoon, I was going through P4 lists for an issue which had
>> already been faced earlier while running the following example. Could
>> anyone help on how to fix this issue.
>>
>> Thanks in advance
>> Manish
>> [P4-dev] Problem running INT example *Tomer Dragucki* tomerino11 at
>> gmail.com
>> <p4-dev%40lists.p4.org?Subject=Re%3A%20%5BP4-dev%5D%20Problem%20running%20INT%20example&In-Reply-To=%3CCADbk2Si5CF3KUdkNhr-mMS5W0hLk-CT9s_OUeGVYDx-z82%2BhRg%40mail.gmail.com%3E>
>> *Mon Jan 23 13:48:15 EST 2017*
>>
>>    - Previous message (by thread): [P4-dev] p4ofagent
>>    <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/2017-January/000670.html>
>>    - Next message (by thread): [P4-dev] P4-16 architecture and
>>    incremental parser
>>    <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/2017-January/000673.html>
>>    - *Messages sorted by:* [ date ]
>>    <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/2017-January/date.html#671> [
>>    thread ]
>>    <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/2017-January/thread.html#671> [
>>    subject ]
>>    <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/2017-January/subject.html#671> [
>>    author ]
>>    <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/2017-January/author.html#671>
>>
>> ------------------------------
>>
>> Hi,
>> I'm trying to run int app from ntf repoistory as suggested in this issue:https://github.com/p4lang/p4factory/issues/175 (the repository:https://github.com/p4lang/ntf/tree/c68deaa2dbcba253527906ed0d55ae223b332fb9/apps/int
>>  )
>> I have successfully built the switch docker image however I get an
>> exception when I'm trying to run the topology with "sudo
>> ./int_ref_topology.py".
>> Here's the exception:
>>
>> Adding switch spine1
>> Adding switch spine2
>> Adding switch leaf1
>> Adding switch leaf2
>> Waiting 10 seconds for switches to intialize...
>> INT Config  spine1
>> Traceback (most recent call last):
>>   File "./int_ref_topology.py", line 115, in <module>
>>     run_cfg()
>>   File "./int_ref_topology.py", line 91, in run_cfg
>>     net = mgr.setupAndStartNetwork()
>>   File "/home/ntf/mininet/int_cfg.py", line 149, in setupAndStartNetwork
>>     self.configSwitches()
>>   File "/home/ntf/mininet/int_cfg.py", line 233, in configSwitches
>>     self.configSwitch(s)
>>   File "/home/ntf/mininet/int_cfg.py", line 247, in configSwitch
>>     client.switcht_api_init( device )
>>   File
>> "/home/ntf/bmv2/build/switch/switchapi/switch_api_thrift/switch_api_rpc.py",
>> line 1565, in switcht_api_init
>>     return self.recv_switcht_api_init()
>>   File
>> "/home/ntf/bmv2/build/switch/switchapi/switch_api_thrift/switch_api_rpc.py",
>> line 1577, in recv_switcht_api_init
>>     (fname, mtype, rseqid) = iprot.readMessageBegin()
>>   File "build/bdist.linux-x86_64/egg/thrift/protocol/TBinaryProtocol.py",
>> line 126, in readMessageBegin
>>   File "build/bdist.linux-x86_64/egg/thrift/protocol/TBinaryProtocol.py",
>> line 206, in readI32
>>   File "build/bdist.linux-x86_64/egg/thrift/transport/TTransport.py", line
>> 58, in readAll
>>   File "build/bdist.linux-x86_64/egg/thrift/transport/TTransport.py", line
>> 159, in read
>>   File "build/bdist.linux-x86_64/egg/thrift/transport/TSocket.py", line
>> 105, in read
>> socket.error: [Errno 104] Connection reset by peer
>>
>> Have you seen this exception before and know how to fix it?
>> Thank you
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20170123/f9579089/attachment.html>
>>
>> ------------------------------
>>
>>    - Previous message (by thread): [P4-dev] p4ofagent
>>    <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/2017-January/000670.html>
>>    - Next message (by thread): [P4-dev] P4-16 architecture and
>>    incremental parser
>>    <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/2017-January/000673.html>
>>    - *Messages sorted by:* [ date ]
>>    <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/2017-January/date.html#671> [
>>    thread ]
>>    <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/2017-January/thread.html#671> [
>>    subject ]
>>    <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/2017-January/subject.html#671> [
>>    author ]
>>    <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/2017-January/author.html#671>
>>
>> ------------------------------
>> More information about the P4-dev mailing list
>> <http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org>
>>
>>
>> --
>> Thanks
>> Manish Kumar
>>
>>
>>
>>
>>
>>
>> --
>> Thanks
>> Manish Kumar
>>
>>
>>
>>
>> _______________________________________________
>> P4-dev mailing list
>> P4-dev at lists.p4.org
>> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>>
>
>


-- 
Thanks
Manish Kumar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20170707/6bef589c/attachment-0002.html>


More information about the P4-dev mailing list