-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why gnmi_get work, but py_gnmicli.py NOT work ? #91
Comments
Don't see the pcap, but my guess is it's related to authentication or encryption of the gRPC channel, being you've used "-insecure = True" on the Go client. You may need to use the "-o" flag to specify the CN in the Cert being utilized on the Target (assuming it's a self-signed cert?) |
The server side start command use '--insecure', which is:
Which is NOT use any cert or CN ? And server side is written by GO, using "google.golang.org/grpc" I guess, is there some additional process between /usr/sbin/telemetry(server side, GO) and gnmi_get(client side, GO), like server send it's cert to client? I think this may be problem? So is there '--insecure' option in py_gnmicli.py? This may be the ROOT CAUSE? |
Last, by searching code, I found this is really because of '-insecure' and '-allow_no_client_auth'. In server side, which is SONiC/TELEMETRY I start /usr/sbin/telemetry with '-insecure' mode.
I start /usr/sbin/telemetry with '-allow_no_client_auth' mode. code like this:
So I follow gnmi_get, use py_gnmicli.py by '-g -o 172.18.8.241' option, but still failed, like this:
|
Yep, looks related to encryption "TSI_PROTOCOL_FAILURE". You can add the --debug flag to see more. Is the CN of the test certificate really "172.18.8.241"? |
|
Why I use cert, also could NOT work? I generate cert by:
I copy cert to server side:
I start SONiC/TELEMETRY with cert:
I use py_gnmicli.py to request:
Detail of failure:
|
is this problem resolved? |
It's a certificate verification problem: "So is there '--insecure' option in py_gnmicli.py?" |
I can confirm it is the cert issue. When the server starts with certs, I can use following commands to get the data.
I haven't figure out how to support the --insecure option in py_gnmicli.py yet. |
Hi all,
I write gnmi server follow SONiC/TELEMETRY. The server side start command use '--insecure', which is:
And server side is written by GO, using "google.golang.org/grpc"
And I use gnmi_get as gnmi client, and it works, like this:
And this is written by GO, using "google.golang.org/grpc"
But when I change to py_gnmicli.py, it NOT work, like this, WHY ???
And this is written by PYTHON, using "grpc"
Then I capture TCP message using tcpdump, I found:
The text was updated successfully, but these errors were encountered: