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
An internal service created a client for a single node via DialogueClients.create(interface, clientConfiguration) where clientConfiguration has a single configured URI. They had validation to make sure that they would only ever pass in a single node to the ClientConfiguration. However, they ended up seeing errors like:
com.palantir.logsafe.exceptions.SafeIllegalStateException: There are no URIs configured to handle requests
at com.palantir.dialogue.core.ZeroUriNodeSelectionChannel.maybeExecute(ZeroUriNodeSelectionChannel.java:44)
...
Arguably they can probably use the perHost feature in #2192 but that's relatively new here.
ReloadingClientFactory#getNonReloadingChannel underneath uses a LiveReloadingChannel that's configured to poll for DNS changes in the background via DnsSupport.
LiveReloadingChannel takes in a Refreshable<DnsResolutionResults<ServiceConfiguration>> and instead of the URIs flowing from the clientConfiguration, they instead flow from the DnsResolutionResults via getTargetUris.
going inside getTargetUris, the only way to get an empty set of URIs is to have DNS enabled and have no parse errors.
DialogueChannel by default uses the uris from the clientConfiguration, but if you do specify uris it uses that. So if you resolve nothing, you will have no uris.
What did you want to happen?
If I can't connect, fail with a more familiar exception i.e. ConnectException or UnknownHostException.
The text was updated successfully, but these errors were encountered:
What happened?
An internal service created a client for a single node via
DialogueClients.create(interface, clientConfiguration)
whereclientConfiguration
has a single configuredURI
. They had validation to make sure that they would only ever pass in a single node to theClientConfiguration
. However, they ended up seeing errors like:Tracing through:
DialogueClients#create(Class<T> clientInterface, ClientConfiguration clientConfiguration)
->LegacyConstruction#getNonReloading(Class<T> clientInterface, ClientConfiguration clientConfiguration)
LegacyConstruction#getNonReloading(Class<T> clientInterface, ClientConfiguration clientConfiguration)
usesReloadingFactory
configured with an empty reloadable block:dialogue/dialogue-clients/src/main/java/com/palantir/dialogue/clients/LegacyConstruction.java
Lines 27 to 29 in b24d0f1
ReloadingClientFactory#getNonReloading
->ReloadingClientFactory#getNonReloadingChannel
ReloadingClientFactory#getNonReloadingChannel
underneath uses aLiveReloadingChannel
that's configured to poll for DNS changes in the background viaDnsSupport
.LiveReloadingChannel
takes in aRefreshable<DnsResolutionResults<ServiceConfiguration>>
and instead of the URIs flowing from theclientConfiguration
, they instead flow from theDnsResolutionResults
viagetTargetUris
.getTargetUris
, the only way to get an empty set of URIs is to have DNS enabled and have no parse errors.DialogueChannel
by default uses theuris
from theclientConfiguration
, but if you do specifyuris
it uses that. So if you resolve nothing, you will have no uris.What did you want to happen?
If I can't connect, fail with a more familiar exception i.e.
ConnectException
orUnknownHostException
.The text was updated successfully, but these errors were encountered: