11-27-2024 05:44 PM
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
11-28-2024 05:41 AM
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.
11-28-2024 05:14 PM
12-01-2024 04:50 PM
hi Jesús, i just tried again today, and magically, it's working fine now.
12-01-2024 11:30 PM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide