openconfig / gnmic

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

rpc error: code = InvalidArgument desc = request must contain a prefix #40

Closed gavmckee80 closed 1 year ago

gavmckee80 commented 1 year ago

Hi,

Can someone help me understand why I'm getting the following errors?

I can get the output from capabilities request . But when I try to stream data for all counters , I'm getting invalid prefix.

gmckee@lab-dev-vm1:~/Projects/scripts/public$ gnmic -a 10.127.5.15 --port 9339 --skip-verify capabilities
gNMI version: 0.7.0
supported models:
  - nvidia-wjh, NVIDIA, 1.0.1
  - nvidia-if-ethernet-counters-ext, NVIDIA, 1.0.0
  - openconfig-interfaces, OpenConfig, 2.3.2
  - openconfig-if-ethernet, OpenConfig, 2.9.0
  - openconfig-if-ethernet-ext, OpenConfig, 0.1.1
  - openconfig-system, OpenConfig, 0.5.0
  - openconfig-lldp, OpenConfig, 0.2.1
  - openconfig-platform, OpenConfig, 0.13.0
supported encodings:
  - JSON

gmckee@lab-dev-vm1:~/Projects/scripts/public$ gnmic -a 10.127.5.15 --port 9339 --skip-verify subscribe --path "openconfig-if-ethernet:/ethernet/interface/state/counters" --stream-mode on-change --heartbeat-interval 1m -d
2023/02/06 22:53:50.939535 /home/runner/work/gnmic/gnmic/app/app.go:216: [gnmic] version=0.28.0, commit=8315400, date=2022-12-07T17:02:16Z, gitURL=https://github.com/openconfig/gnmic, docs=https://gnmic.openconfig.net
2023/02/06 22:53:50.940112 /home/runner/work/gnmic/gnmic/app/app.go:221: [gnmic] using config file ""
2023/02/06 22:53:50.941067 /home/runner/work/gnmic/gnmic/app/app.go:259: [gnmic] set flags/config:
address:
- 10.127.5.15
api: ""
capabilities-version: false
cluster-name: default-cluster
config: ""
debug: true
diff-compare: []
diff-model: []
diff-path: []
diff-prefix: ""
diff-qos: "0"
diff-ref: ""
diff-sub: false
diff-target: ""
diff-type: ALL
dir: []
encoding: json
exclude: []
file: []
format: ""
generate-camel-case: false
generate-config-only: false
generate-path: ""
generate-snake-case: false
get-model: []
get-path: []
get-prefix: ""
get-processor: []
get-target: ""
get-type: ALL
get-values-only: false
getset-condition: any([true])
getset-delete: ""
getset-get: ""
getset-model: []
getset-prefix: ""
getset-replace: ""
getset-target: ""
getset-type: ALL
getset-update: ""
getset-value: ""
gzip: false
insecure: false
instance-name: ""
listen-max-concurrent-streams: "256"
listen-prometheus-address: ""
log: true
log-file: ""
log-tls-secret: false
max-msg-size: 536870912
no-prefix: false
password: ""
path-config-only: false
path-descr: false
path-path-type: xpath
path-search: false
path-state-only: false
path-types: false
path-with-non-leaves: false
path-with-prefix: false
port: "9339"
print-request: false
prompt-description-bg-color: dark_gray
prompt-description-with-prefix: false
prompt-description-with-types: false
prompt-max-suggestions: "10"
prompt-prefix-color: dark_blue
prompt-suggest-all-flags: false
prompt-suggest-with-origin: false
prompt-suggestions-bg-color: dark_blue
proto-dir: []
proto-file: []
proxy-from-env: false
retry: 10s
set-delete: []
set-delimiter: ':::'
set-dry-run: false
set-prefix: ""
set-replace: []
set-replace-file: []
set-replace-path: []
set-replace-value: []
set-request-file: []
set-request-replace: []
set-request-update: []
set-request-vars: ""
set-target: ""
set-update: []
set-update-file: []
set-update-path: []
set-update-value: []
skip-verify: true
subscribe-backoff: 0s
subscribe-heartbeat-interval: 1m0s
subscribe-history-end: ""
subscribe-history-snapshot: ""
subscribe-history-start: ""
subscribe-lock-retry: 5s
subscribe-mode: stream
subscribe-model: []
subscribe-name: []
subscribe-output: []
subscribe-path:
- openconfig-if-ethernet:/ethernet/interface/state/counters
subscribe-prefix: ""
subscribe-qos: "0"
subscribe-quiet: false
subscribe-sample-interval: 0s
subscribe-set-target: false
subscribe-stream-mode: on-change
subscribe-suppress-redundant: false
subscribe-target: ""
subscribe-updates-only: false
subscribe-watch-config: false
targets-file: ""
timeout: 10s
tls-ca: ""
tls-cert: ""
tls-key: ""
tls-max-version: ""
tls-min-version: ""
tls-version: ""
token: ""
upgrade-use-pkg: false
use-tunnel-server: false
username: ""

2023/02/06 22:53:50.949789 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] address='[10.127.5.15]'([]string)
2023/02/06 22:53:50.949815 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] debug='true'(bool)
2023/02/06 22:53:50.949864 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] port='9339'(string)
2023/02/06 22:53:50.949895 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] skip-verify='true'(bool)
2023/02/06 22:53:50.949904 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] subscribe-heartbeat-interval='1m0s'(string)
2023/02/06 22:53:50.949928 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] subscribe-path='[openconfig-if-ethernet:/ethernet/interface/state/counters]'([]string)
2023/02/06 22:53:50.949940 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] subscribe-stream-mode='on-change'(string)
2023/02/06 22:53:50.949993 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=backoff, changed=false, isSetInFile=false
2023/02/06 22:53:50.950004 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=heartbeat-interval, changed=true, isSetInFile=true
2023/02/06 22:53:50.950013 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=help, changed=false, isSetInFile=false
2023/02/06 22:53:50.950021 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=history-end, changed=false, isSetInFile=false
2023/02/06 22:53:50.950029 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=history-snapshot, changed=false, isSetInFile=false
2023/02/06 22:53:50.950038 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=history-start, changed=false, isSetInFile=false
2023/02/06 22:53:50.950047 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=lock-retry, changed=false, isSetInFile=false
2023/02/06 22:53:50.950054 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=mode, changed=false, isSetInFile=false
2023/02/06 22:53:50.950063 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=model, changed=false, isSetInFile=false
2023/02/06 22:53:50.950071 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=name, changed=false, isSetInFile=false
2023/02/06 22:53:50.950079 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=output, changed=false, isSetInFile=false
2023/02/06 22:53:50.950089 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=path, changed=true, isSetInFile=true
2023/02/06 22:53:50.950096 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=prefix, changed=false, isSetInFile=false
2023/02/06 22:53:50.950104 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=qos, changed=false, isSetInFile=false
2023/02/06 22:53:50.950112 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=quiet, changed=false, isSetInFile=false
2023/02/06 22:53:50.950120 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=sample-interval, changed=false, isSetInFile=false
2023/02/06 22:53:50.950128 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=set-target, changed=false, isSetInFile=false
2023/02/06 22:53:50.950136 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=stream-mode, changed=true, isSetInFile=true
2023/02/06 22:53:50.950144 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=suppress-redundant, changed=false, isSetInFile=false
2023/02/06 22:53:50.950152 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=target, changed=false, isSetInFile=false
2023/02/06 22:53:50.950160 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=updates-only, changed=false, isSetInFile=false
2023/02/06 22:53:50.950168 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=watch-config, changed=false, isSetInFile=false
2023/02/06 22:53:50.950254 /home/runner/work/gnmic/gnmic/config/subscriptions.go:72: [config] subscriptions: map[default-1675724030:{"name":"default-1675724030","paths":["openconfig-if-ethernet:/ethernet/interface/state/counters"],"mode":"stream","stream-mode":"on-change","encoding":"json","heartbeat-interval":60000000000}]
2023/02/06 22:53:50.950281 /home/runner/work/gnmic/gnmic/config/outputs.go:60: [config] outputs: map[default-stdout:map[file-type:stdout format: type:file]]
2023/02/06 22:53:50.950290 /home/runner/work/gnmic/gnmic/config/inputs.go:57: [config] inputs: map[]
2023/02/06 22:53:50.950298 /home/runner/work/gnmic/gnmic/config/actions.go:49: [config] actions: map[]
2023/02/06 22:53:50.950307 /home/runner/work/gnmic/gnmic/config/processors.go:45: [config] processors: map[]
2023/02/06 22:53:50.950378 /home/runner/work/gnmic/gnmic/config/targets.go:45: [config] targets: map[10.127.5.15:{"name":"10.127.5.15","address":"10.127.5.15:9339","username":"","password":"****","timeout":10000000000,"insecure":false,"tls-cert":"","tls-key":"","skip-verify":true,"buffer-size":100,"retry-timer":10000000000,"log-tls-secret":false,"gzip":false,"token":""}]
2023/02/06 22:53:50.950402 /home/runner/work/gnmic/gnmic/app/outputs.go:27: [gnmic] starting output type file
2023/02/06 22:53:50.950446 /home/runner/work/gnmic/gnmic/app/gnmi_client_subscribe.go:73: [gnmic] queuing target "10.127.5.15"
2023/02/06 22:53:50.950453 /home/runner/work/gnmic/gnmic/app/gnmi_client_subscribe.go:75: [gnmic] subscribing to target: "10.127.5.15"
2023/02/06 22:53:50.950507 /home/runner/work/gnmic/gnmic/app/collector.go:41: [gnmic] starting target &{Config:{"name":"10.127.5.15","address":"10.127.5.15:9339","username":"","password":"****","timeout":10000000000,"insecure":false,"tls-cert":"","tls-key":"","skip-verify":true,"buffer-size":100,"retry-timer":10000000000,"log-tls-secret":false,"gzip":false,"token":""} Subscriptions:map[default-1675724030:{"name":"default-1675724030","paths":["openconfig-if-ethernet:/ethernet/interface/state/counters"],"mode":"stream","stream-mode":"on-change","encoding":"json","heartbeat-interval":60000000000}] m:0xc000302340 conn:<nil> Client:<nil> SubscribeClients:map[] subscribeCancelFn:map[] pollChan:0xc000aba120 subscribeResponses:0xc000118cc0 errors:0xc000118d20 stopped:false StopChan:0xc000aba180 Cfn:<nil> RootDesc:<nil>}
2023/02/06 22:53:50.950517 /home/runner/work/gnmic/gnmic/app/collector.go:59: [gnmic] starting target "10.127.5.15" listener
2023/02/06 22:53:50.950561 /home/runner/work/gnmic/gnmic/outputs/file/file_output.go:203: [file_output:default-stdout] initialized file output: {"Cfg":{"FileName":"","FileType":"stdout","Format":"json","Multiline":true,"Indent":"  ","Separator":"\n","OverrideTimestamps":false,"AddTarget":"","TargetTemplate":"","EventProcessors":null,"MsgTemplate":"","ConcurrencyLimit":1000,"EnableMetrics":false,"Debug":false}}
2023/02/06 22:53:50.950612 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel created
2023/02/06 22:53:50.950630 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] original dial target is: "10.127.5.15:9339"
2023/02/06 22:53:50.950643 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] dial target "10.127.5.15:9339" parse failed: parse "10.127.5.15:9339": first path segment in URL cannot contain colon
2023/02/06 22:53:50.950651 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] fallback to scheme "passthrough"
2023/02/06 22:53:50.950671 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] parsed dial target is: {Scheme:passthrough Authority: Endpoint:10.127.5.15:9339 URL:{Scheme:passthrough Opaque: User: Host: Path:/10.127.5.15:9339 RawPath: ForceQuery:false RawQuery: Fragment: RawFragment:}}
2023/02/06 22:53:50.950680 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel authority set to "10.127.5.15:9339"
2023/02/06 22:53:50.950794 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Resolver state updated: {
  "Addresses": [
    {
      "Addr": "10.127.5.15:9339",
      "ServerName": "",
      "Attributes": null,
      "BalancerAttributes": null,
      "Type": 0,
      "Metadata": null
    }
  ],
  "ServiceConfig": null,
  "Attributes": null
} (resolver returned new addresses)
2023/02/06 22:53:50.950820 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel switches to new LB policy "pick_first"
2023/02/06 22:53:50.950836 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel created
2023/02/06 22:53:50.950861 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel Connectivity change to CONNECTING
2023/02/06 22:53:50.950875 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel picks a new address "10.127.5.15:9339" to connect
2023/02/06 22:53:50.950890 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] pickfirstBalancer: UpdateSubConnState: 0xc0006d8040, {CONNECTING <nil>}
2023/02/06 22:53:50.950909 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel Connectivity change to CONNECTING
2023/02/06 22:53:50.976621 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel Connectivity change to READY
2023/02/06 22:53:50.976639 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] pickfirstBalancer: UpdateSubConnState: 0xc0006d8040, {READY <nil>}
2023/02/06 22:53:50.976644 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel Connectivity change to READY
2023/02/06 22:53:50.976654 /home/runner/work/gnmic/gnmic/app/gnmi_client_subscribe.go:215: [gnmic] target "10.127.5.15" gNMI client created
2023/02/06 22:53:50.977046 /home/runner/work/gnmic/gnmic/app/gnmi_client_subscribe.go:218: [gnmic] sending gNMI SubscribeRequest: subscribe='subscribe:{subscription:{path:{origin:"openconfig-if-ethernet" elem:{name:"ethernet"} elem:{name:"interface"} elem:{name:"state"} elem:{name:"counters"}} mode:ON_CHANGE heartbeat_interval:60000000000}}', mode='STREAM', encoding='JSON', to 10.127.5.15
2023/02/06 22:53:50.978018 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675724030 rcv error: rpc error: code = InvalidArgument desc = request must contain a prefix &gnmi.SubscribeRequest{state:impl.MessageState{NoUnkeyedLiterals:pragma.NoUnkeyedLiterals{}, DoNotCompare:pragma.DoNotCompare{}, DoNotCopy:pragma.DoNotCopy{}, atomicMessageInfo:(*impl.MessageInfo)(0xc000057a88)}, sizeCache:0, unknownFields:[]uint8(nil), Request:(*gnmi.SubscribeRequest_Subscribe)(0xc0015ab018), Extension:[]*gnmi_ext.Extension(nil)}
2023/02/06 22:53:50.978034 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675724030 rcv error: retrying in 10s
2023/02/06 22:54:00.980265 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675724030 rcv error: rpc error: code = InvalidArgument desc = request must contain a prefix &gnmi.SubscribeRequest{state:impl.MessageState{NoUnkeyedLiterals:pragma.NoUnkeyedLiterals{}, DoNotCompare:pragma.DoNotCompare{}, DoNotCopy:pragma.DoNotCopy{}, atomicMessageInfo:(*impl.MessageInfo)(0xc000057a88)}, sizeCache:0, unknownFields:[]uint8(nil), Request:(*gnmi.SubscribeRequest_Subscribe)(0xc002c68010), Extension:[]*gnmi_ext.Extension(nil)}
2023/02/06 22:54:00.980319 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675724030 rcv error: retrying in 10s
2023/02/06 22:54:10.981806 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675724030 rcv error: rpc error: code = InvalidArgument desc = request must contain a prefix &gnmi.SubscribeRequest{state:impl.MessageState{NoUnkeyedLiterals:pragma.NoUnkeyedLiterals{}, DoNotCompare:pragma.DoNotCompare{}, DoNotCopy:pragma.DoNotCopy{}, atomicMessageInfo:(*impl.MessageInfo)(0xc000057a88)}, sizeCache:0, unknownFields:[]uint8(nil), Request:(*gnmi.SubscribeRequest_Subscribe)(0xc002c687f8), Extension:[]*gnmi_ext.Extension(nil)}
2023/02/06 22:54:10.981851 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675724030 rcv error: retrying in 10s
2023/02/06 22:54:20.983900 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675724030 rcv error: rpc error: code = InvalidArgument desc = request must contain a prefix &gnmi.SubscribeRequest{state:impl.MessageState{NoUnkeyedLiterals:pragma.NoUnkeyedLiterals{}, DoNotCompare:pragma.DoNotCompare{}, DoNotCopy:pragma.DoNotCopy{}, atomicMessageInfo:(*impl.MessageInfo)(0xc000057a88)}, sizeCache:0, unknownFields:[]uint8(nil), Request:(*gnmi.SubscribeRequest_Subscribe)(0xc0014cd890), Extension:[]*gnmi_ext.Extension(nil)}
2023/02/06 22:54:20.983947 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675724030 rcv error: retrying in 10s
karimra commented 1 year ago

It looks like the target expects a prefix to be set in the request: Just a guess: Try splitting the path into a prefix and a path like this: --prefix "openconfig-if-ethernet:/ethernet" --path "/interface/state/counters".

I would check the router's documentation for any requirements on the request format and supported paths.

gavmckee80 commented 1 year ago

Hi @karimra

https://docs.nvidia.com/networking-ethernet-software/cumulus-netq-44/Manage-Configuration/Manage-Events-and-Notifications/gNMI-Streaming/#supported-models

Looks like it supports the models.

What i see now is missing target .

gnmic -a 10.127.5.15 --port 9339 --skip-verify subscribe \
--prefix "openconfig-if-ethernet:/ethernet" \
--path "/interface/state/counters" \
--stream-mode on-change --heartbeat-interval 1m -d
2023/02/06 23:28:20.649819 /home/runner/work/gnmic/gnmic/app/app.go:216: [gnmic] version=0.28.0, commit=8315400, date=2022-12-07T17:02:16Z, gitURL=https://github.com/openconfig/gnmic, docs=https://gnmic.openconfig.net
2023/02/06 23:28:20.649887 /home/runner/work/gnmic/gnmic/app/app.go:221: [gnmic] using config file ""
2023/02/06 23:28:20.651319 /home/runner/work/gnmic/gnmic/app/app.go:259: [gnmic] set flags/config:
address:
- 10.127.5.15
api: ""
capabilities-version: false
cluster-name: default-cluster
config: ""
debug: true
diff-compare: []
diff-model: []
diff-path: []
diff-prefix: ""
diff-qos: "0"
diff-ref: ""
diff-sub: false
diff-target: ""
diff-type: ALL
dir: []
encoding: json
exclude: []
file: []
format: ""
generate-camel-case: false
generate-config-only: false
generate-path: ""
generate-snake-case: false
get-model: []
get-path: []
get-prefix: ""
get-processor: []
get-target: ""
get-type: ALL
get-values-only: false
getset-condition: any([true])
getset-delete: ""
getset-get: ""
getset-model: []
getset-prefix: ""
getset-replace: ""
getset-target: ""
getset-type: ALL
getset-update: ""
getset-value: ""
gzip: false
insecure: false
instance-name: ""
listen-max-concurrent-streams: "256"
listen-prometheus-address: ""
log: true
log-file: ""
log-tls-secret: false
max-msg-size: 536870912
no-prefix: false
password: ""
path-config-only: false
path-descr: false
path-path-type: xpath
path-search: false
path-state-only: false
path-types: false
path-with-non-leaves: false
path-with-prefix: false
port: "9339"
print-request: false
prompt-description-bg-color: dark_gray
prompt-description-with-prefix: false
prompt-description-with-types: false
prompt-max-suggestions: "10"
prompt-prefix-color: dark_blue
prompt-suggest-all-flags: false
prompt-suggest-with-origin: false
prompt-suggestions-bg-color: dark_blue
proto-dir: []
proto-file: []
proxy-from-env: false
retry: 10s
set-delete: []
set-delimiter: ':::'
set-dry-run: false
set-prefix: ""
set-replace: []
set-replace-file: []
set-replace-path: []
set-replace-value: []
set-request-file: []
set-request-replace: []
set-request-update: []
set-request-vars: ""
set-target: ""
set-update: []
set-update-file: []
set-update-path: []
set-update-value: []
skip-verify: true
subscribe-backoff: 0s
subscribe-heartbeat-interval: 1m0s
subscribe-history-end: ""
subscribe-history-snapshot: ""
subscribe-history-start: ""
subscribe-lock-retry: 5s
subscribe-mode: stream
subscribe-model: []
subscribe-name: []
subscribe-output: []
subscribe-path:
- /interface/state/counters
subscribe-prefix: openconfig-if-ethernet:/ethernet
subscribe-qos: "0"
subscribe-quiet: false
subscribe-sample-interval: 0s
subscribe-set-target: false
subscribe-stream-mode: on-change
subscribe-suppress-redundant: false
subscribe-target: ""
subscribe-updates-only: false
subscribe-watch-config: false
targets-file: ""
timeout: 10s
tls-ca: ""
tls-cert: ""
tls-key: ""
tls-max-version: ""
tls-min-version: ""
tls-version: ""
token: ""
upgrade-use-pkg: false
use-tunnel-server: false
username: ""

2023/02/06 23:28:20.651627 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] address='[10.127.5.15]'([]string)
2023/02/06 23:28:20.651652 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] debug='true'(bool)
2023/02/06 23:28:20.651740 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] port='9339'(string)
2023/02/06 23:28:20.651812 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] skip-verify='true'(bool)
2023/02/06 23:28:20.651830 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] subscribe-heartbeat-interval='1m0s'(string)
2023/02/06 23:28:20.651874 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] subscribe-path='[/interface/state/counters]'([]string)
2023/02/06 23:28:20.651890 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] subscribe-prefix='openconfig-if-ethernet:/ethernet'(string)
2023/02/06 23:28:20.651907 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] subscribe-stream-mode='on-change'(string)
2023/02/06 23:28:20.652013 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=backoff, changed=false, isSetInFile=false
2023/02/06 23:28:20.652047 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=heartbeat-interval, changed=true, isSetInFile=true
2023/02/06 23:28:20.652063 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=help, changed=false, isSetInFile=false
2023/02/06 23:28:20.652076 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=history-end, changed=false, isSetInFile=false
2023/02/06 23:28:20.652092 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=history-snapshot, changed=false, isSetInFile=false
2023/02/06 23:28:20.652109 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=history-start, changed=false, isSetInFile=false
2023/02/06 23:28:20.652125 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=lock-retry, changed=false, isSetInFile=false
2023/02/06 23:28:20.652142 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=mode, changed=false, isSetInFile=false
2023/02/06 23:28:20.652158 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=model, changed=false, isSetInFile=false
2023/02/06 23:28:20.652174 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=name, changed=false, isSetInFile=false
2023/02/06 23:28:20.652190 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=output, changed=false, isSetInFile=false
2023/02/06 23:28:20.652274 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=path, changed=true, isSetInFile=true
2023/02/06 23:28:20.652289 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=prefix, changed=true, isSetInFile=true
2023/02/06 23:28:20.652301 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=qos, changed=false, isSetInFile=false
2023/02/06 23:28:20.652318 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=quiet, changed=false, isSetInFile=false
2023/02/06 23:28:20.652336 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=sample-interval, changed=false, isSetInFile=false
2023/02/06 23:28:20.652354 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=set-target, changed=false, isSetInFile=false
2023/02/06 23:28:20.652370 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=stream-mode, changed=true, isSetInFile=true
2023/02/06 23:28:20.652385 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=suppress-redundant, changed=false, isSetInFile=false
2023/02/06 23:28:20.652400 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=target, changed=false, isSetInFile=false
2023/02/06 23:28:20.652416 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=updates-only, changed=false, isSetInFile=false
2023/02/06 23:28:20.652432 /home/runner/work/gnmic/gnmic/config/config.go:364: [config] cmd=subscribe, flagName=watch-config, changed=false, isSetInFile=false
2023/02/06 23:28:20.652603 /home/runner/work/gnmic/gnmic/config/subscriptions.go:72: [config] subscriptions: map[default-1675726100:{"name":"default-1675726100","prefix":"openconfig-if-ethernet:/ethernet","paths":["/interface/state/counters"],"mode":"stream","stream-mode":"on-change","encoding":"json","heartbeat-interval":60000000000}]
2023/02/06 23:28:20.652657 /home/runner/work/gnmic/gnmic/config/outputs.go:60: [config] outputs: map[default-stdout:map[file-type:stdout format: type:file]]
2023/02/06 23:28:20.652677 /home/runner/work/gnmic/gnmic/config/inputs.go:57: [config] inputs: map[]
2023/02/06 23:28:20.652701 /home/runner/work/gnmic/gnmic/config/actions.go:49: [config] actions: map[]
2023/02/06 23:28:20.652717 /home/runner/work/gnmic/gnmic/config/processors.go:45: [config] processors: map[]
2023/02/06 23:28:20.652858 /home/runner/work/gnmic/gnmic/config/targets.go:45: [config] targets: map[10.127.5.15:{"name":"10.127.5.15","address":"10.127.5.15:9339","username":"","password":"****","timeout":10000000000,"insecure":false,"tls-cert":"","tls-key":"","skip-verify":true,"buffer-size":100,"retry-timer":10000000000,"log-tls-secret":false,"gzip":false,"token":""}]
2023/02/06 23:28:20.652912 /home/runner/work/gnmic/gnmic/app/outputs.go:27: [gnmic] starting output type file
2023/02/06 23:28:20.652991 /home/runner/work/gnmic/gnmic/app/gnmi_client_subscribe.go:73: [gnmic] queuing target "10.127.5.15"
2023/02/06 23:28:20.653114 /home/runner/work/gnmic/gnmic/app/collector.go:41: [gnmic] starting target &{Config:{"name":"10.127.5.15","address":"10.127.5.15:9339","username":"","password":"****","timeout":10000000000,"insecure":false,"tls-cert":"","tls-key":"","skip-verify":true,"buffer-size":100,"retry-timer":10000000000,"log-tls-secret":false,"gzip":false,"token":""} Subscriptions:map[default-1675726100:{"name":"default-1675726100","prefix":"openconfig-if-ethernet:/ethernet","paths":["/interface/state/counters"],"mode":"stream","stream-mode":"on-change","encoding":"json","heartbeat-interval":60000000000}] m:0xc000a4d040 conn:<nil> Client:<nil> SubscribeClients:map[] subscribeCancelFn:map[] pollChan:0xc0000643c0 subscribeResponses:0xc00016c900 errors:0xc00016c960 stopped:false StopChan:0xc000064420 Cfn:<nil> RootDesc:<nil>}
2023/02/06 23:28:20.653139 /home/runner/work/gnmic/gnmic/app/collector.go:59: [gnmic] starting target "10.127.5.15" listener
2023/02/06 23:28:20.653172 /home/runner/work/gnmic/gnmic/app/gnmi_client_subscribe.go:75: [gnmic] subscribing to target: "10.127.5.15"
2023/02/06 23:28:20.653271 /home/runner/work/gnmic/gnmic/outputs/file/file_output.go:203: [file_output:default-stdout] initialized file output: {"Cfg":{"FileName":"","FileType":"stdout","Format":"json","Multiline":true,"Indent":"  ","Separator":"\n","OverrideTimestamps":false,"AddTarget":"","TargetTemplate":"","EventProcessors":null,"MsgTemplate":"","ConcurrencyLimit":1000,"EnableMetrics":false,"Debug":false}}
2023/02/06 23:28:20.653309 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel created
2023/02/06 23:28:20.653351 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] original dial target is: "10.127.5.15:9339"
2023/02/06 23:28:20.653376 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] dial target "10.127.5.15:9339" parse failed: parse "10.127.5.15:9339": first path segment in URL cannot contain colon
2023/02/06 23:28:20.653389 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] fallback to scheme "passthrough"
2023/02/06 23:28:20.653422 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] parsed dial target is: {Scheme:passthrough Authority: Endpoint:10.127.5.15:9339 URL:{Scheme:passthrough Opaque: User: Host: Path:/10.127.5.15:9339 RawPath: ForceQuery:false RawQuery: Fragment: RawFragment:}}
2023/02/06 23:28:20.653437 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel authority set to "10.127.5.15:9339"
2023/02/06 23:28:20.653631 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Resolver state updated: {
  "Addresses": [
    {
      "Addr": "10.127.5.15:9339",
      "ServerName": "",
      "Attributes": null,
      "BalancerAttributes": null,
      "Type": 0,
      "Metadata": null
    }
  ],
  "ServiceConfig": null,
  "Attributes": null
} (resolver returned new addresses)
2023/02/06 23:28:20.653671 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel switches to new LB policy "pick_first"
2023/02/06 23:28:20.653703 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel created
2023/02/06 23:28:20.653743 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel Connectivity change to CONNECTING
2023/02/06 23:28:20.653758 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel picks a new address "10.127.5.15:9339" to connect
2023/02/06 23:28:20.653984 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] pickfirstBalancer: UpdateSubConnState: 0xc0006855b0, {CONNECTING <nil>}
2023/02/06 23:28:20.654005 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel Connectivity change to CONNECTING
2023/02/06 23:28:20.702816 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel Connectivity change to READY
2023/02/06 23:28:20.702846 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] pickfirstBalancer: UpdateSubConnState: 0xc0006855b0, {READY <nil>}
2023/02/06 23:28:20.702856 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.47.0/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel Connectivity change to READY
2023/02/06 23:28:20.702870 /home/runner/work/gnmic/gnmic/app/gnmi_client_subscribe.go:215: [gnmic] target "10.127.5.15" gNMI client created
2023/02/06 23:28:20.703561 /home/runner/work/gnmic/gnmic/app/gnmi_client_subscribe.go:218: [gnmic] sending gNMI SubscribeRequest: subscribe='subscribe:{prefix:{origin:"openconfig-if-ethernet" elem:{name:"ethernet"}} subscription:{path:{elem:{name:"interface"} elem:{name:"state"} elem:{name:"counters"}} mode:ON_CHANGE heartbeat_interval:60000000000}}', mode='STREAM', encoding='JSON', to 10.127.5.15
2023/02/06 23:28:20.704665 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: rpc error: code = InvalidArgument desc = missing target
2023/02/06 23:28:20.704762 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: retrying in 10s
2023/02/06 23:28:30.706547 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: rpc error: code = InvalidArgument desc = missing target
2023/02/06 23:28:30.706614 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: retrying in 10s
2023/02/06 23:28:40.708082 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: rpc error: code = InvalidArgument desc = missing target
2023/02/06 23:28:40.708156 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: retrying in 10s
2023/02/06 23:28:50.709211 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: rpc error: code = InvalidArgument desc = missing target
2023/02/06 23:28:50.709259 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: retrying in 10s
2023/02/06 23:29:00.710330 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: rpc error: code = InvalidArgument desc = missing target
2023/02/06 23:29:00.710368 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: retrying in 10s
2023/02/06 23:29:10.711838 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: rpc error: code = InvalidArgument desc = missing target
2023/02/06 23:29:10.711906 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: retrying in 10s
2023/02/06 23:29:20.713886 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: rpc error: code = InvalidArgument desc = missing target
2023/02/06 23:29:20.713934 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: retrying in 10s
2023/02/06 23:29:30.715853 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: rpc error: code = InvalidArgument desc = missing target
2023/02/06 23:29:30.715895 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: retrying in 10s
2023/02/06 23:29:40.717391 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: rpc error: code = InvalidArgument desc = missing target
2023/02/06 23:29:40.717431 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: retrying in 10s
2023/02/06 23:29:50.719344 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: rpc error: code = InvalidArgument desc = missing target
2023/02/06 23:29:50.719394 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: retrying in 10s
2023/02/06 23:30:00.721248 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: rpc error: code = InvalidArgument desc = missing target
2023/02/06 23:30:00.721309 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: retrying in 10s
2023/02/06 23:30:10.723485 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: rpc error: code = InvalidArgument desc = missing target
2023/02/06 23:30:10.723522 /home/runner/work/gnmic/gnmic/app/collector.go:111: [gnmic] target "10.127.5.15": subscription default-1675726100 rcv error: retrying in 10s
karimra commented 1 year ago

there is a --target flag as well

gavmckee80 commented 1 year ago

So what is the context of target here , its not clear to me from the documentation.

The log shows

2023/02/06 23:28:20.702870 /home/runner/work/gnmic/gnmic/app/gnmi_client_subscribe.go:215: [gnmic] target "10.127.5.15" gNMI client created

But then says missing target . What should the --target be , should I only be configuring this from a file ?

karimra commented 1 year ago

The error is coming from the router, that is a question for cumulus support I'm afraid