# Grpc error after installing flow rules

**URL:** <https://forum.p4.org/t/grpc-error-after-installing-flow-rules/1300>\
**Category:** Uncategorized\
**Created:** [April 26, 2025, 11:36am UTC](https://forum.p4.org/t/grpc-error-after-installing-flow-rules/1300 "2025-04-26T11:36:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JOHN](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@JOHN](https://forum.p4.org/u/JOHN)\
**Post date:** [April 26, 2025, 11:36am UTC](https://forum.p4.org/t/grpc-error-after-installing-flow-rules/1300/1 "2025-04-26T11:36:09Z")

</div>

Hi

I wrote a controller in Python that installs flow rules along multiple paths. According to my output logs, everything works fine for a while — flow rules are installed successfully on switch `s12` during the first few times. However, at some point, when installing flow rules, I start getting a `gRPC error` for `s12`.

I’m not sure why this is happening, and I would really appreciate any help or suggestions. Thanks in advance!  
·[11, 29, 30, 12]  
Installed ipv4 rule on s11  
Installed ipv4 rule on s12  
Installed add rule on s11  
Installed delete rule on s12  
[12, 30, 31, 14]  
Installed ipv4 rule on s12  
Installed ipv4 rule on s13  
Installed add rule on s12  
Installed delete rule on s13  
[18, 35, 31, 13]  
Installed ipv4 rule on s17  
Installed ipv4 rule on s13  
Installed add rule on s17  
Installed delete rule on s13  
[1, 36, 21, 25, 26, 35, 29, 30, 31, 14]  
Installed ipv4 rule on s18  
Installed ipv4 rule on s3  
Installed ipv4 rule on s7  
Installed ipv4 rule on s8  
Installed ipv4 rule on s17  
Installed ipv4 rule on s11  
gRPC Error: (UNKNOWN) [/home/p4/tutorials/exercises/myp4/controller.py:396]·

---

<div class="post-metadata">

**Author:** ![andyfingerhut](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.p4.org/andyfingerhut/32/17_2.png) [@andyfingerhut](https://forum.p4.org/u/andyfingerhut)\
**Post date:** [April 26, 2025, 10:12pm UTC](https://forum.p4.org/t/grpc-error-after-installing-flow-rules/1300/2 "2025-04-26T22:12:54Z")

</div>

It appears you are using the p4lang/tutorials repository code from the error message you show.

Most or all of the exercises there create files with names like `s1-p4runtime-requests.txt` in the `logs` directory, which shows the contents of all P4Runtime API messages between the controller and that switch, if the connection between your controller and the switch was created with the right option. For example, the p4runtime exercise does this, using this Python call to create the connection to the switch:

> <https://github.com/p4lang/tutorials/blob/master/exercises/p4runtime/mycontroller.py#L139-L143>

I do not know if any details about grpc errors will appear in that file or not, but it should at least let yo uknow details about the successful ones.
