diff --git a/src/core/Akka.Remote/Transport/DotNetty/DotNettyTransport.cs b/src/core/Akka.Remote/Transport/DotNetty/DotNettyTransport.cs index 49f1bbf497c..ff2d79eca1c 100644 --- a/src/core/Akka.Remote/Transport/DotNetty/DotNettyTransport.cs +++ b/src/core/Akka.Remote/Transport/DotNetty/DotNettyTransport.cs @@ -159,12 +159,19 @@ protected async Task NewServer(EndPoint listenAddress) if (InternalTransport != TransportMode.Tcp) throw new NotImplementedException("Haven't implemented UDP transport at this time"); - if (listenAddress is DnsEndPoint dns) + try { - listenAddress = await DnsToIPEndpoint(dns).ConfigureAwait(false); - } + if (listenAddress is DnsEndPoint dns) + { + listenAddress = await DnsToIPEndpoint(dns).ConfigureAwait(false); + } - return await ServerFactory().BindAsync(listenAddress).ConfigureAwait(false); + return await ServerFactory().BindAsync(listenAddress).ConfigureAwait(false); + } + catch (Exception ex) + { + throw new RemoteTransportException($"Failed to bind to [{listenAddress}]. See InnerException for details.", ex); + } } public override async Task<(Address, TaskCompletionSource)> Listen()