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

How to properly setup the config file for fake_server #81

Open
delmotteo opened this issue Sep 21, 2020 · 1 comment
Open

How to properly setup the config file for fake_server #81

delmotteo opened this issue Sep 21, 2020 · 1 comment

Comments

@delmotteo
Copy link

Hi,

I would like to use gnmi_cli to connect to the fake_server simulator (https://github.com/openconfig/gnmi/tree/master/testing/fake/gnmi/cmd/fake_server).
I started the (fake) server and it seems ok:
I0921 14:37:47.773644 9483 server.go:115] Starting RPC server on address: localhost:8080

Unfortunetly, when I send a request from gnmi_cli, I get an empty response:

mzadmin@mzadmin-VirtualBox:$ gnmi_cli -a localhost:8080 -q '*' -logtostderr -insecure -qt s
{}
mzadmin@mzadmin-VirtualBox:
$

And an error message appears on the server side:

E0921 14:38:48.043118 9483 client.go:226] Client gnmi_sim error: end of updates

The thing is, I don't know how to set up properly the server, using the config file.
In particular, I don't know how I specify which sensor paths are to be made available.
And how I can assign values to the sensors?
Is it possible to have the values being generated randomly and dynamically so that two consecutive messages have different values?

I have seen the gen_config tool that may help in some way.
But I don't know how to use that either.

Any help is appreciated.

Thank you

@openconfig openconfig deleted a comment from krrish112 Sep 22, 2020
@mahnoorfirdous
Copy link

mahnoorfirdous commented Jun 1, 2023

I'm not even getting this far. This is what I get

sendQueryAndDisplay(ctx, {Addrs:[localhost:8180] AddressChains:[] Target: Replica:0 UpdatesOnly:false Queries:[[*]] Type:stream Timeout:30s NotificationHandler:<nil> ProtoHandler:<nil> Credentials:<nil> TLS:<nil> Extra:map[] SubReq:<nil> TunnelConn:<nil>}, &{PollingInterval:30s StreamingDuration:0s Count:0 countExhausted:false Delimiter:/ Display:0x875ae0 DisplayPrefix: DisplayIndent:   DisplayType:group DisplayPeer:false Timestamp: DisplaySize:false Latency:false ClientTypes:[gnmi] Location:UTC}):
        client "gnmi" : client "gnmi" : Dialer(localhost:8180, 30s): context deadline exceeded

This really should not be happening. I followed all the instructions on that page. Of which there weren't too many.
Please help!

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

2 participants