Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Health check fails for AspNetCore.HealthChecks.Elasticsearch:9.0.0 #2355

Open
NikiforovAll opened this issue Dec 30, 2024 · 0 comments
Open

Comments

@NikiforovAll
Copy link

Please, fill the following sections to help us fix the issue

What happened:

Health check doesn't work due to transitive dependency issue:

[16:28:09] fail: Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService[104]
      Health check elasticsearch threw an unhandled exception after 2.8406ms
      System.TypeLoadException: Could not load type 'Elastic.Transport.TransportConfigurationBase`1' from assembly 'Elastic.Transport, Version=0.0.0.0, Culture=neutral, PublicKeyToken=069ca2728db333c1'.
         at HealthChecks.Elasticsearch.ElasticsearchHealthCheck.CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken)
         at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
         at HealthChecks.Elasticsearch.ElasticsearchHealthCheck.CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken)
         at Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService.RunCheckAsync(HealthCheckRegistration registration, CancellationToken cancellationToken)

This happens because we have a dependency on Elastic.Clients.Elasticsearch:8.16.3 which resolves transitive dependency to Elastic.Transport:0.5.7

What you expected to happen:

Health check should work as expected.

How to reproduce it (as minimally and precisely as possible):

Add to a project that references Elastic.Clients.Elasticsearch:8.16.3 and AspNetCore.HealthChecks.Elasticsearch:9.0.0 at the same time.

@NikiforovAll NikiforovAll changed the title Health cehck fails for AspNetCore.HealthChecks.Elasticsearch:9.0.0 Health check fails for AspNetCore.HealthChecks.Elasticsearch:9.0.0 Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant