chirpstack / chirpstack-docker

Setup ChirpStack using Docker Compose
https://www.chirpstack.io/
MIT License
273 stars 316 forks source link

gRPC DNS resolution doesn't seem to work #113

Closed Shrulabh25 closed 1 month ago

Shrulabh25 commented 1 month ago
<_InactiveRpcError of RPC that terminated with:
        status = StatusCode.UNAVAILABLE
        details = "DNS resolution failed for https://nnxx.com/: C-ares status is not ARES_SUCCESS qtype=AAAA name=https is_balancer=0: Domain name not found"
        debug_error_string = "UNKNOWN:DNS resolution failed for https://nnxx.com/: C-ares status is not ARES_SUCCESS qtype=AAAA name=https is_balancer=0: Domain name not found {created_time:"2024-03-11T09:45:20.354939546+00:00", grpc_status:14}"
>
ERROR:root:GRPC Exception:  DNS resolution failed for https://nnxx.com/: C-ares status is not ARES_SUCCESS qtype=AAAA name=https is_balancer=0: Domain name not found

My code

BASE_URL = "https://nnxx.com"  # opens chirpstack v4 UI
channel = grpc.insecure_channel(BASE_URL)
device_stub = api.device_pb2_grpc.DeviceServiceStub(channel)

Originally posted by @Shrulabh25 in https://github.com/chirpstack/chirpstack-docker/issues/35#issuecomment-1988086084

brocaar commented 1 month ago

I believe this is not related to the Docker example but with your gRPC implementation.

BASE_URL = "https://nnxx.com"

In most cases, gRPC clients are not using the protocol prefix (https://) in your case.