我有以下情况:
在我的代码中:
container.AddMassTransit(x =>
{
LogContext.ConfigureCurrentLogContext(container.Resolve<SerilogLoggerFactory>());
x.AddBus(context => Bus.Factory.CreateUsingRabbitMq(cfg =>
{
var host = cfg.Host("testServer", hostConfigurator =>
{
hostConfigurator.Username("user-app");
hostConfigurator.Password("user-password");
hostConfigurator.UseCluster(c =>
{
string[] hostnames = ("testServer:5672;testServer:5682;testServer:5692").Split(';');
c.ClusterMembers = hostnames;
});
});
cfg.ConfigureEndpoints(container);
}));
});
IBusControl busControl = container.Kernel.Resolve<IBusControl>();
try
{
busControl.Start();
}
catch (Exception ex)
{
var logger = container.Resolve<ILogger>();
logger.Error("RabbitMQ broker is not reachable, BusControl cannot be started. ", ex);
}
问题:当我尝试启动应用程序时,它说:
无法访问代理:testServer:5672 / ---> RabbitMQ.Client.Exceptions.BrokerUnreachableException:无法访问指定的端点---> RabbitMQ.Client.Exceptions.AuthenticationFailureException:ACCESS_REFUSED-使用身份验证机制PLAIN拒绝登录。有关详细信息,请参阅代理日志文件。
我的用户页面:
用户应用可以访问虚拟主机。我想念什么吗?