DNS alias causes MassTransit.EndpointNotFoundException upon response

263 views
Skip to first unread message

moc777

unread,
Jul 14, 2017, 8:15:11 AM7/14/17
to masstransit-discuss
Someone recently suggested that referring to VMs by their actual names in config was not best practice and that we should institute DNS aliases.

However, when configure the receive URI for the consumer to use a DNS alias for the same machien, the response fails - presumably because of the mismatch between the alias and the machine name that MT seems to be still trying to hit:

The endpoint address specified an unknown host: rabbitmq://srv12345wn/bus-WSP12345WN-Foo.Bar.Package-1q3oyybxzs4mmcdabdkcim5381?durable=false&autodelete=true

at
MassTransit.RabbitMqTransport.Transport.RabbitMqSendTransportProvider.GetSendTransport(Uri address) at MassTransit.RabbitMqTransport.Transport.RabbitMqSendEndpointProvider.<GetSendEndpoint>d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MassTransit.Transports.SendEndpointCache.<GetSendEndpointFromProvider>d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MassTransit.Util.Caching.PendingValue`2.<CreateValue>d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MassTransit.Transports.SendEndpointCache.<GetSendEndpoint>d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MassTransit.Serialization.BaseConsumeContext.<GetSendEndpoint>d__46.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MassTransit.Serialization.BaseConsumeContext.<RespondAsync>d__35`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MassTransit.Util.Caching.PendingValue`2.<CreateValue>d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MassTransit.Util.Caching.NodeValueFactory`1.<CreateValue>d__7.MoveNext()


Is this a known problem?

Chris Patterson

unread,
Jul 14, 2017, 10:51:22 AM7/14/17
to masstrans...@googlegroups.com
You can override your bus endpoint name to something that resolves on other machines. I would ask why you're putting the RabbitMQ broker on an ephemeral machine -- it should be on a machine that has a reasonable lifetime and is available via a known host address.

The bus endpoint name would be on the same RabbitMQ host, and not the local server name.


--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstransit-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/5e78b294-2f7d-420e-b7f7-43d70cd6ee45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

moc777

unread,
Oct 27, 2017, 3:47:46 AM10/27/17
to masstransit-discuss
P.S. on this: this issue only occurs when configuring a fully-qualified DNS alias e.g. alias.domain.com; when using alias alone, it works fine.
To post to this group, send email to masstrans...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages