exceptionless/Exceptionless

How should native es be configured?

HandsomeBoy01 opened this issue · 7 comments

I want to use the native elasticsearch, what should I do?

You'd get this error if you are not using our docker containers or you don't have the mapper-size plugin installed. You can either install this elastic plugin or turn it off via the elasticsearch connection string by adding a query string of enable-size-plugin=false

Where should I set it "enable-size-plugin=false" ??

https://exceptionless.com/docs/self-hosting/kubernetes/#connectionstrings

EX_ConnectionStrings__Elasticsearch value: server=http://elasticsearch:9200;enable-size-plugin=false

Please let us know if you have any questions.

I changed it to

EX_ConnectionStrings__Elasticsearch value: server=http://es-svc:9200; username=elastic;password=ytzn9999;enable-size-plugin=false

That's right
But you still get the following error
image

exceptionless/app:7.2.1 error log
[400] POST /prod-events-2023.01.11%2Cprod-events-2023.01.12%2Cprod-events-2023.01.13%2Cprod-events-2023.01.14/_search?typed_keys=true&ignore_unavailable=true

---> Elasticsearch.Net.ElasticsearchClientException: Request failed to execute. Call: Status code 400 from: POST /prod-events-2023.01.11%2Cprod-events-2023.01.12%2Cprod-events-2023.01.13%2Cprod-events-2023.01.14/_search?typed_keys=true&ignore_unavailable=true. ServerError: Type: search_phase_execution_exception Reason: "all shards failed" CausedBy: "Type: illegal_argument_exception Reason: "Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [stack_id] in order to load field data by uninverting the inverted index. Note that this can use significant memory." CausedBy: "Type: illegal_argument_exception Reason: "Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [stack_id] in order to load field data by uninverting the inverted index. Note that this can use significant memory."""
--- End of inner exception stack trace ---
at Foundatio.Repositories.Elasticsearch.ElasticReadOnlyRepositoryBase1.CountAsync(IRepositoryQuery query, ICommandOptions options) in /_/src/Foundatio.Repositories.Elasticsearch/Repositories/ElasticReadOnlyRepositoryBase.cs:line 429 at Exceptionless.Web.Controllers.EventController.GetInternalAsync(AppFilter sf, TimeInfo ti, String filter, String sort, String mode, Int32 page, Int32 limit, String after, Boolean usesPremiumFeatures) in /app/src/Exceptionless.Web/Controllers/EventController.cs:line 293 at Exceptionless.Web.Controllers.EventController.GetAsync(String filter, String sort, String time, String offset, String mode, Int32 page, Int32 limit, String after) in /app/src/Exceptionless.Web/Controllers/EventController.cs:line 205 at lambda_method648(Closure , Object ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)

Please reply when you see it.
Thank you

What does the health check endpoint return? Have you ran through the troubleshooting steps listed in the docs?

Did this help?