Arrêt et effacement de l'index

Bonjour,
le moteur s'arrête et j'ai dans le log au moment de l'arrêt : [2018-03-23 09:27:01,387][INFO ][cluster.metadata ] [Johnny Storm] [app] deleting index
[2018-03-23 09:27:01,726][DEBUG][action.admin.indices.create] [Johnny Storm] [please_read_me_xyz] failed to create
org.elasticsearch.index.mapper.MapperParsingException: mapping [warning]
at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:394)
at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:374)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:204)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:167)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.elasticsearch.index.mapper.MapperParsingException: No handler for type [keyword] declared on field [warning]
at org.elasticsearch.index.mapper.object.ObjectMapper$TypeParser.parseProperties(ObjectMapper.java:288)
at org.elasticsearch.index.mapper.object.ObjectMapper$TypeParser.parseObjectOrDocumentTypeProperties(ObjectMapper.java:214)
at org.elasticsearch.index.mapper.object.RootObjectMapper$TypeParser.parse(RootObjectMapper.java:136)
at org.elasticsearch.index.mapper.DocumentMapperParser.parse(DocumentMapperParser.java:211)
at org.elasticsearch.index.mapper.DocumentMapperParser.parseCompressed(DocumentMapperParser.java:192)
at org.elasticsearch.index.mapper.MapperService.parse(MapperService.java:449)
at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:307)
at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:391)
... 6 more"

Pouvez svp m'indiquer comment résoudre ce problème
Cordialement

Le type keyword existe depuis 5.0

Quel est la version de Elasticsearch?
Quel est le mapping de l'index pour le champs "warning"?
Si l'arret du moteur est que le noeud elasticsearch crash, quel est la taile de la JVM Heap?
Est-ce que le probleme est le meme sur un autre index?

Merci de votre réponse rapide
{
"status" : 200,
"name" : "Johnny Storm",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "1.7.6",
"build_hash" : "c730b59357f8ebc555286794dcd90b3411f517c9",
"build_timestamp" : "2016-11-18T15:21:16Z",
"build_snapshot" : false,
"lucene_version" : "4.10.4"
},
"tagline" : "You Know, for Search"
}

Rebonjour, le code dans le fichier config.yml est le suivant :

fos_elastica:
clients:
default: { host: 127.0.0.1, port: 9200 }
indexes:
app:
settings:
index:
analysis:
analyzer:
custom_search_analyzer:
type: custom
tokenizer: standard
filter : [standard, lowercase, asciifolding]
custom_index_analyzer:
type: custom
tokenizer: standard
filter : [standard, lowercase, asciifolding, custom_filter]
filter:
custom_filter:
language: French
type: edgeNGram
side: front
min_gram: 1
max_gram: 20

        types:
            firme:
                mappings:
                    raisonSociale: { search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string}
                    tel1: { search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string}
                    tel2: { search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string}
                    fax: { search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string}
                    ville: { search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string}
                    rsRecherche: { search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string}
                    rsFirst: { search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string}
                    poids: { search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: integer}

                    groups:
                        type: "nested"
                        properties:
                            mot: {search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string}
                    rude:
                        type: "nested"
                        properties:
                            nomTri: {search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string}
                    
                persistence:
                    # the driver can be orm, mongodb, phpcr or propel
                    # listener and finder are not supported by
                    # propel and should be removed
                    identifier: codeFirme
                    driver: orm
                    model: alapage\alapageBundle\Entity\Firme
                    provider: ~
                    listener: ~
                    finder: ~
                    repository: alapage\alapageBundle\Entity\FirmeRepository
                serializer:
                    groups: [elastica]
            Rubriquemot:
                mappings:
                    mot: { search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string}
                persistence:
                    # the driver can be orm, mongodb, phpcr or propel
                    # listener and finder are not supported by
                    # propel and should be removed
                    identifier: codemot
                    driver: orm
                    model: alapage\alapageBundle\Entity\Rubriquemot
                    provider: ~
                    listener: ~
                    finder: ~
                    repository: ~
                serializer:
                    groups: [elastica]
            Marque:
                mappings:
                    nomTri: { search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string}
                persistence:
                    # the driver can be orm, mongodb, phpcr or propel
                    # listener and finder are not supported by
                    # propel and should be removed
                    identifier: codeMarque
                    driver: orm
                    model: alapage\alapageBundle\Entity\Marque
                    provider: ~
                    listener: ~
                    finder: ~
                    repository: ~
                serializer:
                    groups: [elastica]

fos_js_routing:
routes_to_expose: [villess,test]

Merci de formater ton code STP pour le rendre lisible.
Aussi la version 1.7 n'est plus supportée.
La 2.x est EOL depuis un mois.

Il est temps de migrer. 5.x ou 6.x.

Merci de votre réponse au fait je redoute la migration vers 5.x :wink:
néanmoins pouvez stp me dire ce qui se passe car je n'ai aucun champs "warning".
pour le code j'espère c mieux maintenant :

        types:
            firme:
                mappings:
                    raisonSociale: { search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string}
                    tel1: { search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string}
                    tel2: { search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string}
                    fax: { search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string}
                    ville: { search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string}
                    rsRecherche: { search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string}
                    rsFirst: { search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string}
                    poids: { search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: integer}

                    groups:
                        type: "nested"
                        properties:
                            mot: {search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string}
                    rude:
                        type: "nested"
                        properties:
                            nomTri: {search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string}

                    identifier: codeFirme
                    driver: orm
                    model: alapage\alapageBundle\Entity\Firme
                    provider: ~
                    listener: ~
                    finder: ~
                    repository: alapage\alapageBundle\Entity\FirmeRepository
                serializer:
                    groups: [elastica]
            Rubriquemot:
                mappings:
                    mot: { search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string}
                
                    identifier: codemot
                    driver: orm
                    model: alapage\alapageBundle\Entity\Rubriquemot
                    provider: ~
                    listener: ~
                    finder: ~
                    repository: ~
                serializer:
                    groups: [elastica]

bien cordialement

Ha. Je réalise que c'est du code Elastica que je ne connais pas.

Peux tu isoler avec du code purement elasticsearch ?

Là je ne vois pas spécialement de notion de keyword. Tu as toujours la même erreur exactement ?

j pas compris :"Peux tu isoler avec du code purement elasticsearch ?"
oui j'ai toujours la même erreur exactement au moment du crash, dans le log il y a d'autres erreur mais ne provoque jamais l'arret du moteur,le plus bizzare c'est que j pas dans le code ni keyword ni meme mot "warning"
Merci bq de ta rétivité et désolé pour mon incompétence en la matière

Tu peux partager tes logs complets STP?

https://www.alapage.ma/elasticsearch.log

merci infiniment de votre aide

[2018-03-23 00:13:04,212][DEBUG][action.search.type       ] [Johnny Storm] [app][0], node[4aDurB7aQv6feE8aeaJJHw], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@49bcf9d5] lastShard [true]
org.elasticsearch.search.SearchParseException: [app][0]: from[-1],size[150],sort[<custom:"poids": org.elasticsearch.index.fielddata.fieldcomparator.LongValuesComparatorSource@335ca870>!,<custom:"rsFirst": org.elasticsearch.index.fielddata.fieldcomparator.BytesRefFieldComparatorSource@1fbf9aa8>]: Parse Failure [Failed to parse source [{"sort":{"poids":{"order":"desc"},"rsFirst":{"order":"asc"}},"size":150,"query":{"bool":{"must":[{"match":{"raisonSociale":{"query":"Fabrication textile technique, non tissé","minimum_should_match":"100%"},"ville":{"minimum_should_match":"100%"}}},{"match":{"ville":{"query":"Casablanca"}}}]}}}]]
	at org.elasticsearch.search.SearchService.parseSource(SearchService.java:747)
	at org.elasticsearch.search.SearchService.createContext(SearchService.java:572)
	at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:544)
	at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:306)
	at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
	at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
	at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.elasticsearch.index.query.QueryParsingException: [app] [_na] query malformed, no field after start_object
	at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:300)
	at org.elasticsearch.index.query.BoolQueryParser.parse(BoolQueryParser.java:93)
	at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:307)
	at org.elasticsearch.index.query.IndexQueryParserService.innerParse(IndexQueryParserService.java:382)
	at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:281)
	at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:276)
	at org.elasticsearch.search.query.QueryParseElement.parse(QueryParseElement.java:33)
	at org.elasticsearch.search.SearchService.parseSource(SearchService.java:731)
	... 9 more

On dirait que tu as un problème d'encoding ici. Fabrication textile technique, non tissé.

Je pense que tu n'envoies pas tes requêtes en UTF8.

Bonjour,
Merci encore une fois pour vos efforts :slight_smile:
cette erreur existait depuis tj, je crois qu'il y a "]" de plus dans nos requettes JSON.
L'erreur qui correspond à l'heure exacte du crash et qui est nouvelle dans nos logs :

[2018-03-23 09:27:01,387][INFO ][cluster.metadata         ] [Johnny Storm] [app] deleting index
[2018-03-23 09:27:01,726][DEBUG][action.admin.indices.create] [Johnny Storm] [please_read_me_xyz] failed to create
org.elasticsearch.index.mapper.MapperParsingException: mapping [warning]
	at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:394)
	at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:374)
	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:204)
	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:167)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.elasticsearch.index.mapper.MapperParsingException: No handler for type [keyword] declared on field [warning]
	at org.elasticsearch.index.mapper.object.ObjectMapper$TypeParser.parseProperties(ObjectMapper.java:288)
	at org.elasticsearch.index.mapper.object.ObjectMapper$TypeParser.parseObjectOrDocumentTypeProperties(ObjectMapper.java:214)
	at org.elasticsearch.index.mapper.object.RootObjectMapper$TypeParser.parse(RootObjectMapper.java:136)
	at org.elasticsearch.index.mapper.DocumentMapperParser.parse(DocumentMapperParser.java:211)
	at org.elasticsearch.index.mapper.DocumentMapperParser.parseCompressed(DocumentMapperParser.java:192)
	at org.elasticsearch.index.mapper.MapperService.parse(MapperService.java:449)
	at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:307)
	at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:391)
	... 6 more

Blockquote

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.