You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the source code below: private Service BuildService(ServiceEntry serviceEntry, Node serviceNode) { return new Service( serviceEntry.Service.Service, new ServiceHostAndPort(serviceNode == null ? serviceEntry.Service.Address : serviceNode.Name, serviceEntry.Service.Port), serviceEntry.Service.ID, GetVersionFromStrings(serviceEntry.Service.Tags), serviceEntry.Service.Tags ?? Enumerable.Empty<string>()); }
when serviceNode is null,service host will be serviceEntry.Service.Address,the result is OK.
when serviceNode is not null,it will take the value of serviceNode.Name.That is what I want to talk about.
Why serviceNode.Name?Why not serviceNode.Address?
serviceNode.Name sometime will be other value which is not a IP ,but like 'agent-one' something.
serviceNode.Address is a IP which looks like '127.0.0.1'.
so one or more exceptions have been thrown when I debug the program.
exception message likes that:
Error Code: ConnectionToDownstreamServiceError Message: Error connecting to downstream service, exception: System.Net.Http.HttpRequestException: 不知道这样的主机。
Specifications
Version:16.0.1
The text was updated successfully, but these errors were encountered:
wsjun2016
changed the title
16.0.1 maybe a bug or something by getting server host
16.0.1 maybe a bug or something by getting serverhost from consul
Nov 13, 2020
the source code below:
private Service BuildService(ServiceEntry serviceEntry, Node serviceNode) { return new Service( serviceEntry.Service.Service, new ServiceHostAndPort(serviceNode == null ? serviceEntry.Service.Address : serviceNode.Name, serviceEntry.Service.Port), serviceEntry.Service.ID, GetVersionFromStrings(serviceEntry.Service.Tags), serviceEntry.Service.Tags ?? Enumerable.Empty<string>()); }
when serviceNode is null,service host will be serviceEntry.Service.Address,the result is OK.
when serviceNode is not null,it will take the value of serviceNode.Name.That is what I want to talk about.
Why serviceNode.Name?Why not serviceNode.Address?
serviceNode.Name sometime will be other value which is not a IP ,but like 'agent-one' something.
serviceNode.Address is a IP which looks like '127.0.0.1'.
so one or more exceptions have been thrown when I debug the program.
exception message likes that:
Error Code: ConnectionToDownstreamServiceError Message: Error connecting to downstream service, exception: System.Net.Http.HttpRequestException: 不知道这样的主机。
Specifications
The text was updated successfully, but these errors were encountered: