exceptionless / Exceptionless

Exceptionless application
https://exceptionless.com
Apache License 2.0
2.41k stars 516 forks source link

Failed to parse mapping to Elasticsearch on ES8.1.0 #1057

Closed BinGuoGuo closed 2 years ago

BinGuoGuo commented 2 years ago

Hi,when I run docker-compose up -d, I got these information. My Elasticsearch image version is elastic/elasticsearch:8.1.0 and I've config a superuser for docker-compose.yml

[09:50:06 ERR] Error running ExceptionlessElasticConfiguration startup action: Error creating the index prod-stacks-v1
Original: [ElasticsearchClientException] Request failed to execute. Call: Status code 400 from: PUT /prod-stacks-v1. ServerError: Type: mapper_parsing_exception Reason: "Failed to parse mapping: Unknown parameter [boost] on mapper [title]" CausedBy: "Type: mapper_parsing_exception Reason: "Unknown parameter [boost] on mapper [title]""
Server Error (Index=): Failed to parse mapping: Unknown parameter [boost] on mapper [title]
[400] PUT /prod-stacks-v1

Foundatio.Repositories.Exceptions.RepositoryException: Error creating the index prod-stacks-v1
Original: [ElasticsearchClientException] Request failed to execute. Call: Status code 400 from: PUT /prod-stacks-v1. ServerError: Type: mapper_parsing_exception Reason: "Failed to parse mapping: Unknown parameter [boost] on mapper [title]" CausedBy: "Type: mapper_parsing_exception Reason: "Unknown parameter [boost] on mapper [title]""
Server Error (Index=): Failed to parse mapping: Unknown parameter [boost] on mapper [title]
[400] PUT /prod-stacks-v1

 ---> Elasticsearch.Net.ElasticsearchClientException: Request failed to execute. Call: Status code 400 from: PUT /prod-stacks-v1. ServerError: Type: mapper_parsing_exception Reason: "Failed to parse mapping: Unknown parameter [boost] on mapper [title]" CausedBy: "Type: mapper_parsing_exception Reason: "Unknown parameter [boost] on mapper [title]""
   --- End of inner exception stack trace ---
   at Foundatio.Repositories.Elasticsearch.Configuration.Index.CreateIndexAsync(String name, Func`2 descriptor) in /_/src/Foundatio.Repositories.Elasticsearch/Configuration/Index.cs:line 155
   at Foundatio.Repositories.Elasticsearch.Configuration.VersionedIndex.ConfigureAsync() in /_/src/Foundatio.Repositories.Elasticsearch/Configuration/VersionedIndex.cs:line 62
   at Foundatio.Repositories.Elasticsearch.Configuration.ElasticConfiguration.ConfigureIndexInternalAsync(IIndex idx, Boolean beginReindexingOutdated) in /_/src/Foundatio.Repositories.Elasticsearch/Configuration/ElasticConfiguration.cs:line 98
   at Foundatio.Extensions.Hosting.Startup.StartupActionRegistration.RunAsync(IServiceProvider serviceProvider, CancellationToken shutdownToken) in /_/src/Foundatio.Extensions.Hosting/Startup/StartupActionRegistration.cs:line 44
   at Foundatio.Extensions.Hosting.Startup.StartupExtensions.<>c__DisplayClass0_1.<<RunStartupActionsAsync>b__3>d.MoveNext() in /_/src/Foundatio.Extensions.Hosting/Startup/StartupExtensions.cs:line 51

My docker-compose.yml:

version: '3.8'

services:
  app:
    depends_on:
      - elasticsearch
      - redis
    image: exceptionless/app:latest
    environment:
      EX_AppMode: Production
      EX_ConnectionStrings__Cache: provider=redis
      EX_ConnectionStrings__Elasticsearch: server=http://elasticsearch:9200;username=elastic;password=${ELASTIC_PASSWORD};enable-size-plugin=false
      EX_ConnectionStrings__MessageBus: provider=redis
      #EX_ConnectionStrings__Metrics: provider=statsd;server=statsd;
      EX_ConnectionStrings__Queue: provider=redis
      EX_ConnectionStrings__Redis: server=${REDIS},abortConnect=false
      EX_ConnectionStrings__Storage: provider=folder;path=/app/storage
      ASPNETCORE_URLS: http://+;
      #https://+
      #ASPNETCORE_HTTPS_PORT: 87
      #ASPNETCORE_Kestrel__Certificates__Default__Password: password
      #ASPNETCORE_Kestrel__Certificates__Default__Path: /https/aspnetapp.pfx
      EX_RunJobsInProcess: 'false'
    ports:
      - 86:80
      - 87:443
    volumes:
      - ./ex_appdata:/app/storage
      - ./ex_ssldata:/https

  jobs:
    depends_on:
      - app
    image: exceptionless/job:latest
    environment:
      EX_AppMode: Production
      EX_BaseURL: http://localhost:5100
      EX_ConnectionStrings__Cache: provider=redis
      EX_ConnectionStrings__Elasticsearch: server=http://elasticsearch:9200;username=elastic;password=${ELASTIC_PASSWORD};enable-size-plugin=false
      #EX_ConnectionStrings__Email: smtps://user:password@smtp.host.com:587
      EX_ConnectionStrings__MessageBus: provider=redis
      #EX_ConnectionStrings__Metrics: provider=statsd;server=statsd;
      EX_ConnectionStrings__Queue: provider=redis
      EX_ConnectionStrings__Redis: server=${REDIS},abortConnect=false
      EX_ConnectionStrings__Storage: provider=folder;path=/app/storage
    volumes:
      - ./ex_appdata:/app/storage

networks:
  default:
    name: elk

What should I do to fix this problem?

BinGuoGuo commented 2 years ago

I've install mapper-size plugin on my ES, but it still not work :( image

niemyjski commented 2 years ago

We currently only support ES 7.x, We'll bump the Exceptionless major when we support ES 8.