Service Connection Refused at Wrong Host

Hello, i am running my services and Consul as localy. like that:

basically appsetting.json file of any service:

  "ServiceSettings": {
    "ServiceName": "My-Service-Name",
    "ServiceHost": "127.0.0.1",
    "ServicePort": 8001,
    "ServiceDiscoveryAddress": "http://127.0.0.1:8500"
  }

Registering, connecting successful to my gateway adress (127.0.0.1:8000) and consul (127.0.0.1:8500). After that when i make a request i get “ConnectionToDownstreamServiceError Message: Error connecting to downstream service, exception: System.Net.Http.HttpRequestException: Connection refused ({device-name}:8001)”.

why the hostname returns as {device-name}:8001? I think problem is causes by.

Hi @ramalt,

How is your service getting registered to Consul? It seems like whatever is registering the service is not interpolating the {device-name} variable prior to issuing the API call.