Closed Gaurav-Pande closed 3 years ago
The errors are due to using too old of a version of Go. Only go1.15 and go1.16 are currently supported. I'd recommend the latest go1.16.
Thanks @aaronbee !
Hi @aaronbee,
Apologies for reopening the issue and being naïve here. I am trying to understand the design followed in this code and the Openconfig design. I have few follow up questions regarding the design from the client/ server perspective.
Based on my understanding(Please correct me if I am wrong here), Openconfig design for reverse GNMI is based on grpctunnel project, but this implementation doesn't consider that design right(as I think this design will work only when the client and server are network reachable but grpctunnel consider the possibilities when the client is not reachable from server by using TCP over grpc tunnel)?
Also, I see that the service defined from the server side in the gnmireverse.proto defined as:
service gNMIReverse {
rpc Publish(stream gnmi.SubscribeResponse) returns (Empty);
}
Does the purpose of this rpc Publish is to subscribe for the data we want to subscribe from the client or something else? Because the way I would think is once using reverse GNMI the client dials out to the collector(here the server), and then collector needs to subscribe for the data it wants to get from the client. Once that is done then the data should be streamed from the client to server. But in this implementation it looks like we subscribe for the data at the router/client side right using below config at the client side?
daemon gnmireverse
exec /mnt/flash/gnmireverse_client -username USER -password PASS # authenticate locally
-target_addr=mgmt/127.0.0.1:6030 # default address of gNMI server, listening in mgmt VRF
-collector_addr=mgmt/1.2.3.4:6000 # address of gNMIReverse server, connecting through mgmt VRF
-target_value=device1 # Include a name for this device
-sample interfaces/interface/state/counters@30s # stream interface counters sampled every 30 seconds
-subscribe network-instances # stream changes as they happen to network-instances config and state
no shutdown
I am experimenting with this code to do a small POC. I am running the client on Arista vEOS, and I am running server on my dev machine(linux based). I want to see all the messages I have subscribed in the client(vEOS), but right now when I run the server I see no messages coming through, though I can see using tcpdump that packets are coming from the vEOS to the server.
Do I need to call any other function to print the messages here?
go run server/main.go -addr 127.0.0.1:50052 -tls false
The server should print out any data it receives. No additional flags necessary. If you aren't seeing data, I'd suggest looking at the logs of the client which should be at /var/log/agents/gnmireverse-####. Just looking at the configs you have posted, perhaps you need to pass '-collector_tls false` to the client if tls is disabled on the server.
thanks Aaron for all the help.
Hi,
I am trying to run gnmireverse client on my linux machine(ubuntu 18.04). I am running go version go1.10.4 linux/amd64. When I am running the client I am getting the bellow error:
am I doing something wrong here?