Exception thrown when trying to use Elasticsearch output
See original GitHub issueI’m seeing the following exception thrown when trying to use the Elasticsearch output package. I’m using the following EventFlow packages:
Microsoft.Diagnostics.EventFlow.Inputs.EventSource 1.4.6 Microsoft.Diagnostics.EventFlow.Outputs.ElasticSearch 2.7.2 Microsoft.Diagnostics.EventFlow.ServiceFabric 1.6.0
Here’s my eventFlowConfig.json:
{
"inputs": [
{
"type": "EventSource",
"sources": [
{ "providerName": "Microsoft-ServiceFabric" },
{ "providerName": "Microsoft-ServiceFabric-Services" },
{ "providerName": "Microsoft-ServiceFabric-Actors" },
{ "providerName": "MyApp-MyService" }
]
}
],
"outputs": [
{
"type": "ElasticSearch",
"indexNamePrefix": "myApp",
"serviceUri": "https://<deploymentId>.eastus2.azure.elastic-cloud.com:<port>",
"basicAuthenticationUserName": "<user>",
"basicAuthenticationUserPassword": "<password>",
"refreshInterval": "15s",
"mappings": {
"properties": {
"timestamp": {
"type": "date_nanos"
}
}
}
}
],
"schemaVersion": "2016-08-11"
}
At my program’s entry point, I set it up with:
private static void Main()
{
try
{
using diagnosticsPipeline = ServiceFabricDiagnosticPipelineFactory.CreatePipeline("myPipeline");
And that should be about all of it. When I start the program, I receive the following exception in the catch block:
System.Exception: 'DiagnosticPipelineFactory: item of type 'ElasticSearch' could not be created
System.TypeLoadException: Could not load type 'Elasticsearch.Net.IInternalSerializerWithFormatter' from assembly 'Elasticsearch.Net, Version=7.0.0.0, Culture=neutral, PublicKeyToken=96c599bbe3e70f5d'.
at Nest.ConnectionSettingsBase`1..ctor(IConnectionPool connectionPool, IConnection connection, SourceSerializerFactory sourceSerializerFactory, IPropertyMappingProvider propertyMappingProvider)
at Nest.ConnectionSettings..ctor(IConnectionPool connectionPool, IConnection connection, SourceSerializerFactory sourceSerializer, IPropertyMappingProvider propertyMappingProvider)
at Nest.ConnectionSettings..ctor(IConnectionPool connectionPool, IConnection connection, SourceSerializerFactory sourceSerializer)
at Nest.ConnectionSettings..ctor(IConnectionPool connectionPool)
at Microsoft.Diagnostics.EventFlow.Outputs.ElasticSearchOutput.Initialize(ElasticSearchOutputConfiguration esOutputConfiguration)
at Microsoft.Diagnostics.EventFlow.Outputs.ElasticSearchOutput..ctor(IConfiguration configuration, IHealthReporter healthReporter)
at Microsoft.Diagnostics.EventFlow.Outputs.ElasticSearchOutputFactory.CreateItem(IConfiguration configuration, IHealthReporter healthReporter)
at Microsoft.Diagnostics.EventFlow.DiagnosticPipelineFactory.ProcessSection[PipelineItemType,PipelineItemChildType](IConfigurationSection configurationSection, IHealthReporter healthReporter, IDictionary`2 itemFactories, IDictionary`2 childFactories, String childSectionName)'
I tried installing Elasticsearch.Net 7.8.1 in hopes that the most recent version would fix things, but the issue persists.
Any ideas of what I’m doing wrong in hooking this up?
Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:8
Top Results From Across the Web
How to solve 8 common Elasticsearch errors and exceptions
Common Elasticsearch errors and exceptions and how to avoid them! Including best practices to help identify, minimize, and handle ES issues.
Read more >Exceptions | Elasticsearch .NET Clients [7.17]
These are known exceptions, either an exception that occurred in the request pipeline (such as max retries or timeout reached, bad authentication, etc.)...
Read more >Exceptions | Elasticsearch Java API Client [7.17]
Exceptions edit Client methods can throw two kinds of exceptions: Requests that were received by the Elasticsearch server but that were rejected (validation ......
Read more >Exceptions | Elasticsearch Java API Client [8.9]
Exceptions edit Client methods can throw two kinds of exceptions: Requests that were received by the Elasticsearch server but that were rejected (validation ......
Read more >Elasticsearch throws exceptions while using with logstash ...
I am using logstash and elasticsearch in standalone mode. The above output was taken when everything was running smoothly. I am running these...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sure - give me a few to put something together.
That fixes it on my side. Thank you for your assistance here!