cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
220
Views
0
Helpful
4
Replies

IOS-XR Programmabilty Unable to connect via gRPC

kchen-sl
Level 1
Level 1

Hi,

I created an instance IOS XR Programmabilty AlwaysOn-20241126T10472886 in the DevNet self-service lab, always on.

IOS XRv 9000 host SSH port NETCONF port XR bash port gRPC port username password
sandbox-iosxr-1.cisco.com 22 830 57722 57777 admin C1sco12345

I can use ssh to access, and nc -z 57777 to test the gRPC port is also successful.

but using the example at https://github.com/bigevilbeard/grpc_xr_example, it's always timeout.

python examples/grpc_example.py
----------
ExpirationError(code=StatusCode.DEADLINE_EXCEEDED, details="Deadline Exceeded")
Unable to connect to Sandbox, check your gRPC destination and configuration.


i have checked the config on the device, gRPC config is as recommended.

grpc
port 57777
no-tls
address-family ipv4
!

Could someone please assist, I haven't been able to find any relevant questions in the community in this regard.

Thanks a lot,
Kevin

 

Screenshot from 2024-11-27 11-17-35.jpg

Screenshot from 2024-11-27 11-23-16.jpeg

4 Replies 4

Jesus Illescas
Cisco Employee
Cisco Employee

I tested and got the same error as you. So I increased the timeout and got a different error.

❯ gnmic -a sandbox-iosxr-1.cisco.com:57777 -u admin -p C1sco12345 --insecure capabilities --timeout 70s
target "sandbox-iosxr-1.cisco.com:57777", capabilities request failed: "sandbox-iosxr-1.cisco.com:57777" CapabilitiesRequest failed: rpc error: code = Unavailable desc = connection error: desc = "error reading server preface: read tcp 10.209.204.202:59538->131.226.217.150:57777: use of closed network connection"
Error: one or more requests failed

Reviewing the traces, I can see the error

RP/0/RP0/CPU0:sandbox-iosxr-1.cisco.com(config-grpc)#do show grpc trace all reverse | i err
Nov 28 14:06:02.334 ems/errors 0/RP0/CPU0 t9019 EMS-ERR: Accept:259 Accept failed (accept tcp4 0.0.0.0:57777: use of closed network connection)
Nov 28 13:52:30.647 ems/errors 0/RP0/CPU0 t9076 EMS-ERR: Accept:259 Accept failed (accept tcp4 0.0.0.0:57777: use of closed network connection)
Nov 28 13:45:30.176 ems/errors 0/RP0/CPU0 t9019 EMS-ERR: Accept:259 Accept failed (accept tcp4 0.0.0.0:57777: use of closed network connection)

Unfortunately, removing gRPC, trying different configuration options don't appear to fix it. I'm not sure where the error is, but will keep trying.

 

 

Thanks a lot, that's right, I also have seen this while troubleshooting on client side.

Some information I found suggests a firewall in between reset the connection which means this might have to be discussed with cisco infrastructure team but I have never seen a complete thread so far, so useful information is very limited.

hi Jesús, i just tried again today, and magically, it's working fine now.

Screenshot from 2024-12-02 10-48-56.png

 

Jesus Illescas
Cisco Employee
Cisco Employee

Hi @kchen-sl indeed, is working now. Strange. From my side I didn't change anything and I don't see something relevant in the logs. I guess we will keep an eye on it.