We are trying to use the gRPC API for a Chirpstack V3 instance (we cannot update it to V4 yet due to our production infrastructure). The instance runs on a VM and is accessible on port 443 behind an NGINX reverse proxy.
We have looked at the following resources for help:
We’ve tried updating our nginx configuration with the grpc_pass option like so:
i face the same problem when usinig python grpc client.
if i use grpc.insecure_channel(server) i must use host:port and the port must not be 443, if i have to use 443, maybe have to use secure client. grpc.secure_channel(server, grpc.ssl_channel_credentials(trusted_certs))
Hi, could it be that you have enabled TLS on Chirpstack? I created the thread you linked before. You have to disable TLS in Chirpstack and only enable it in nginx.
Are those the TLS options under [application_server.external_api]? If so, I have TLS disabled, but am still getting the same issue. When connecting over grpc, were you providing any sort of certificates or credentials?
After having some more time to look into the issue, I figured it out. There were two issues that prevented this from working:
I was using an insecure gRPC connection to connect to an Nginx server that had SSL certs setup.
I had to use cred, err := credentials.NewClientTLSFromFile("path_to_cert", "")
and grpc.Dial(grpcHost, grpc.WithTransportCredentials(cred))
to have Nginx accept the connection.
The gRPC API endpoint was incorrect. The correct location for Chirpstack V3 is as follows: