-
Notifications
You must be signed in to change notification settings - Fork 62
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
Error when connecting LabVIEW gRPC client to C# server #374
Comments
I don't think you want to specify the protocol in the server address just hostname:port |
Double check there isn't an http proxy configured on your network. If there is one, you might need to bypass the proxy for your grpc server. |
Hi Jason, Thanks for the comment. |
If you‘re using https you need to provide the public part of a certificate (.crt). During creation of the C# project there was a popup that asked you to accept the user signed developer certificate. This certificate as a file should be used to create the client. |
FWIW, I have successfully connected LV clients to a server written in C# (ASP.NET Core) so this is likely a network/setup issue and not a general issue with grpc-labview. Error -1014 corresponds to the UNAVAILABLE gRPC status code. From my experience, that error code happens if the server isn't running on that port, there is a proxy/firewall preventing connection to that machine, you are using the wrong scheme in the URL (http vs https), or there is something else in the server configuration that is causing the connection to get rejected. Usually console logging on the server can help diagnose some of this. |
Hi Jason, Thanks for the reply. We were able to connect the LV client to the C# GRPC server for a sample greeter service. It works fine and the message were passed as expected. |
I don't have any experience with that gRPC API/server so it's difficult to say what might be going wrong. Are you able to connect to the server from the C# client provided in that repo? You might want to open an issue under that repo and seek help from others that are more familiar with the server. My best guess at this point is the server defaults to a secure connection by default, and you haven't configured the server for non-secure connections. Either that or the client connection requires other metadata to successfully connect. If you look at the way grpc channels are created in that repo, you'll see that all insecure communication appends a "connection-id" header to the request. Unfortunately, grpc-labview doesn't currently expose a way to attach http headers to RPC calls so you are kind of out of luck if that is a requirement. Either that, or you will have to try secure connections. Again, I would seek guidance from a maintainer of that repo. |
I have a issue raised in the other repo as well(ni/grpc-teststand-api#19) and already tried the cases of creating a non-secure connection, firewalls, different ports etc. But the http headers weren't working. Is it actually required to use the http/https for the address field in grpc-labview for this use case? |
I'm not certain what validation the underlying grpc libraries will perform if you supply http/https as part of the server address. However, it's not required. From the grpc-labview perspective, whether you get a secure or insecure connection is determined by the |
Description
Timeout error when trying to connect LabVIEW gRPC client to C# gRPC Server.
Encountered this problem when attempting to use the LabVIEW client to simulate TestStand operations by connecting to a C# server. This issue was first seen when trying to connect to the C# server provided in https://github.com/ni/grpc-teststand-api. I discovered that the problem persists even with a basic C# greeter gRPC service.
Steps to Reproduce
Expected Result
Greeter response string concatenated with 'Hello' as prefix to client message input.
"Hello " + Client Message
Actual Result
Version
LabVIEW - 2023 Q3
Images
AB#2832543
The text was updated successfully, but these errors were encountered: