[P4-dev] GRPC error on p4runtime tutorial - StatusCode.UNIMPLEMENTED?

Vivek Gopalan vivek.gopalan at yale.edu
Tue Jul 3 12:44:15 EDT 2018


Realized I didnt reply all -
Thank you for the prompt response. I've tried both make stop & make clean
as well as restarting the vm but unfortunately gRPC still returns an
UNIMPLEMENTED error code.
When running:
$netstat -lpnt
after make stop + clean, there are no processes listening to
50051/50052/50053. However, there are processes listening to those ports
after running make (so I think this is working as intended).
The error is being thrown on this line in grpc/_channel.py:
313 - if self._state.code is None:
-->
324 - else: raise self
Am unsure why _state.code differs from expected but hopefully this can
share some insight on the error.

Best,
Vivek

On Mon, Jul 2, 2018, 5:42 AM cs.lev <cs.lev at gmx.com> wrote:

> Dear Vivek,
>
> I have run into this problem a couple of times, and the solution or
> things that were missing was a proper stop/clean of mininet (and its
> child processes).
>
> In the beginning, it was working for me, but for some reason later on,
> when mininet was restarted older processes were stuck and were
> "consuming/reserving" the gRPC ports, which, as you might have seen,
> hardcoded (e.g., 50051) into the mycontroller.py.
>
> If you do a make stop and make clean, or even restart the VM in the
> worst case, then it should work.
>
> $ netstat -punate |grep 500
> may also be for your help.
>
> for debugging, after mininet is fired up, but before you start the
> controller, use also netstat to find out whether there is someone
> listening to those ports (e.g., 50051).
>
> Cheers,
> Levi
>
> On Fri, 2018-06-29 at 20:32 -0400, Vivek Gopalan wrote:
> > Hi All,
> > I'm a student aiming to make use of the p4runtime API this summer and
> > am in the process of going through the tutorials. I've run into this
> > error when running mycontroller.py and have not found a similar error
> > log online.
> > > Traceback (most recent call last):
> > >   File "./mycontroller.py", line 222, in <module>
> > >     main(args.p4info, args.bmv2_json)
> > >   File "./mycontroller.py", line 167, in main
> > >     s1.MasterArbitrationUpdate()
> > >   File
> > > "/home/vagrant/tutorials/exercises/p4runtime/../../utils/p4runtime_
> > > lib/switch.py", line 68, in MasterArbitrationUpdate
> > >     for item in self.stream_msg_resp:
> > >   File "/usr/local/lib/python2.7/dist-packages/grpc/_channel.py",
> > > line 344, in next
> > >     return self._next()
> > >   File "/usr/local/lib/python2.7/dist-packages/grpc/_channel.py",
> > > line 324, in _next
> > >     raise self
> > > grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with
> > > (StatusCode.UNIMPLEMENTED, )>
> >
> > Am running this on the vagrant vm - did not run into problems on the
> > installation though "unimplemented" makes me believe something is
> > missing from my install of p4runtime. Please let me know if any of
> > y'all have run into this problem & have a potential solution!
> >
> > Best,
> > Vivek
> >
> >
> > --
> > Vivek Gopalan
> > Yale 2021
> > _______________________________________________
> > P4-dev mailing list
> > P4-dev at lists.p4.org
> > http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20180703/1d351e1d/attachment.html>


More information about the P4-dev mailing list