openconfig / gnmic

gNMIc is a gNMI CLI client and collector
https://gnmic.openconfig.net
Apache License 2.0
166 stars 52 forks source link

Facing missing port in address error with gnmic version 0.36.2 for Dial out streaming #439

Closed ektanehwal closed 2 months ago

ektanehwal commented 2 months ago

I was trying to run gnmic dial out streaming with version 0.36.2 and getting missing port in address while it is working fine with version 0.36.0. Is there any change in the config or something which I am missing in this version? I have attached the error logs, current YAML file and gnmic version output. Also, dial-in streaming is working fine. I am seeing this error with dial out only.

Error Logs:

2024/05/08 05:30:41.389533 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.61.0/grpclog/logger.go:65: [gnmic] [core] [Channel #5 SubChannel #6] grpc: addrConn.createTransport failed to connect to {Addr: "123;ABCXYZ;SLOT1;REL12", ServerName: "123;ABCXYZ;SLOT1;REL12", }. Err: connection error: desc = "transport: Error while dialing: dial tcp: address 123;ABCXYZ;SLOT1;REL12: missing port in address"
2024/05/08 05:30:41.389554 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.61.0/grpclog/logger.go:53: [gnmic] [core] [Channel #5 SubChannel #6] Subchannel Connectivity change to TRANSIENT_FAILURE, last error: connection error: desc = "transport: Error while dialing: dial tcp: address 123;ABCXYZ;SLOT1;REL12: missing port in address"

2024/05/08 05:30:41.389570 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.61.0/grpclog/logger.go:53: [gnmic] [core] [pick-first-lb 0xc0007ef5f0] Received SubConn state update: 0xc0007efbf0, {ConnectivityState:TRANSIENT_FAILURE ConnectionError:connection error: desc = "transport: Error while dialing: dial tcp: address 123;ABCXYZ;SLOT1;REL12: missing port in address"}
2024/05/08 05:30:42.567712 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.61.0/grpclog/logger.go:53: [gnmic] [core] [Channel #5] Channel Connectivity change to SHUTDOWN
2024/05/08 05:30:42.567752 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.61.0/grpclog/logger.go:53: [gnmic] [core] [Channel #5] Closing the name resolver
2024/05/08 05:30:42.567766 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.61.0/grpclog/logger.go:53: [gnmic] [core] [Channel #5] ccBalancerWrapper: closing

Below is the YAML file: bash-4.4$ gnmic --config 1.yaml --use-tunnel-server -e ascii --mode STREAM --stream-mode SAMPLE sub --sample-interval 10s --path "/shelves" --debug

bash-4.4$ cat 1.yaml 
insecure: true
username: ADMIN
password: ADMIN
log: true

tunnel-server:
  # the address the tunnel server will listen to
  insecure: true
  timeout: 100s
  address: ":50051" 
  # the wait time before triggering unary RPCs or subscribe poll/once
  target-wait-time: 20s
  # enables the collection of Prometheus gRPC server metrics
  enable-metrics: false
  # enable additional debug logs
  debug: true

bash-4.4$ gnmic version
 version : 0.36.2
 commit : a7844a6d
 date : 2024-03-05T20:10:26Z
 gitURL : https://github.com/openconfig/gnmic
 docs : https://gnmic.openconfig.net
karimra commented 2 months ago

This should be fixed in 0.37.0, thanks for reporting it.