Asp.net core ASP.NET Core HealthChecks报告RabbitMQ为假阴性

Asp.net core ASP.NET Core HealthChecks报告RabbitMQ为假阴性,asp.net-core,rabbitmq,masstransit,Asp.net Core,Rabbitmq,Masstransit,使用这个,我面临一个问题,HealtChecks告诉我我的端点不健康,事实上一切都在工作 我现在得到的错误消息(在将Nuget包更新为5.5.2之后)是 及 我的启动配置: public-void-Configure( IApplicationBuilder应用程序, IHostingEnvironment(环境) { app.usehalthchecks(“/health”),新的HealthCheckOptions { 谓词=检查=>true, ResponseWriter=UIRespon

使用这个,我面临一个问题,HealtChecks告诉我我的端点不健康,事实上一切都在工作

我现在得到的错误消息(在将Nuget包更新为5.5.2之后)是

我的启动配置:

public-void-Configure(
IApplicationBuilder应用程序,
IHostingEnvironment(环境)
{
app.usehalthchecks(“/health”),新的HealthCheckOptions
{
谓词=检查=>true,
ResponseWriter=UIResponseWriter.WriteHealthCheckUIResponse
}).UseHealthChecksUI(设置=>
{
setup.ApiPath=“/healthchecks-api”;
setup.UIPath=“/healthchecks ui”;
});
app.UseMvc();
在线服务配置(服务);
}
公共覆盖服务配置无效(IServiceCollection服务)
{
services.AddMassTransit(x=>
{
x、 AddConsumer();
x、 AddConsumer();
x、 AddBus(提供程序=>ConfigureBus(提供程序、,
兔眼;
});
services.AddMassTransitHostedService();
}
专用IBusControl配置总线(
IServiceProvider提供程序,
RabbitMqSettings rabbitMqConfigurations)=>
Bus.Factory.CreateUsingRabbitMq(
cfg=>
{
var host=cfg.host(
rabbitMqConfigurations.Host,
"/",
hst=>{
Username(rabbitMqConfigurations.Username);
密码(rabbitMqConfigurations.Password);
});
cfg.UseHealthCheck(提供者);
ReceiveEndpoint(主机,$“{typeof(mailssent).Namespace}.{typeof(mailssent.Name}”,端点=>
{
消费者(提供者);
});
ReceiveEndpoint(主机,$“{typeof(MailSentFailed).Namespace}.{typeof(MailSentFailed.Name}”,端点=>
{
消费者(提供者);
});
});

当我不使用消费者时,健康检查是正常的。所以端点有问题,但是什么呢

您是否有服务健康端点的输出?您是指UI/Api上的输出?它有两个输出:1。Mastransit bus:
“MassTransit bus未准备就绪:”
和2。MassTransit端点:
失败的端点:rabbitmq://{domain}/{event_namspace},rabbitmq://{domain}/authenticationapi3777209016hbfvx_dotnet_bus_8zkyyyyyFYEFONH6BDMOKEOBFQ?持久=假&自动删除=真“
这可能是由于报告的错误造成的@ChrisPatterson我不确定这与我没有重新创建队列是同一个问题,这是从服务开始就发生的。这是因为报告的名称不同
[2019-07-17 11:25:16.147 +02:00 Error] 
[HealthChecks.UI.Core.HostedService.HealthCheckReportCollector] [] 
GetHealthReport threw an exception when trying to get report from 
http://url.domain/health configured with name {name}.

System.Net.Http.HttpRequestException: An error occurred while sending the 
request. ---> System.IO.IOException: Unable to read data from the transport 
connection: An existing connection was forcibly closed by the remote host. --- 
> System.Net.Sockets.SocketException: An existing connection was forcibly 
closed by the remote host
[2019-07-17 11:25:16.482 +02:00 Error] 
[MassTransit.RabbitMqTransport.Transport.RabbitMqReceiveTransport] [] RabbitMQ 
Connect Failed: "Operation interrupted"