Skip to content
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

First record does not look like a TLS handshake #272

Open
tsmjay opened this issue Jul 19, 2024 · 2 comments
Open

First record does not look like a TLS handshake #272

tsmjay opened this issue Jul 19, 2024 · 2 comments

Comments

@tsmjay
Copy link

tsmjay commented Jul 19, 2024

Hi,

If I take any of the recent builds of SONiC, run them in GNS3, get a bash shell inside the 'docker-sonic-gnmi' container, and run the example gNMI 'get' command, I get the following:

root@sonic:/# gnmi_get -insecure -username admin -password YourPaSsWoRd -xpath /openconfig-interfaces:interfaces/interface[name=Ethernet0]/config -target_addr 127.0.0.1:8080 -xpath_target OC-YANG
== getRequest:
prefix: <
  target: "OC-YANG"
>
path: <
  origin: "openconfig-interfaces"
  elem: <
    name: "interfaces"
  >
  elem: <
    name: "interface"
    key: <
      key: "name"
      value: "Ethernet0"
    >
  >
  elem: <
    name: "config"
  >
>
encoding: JSON_IETF

F0719 18:58:12.816922      67 gnmi_get.go:145] Get failed: rpc error: code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: tls: first record does not look like a TLS handshake"
root@sonic:/#

I have tested the master, 202405, 202311 and 202305 branches.

Am I missing something?

Thanks.

@fishingfly
Copy link

fishingfly commented Sep 5, 2024

try?

gnmi_get -notls -username admin -password YourPaSsWoRd -xpath /openconfig-interfaces:interfaces/interface[name=Ethernet0]/config -target_addr 127.0.0.1:8080 -xpath_target OC-YANG

@puffc
Copy link

puffc commented Nov 7, 2024

@fishingfly root@sonic:/# gnmi_get -notls -username admin -password YourPaSsWoRd -xpath /openconfig-interfaces:interfaces/interface[name=Ethernet0]/config -target_addr 127.0.0.1:8080 -xpath_target OC-YANG
F1107 08:22:16.200512 1098 gnmi_get.go:86] Dialing to "127.0.0.1:8080" failed: grpc: the credentials require transport level security (use grpc.WithTransportCredentials() to set)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants