Could not connect to Elasticsearch error

I configured the Elastic search server, but getting “Could not connect to Elasticsearch: 192.168.0.35:9200”.
Test-NetConnection for the above IP:Port returns TcpTestSucceeded.

What is the recommended/minimum version of elastic search needed for trudesk by the way?

Since update 1.0.11, neither ticket filters, nor regular search nor elastic search is available or can be configured. :frowning:

Ticket filtering was a very useful feature, why was it removed?

The filter is in a broken state right now because of moving tickets to react and the teams and department changes. I’m also introducing Ticket Views which will allow you to basically save filters.

I tested Elasticsearch with version 6

Elasticsearch is a bit tricky to setup right now.

  • Enable Elasticsearch
  • Configure your server settings
  • Click Apply. (It will error)
  • Restart server pm2 restart trudesk
  • Refresh page after server restart
  • Click Rebuild and the index will start to sync
  • Once sync it should stay in sync and work on the tickets view.

I’m getting this worked into the docs.

Thank you for your response.
Now I’m getting the following error in the log:

5/13 13:10:23 [Child:ElasticSearch:26552] - e[34mdebuge[39m:  message=[mapper_parsing_exception] Root mapping definition has unsupported parameters:  [doc : {properties={owner={properties={email={analyzer=email, type=text}}}, uid={search_analyzer=standard, analyzer=leadahead, type=text}, comments={properties={owner={properties={email={analyzer=email, type=text}}}, comment={search_analyzer=standard, analyzer=leadahead, type=text}}}, notes={properties={owner={properties={email={analyzer=email, type=text}}}, note={search_analyzer=standard, analyzer=leadahead, type=text}}}, issue={search_analyzer=standard, analyzer=leadahead, type=text}, subject={search_analyzer=standard, analyzer=leadahead, type=text}, dateFormatted={search_analyzer=standard, analyzer=leadahead, type=text}}}], status=400, displayName=BadRequest, stack=Error: [mapper_parsing_exception] Root mapping definition has unsupported parameters:  [doc : {properties={owner={properties={email={analyzer=email, type=text}}}, uid={search_analyzer=standard, analyzer=leadahead, type=text}, comments={properties={owner={properties={email={analyzer=email, type=text}}}, comment={search_analyzer=standard, analyzer=leadahead, type=text}}}, notes={properties={owner={properties={email={analyzer=email, type=text}}}, note={search_analyzer=standard, analyzer=leadahead, type=text}}}, issue={search_analyzer=standard, analyzer=leadahead, type=text}, subject={search_analyzer=standard, analyzer=leadahead, type=text}, dateFormatted={search_analyzer=standard, analyzer=leadahead, type=text}}}]
    at respond (D:\trudesk\node_modules\elasticsearch\src\lib\transport.js:308:15)
    at checkRespForFailure (D:\trudesk\node_modules\elasticsearch\src\lib\transport.js:267:7)
    at HttpConnector.<anonymous> (D:\trudesk\node_modules\elasticsearch\src\lib\connectors\http.js:165:7)
    at IncomingMessage.wrapper (D:\trudesk\node_modules\lodash\lodash.js:4935:19)
    at IncomingMessage.emit (events.js:194:15)
    at endReadableNT (_stream_readable.js:1125:12)
    at process._tickCallback (internal/process/next_tick.js:63:19), path=/trudesk, , body={"settings":{"index":{"number_of_replicas":0},"analysis":{"filter":{"leadahead":{"type":"edge_ngram","min_gram":1,"max_gram":20},"email":{"type":"pattern_capture","preserve_original":true,"patterns":["([^@]+)","(\\p{L}+)","(\\d+)","@(.+)"]}},"analyzer":{"leadahead":{"type":"custom","tokenizer":"standard","filter":["lowercase","leadahead"]},"email":{"tokenizer":"uax_url_email","filter":["email","lowercase","unique"]}}}},"mappings":{"doc":{"properties":{"uid":{"type":"text","analyzer":"leadahead","search_analyzer":"standard"},"subject":{"type":"text","analyzer":"leadahead","search_analyzer":"standard"},"issue":{"type":"text","analyzer":"leadahead","search_analyzer":"standard"},"dateFormatted":{"type":"text","analyzer":"leadahead","search_analyzer":"standard"},"comments":{"properties":{"comment":{"type":"text","analyzer":"leadahead","search_analyzer":"standard"},"owner":{"properties":{"email":{"type":"text","analyzer":"email"}}}}},"notes":{"properties":{"note":{"type":"text","analyzer":"leadahead","search_analyzer":"standard"},"owner":{"properties":{"email":{"type":"text","analyzer":"email"}}}}},"owner":{"properties":{"email":{"type":"text","analyzer":"email"}}}}}}}, statusCode=400, response={"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters:  [doc : {properties={owner={properties={email={analyzer=email, type=text}}}, uid={search_analyzer=standard, analyzer=leadahead, type=text}, comments={properties={owner={properties={email={analyzer=email, type=text}}}, comment={search_analyzer=standard, analyzer=leadahead, type=text}}}, notes={properties={owner={properties={email={analyzer=email, type=text}}}, note={search_analyzer=standard, analyzer=leadahead, type=text}}}, issue={search_analyzer=standard, analyzer=leadahead, type=text}, subject={search_analyzer=standard, analyzer=leadahead, type=text}, dateFormatted={search_analyzer=standard, analyzer=leadahead, type=text}}}]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters:  [doc : {properties={owner={properties={email={analyzer=email, type=text}}}, uid={search_analyzer=standard, analyzer=leadahead, type=text}, comments={properties={owner={properties={email={analyzer=email, type=text}}}, comment={search_analyzer=standard, analyzer=leadahead, type=text}}}, notes={properties={owner={properties={email={analyzer=email, type=text}}}, note={search_analyzer=standard, analyzer=leadahead, type=text}}}, issue={search_analyzer=standard, analyzer=leadahead, type=text}, subject={search_analyzer=standard, analyzer=leadahead, type=text}, dateFormatted={search_analyzer=standard, analyzer=leadahead, type=text}}}]","caused_by":{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters:  [doc : {properties={owner={properties={email={analyzer=email, type=text}}}, uid={search_analyzer=standard, analyzer=leadahead, type=text}, comments={properties={owner={properties={email={analyzer=email, type=text}}}, comment={search_analyzer=standard, analyzer=leadahead, type=text}}}, notes={properties={owner={properties={email={analyzer=email, type=text}}}, note={search_analyzer=standard, analyzer=leadahead, type=text}}}, issue={search_analyzer=standard, analyzer=leadahead, type=text}, subject={search_analyzer=standard, analyzer=leadahead, type=text}, dateFormatted={search_analyzer=standard, analyzer=leadahead, type=text}}}]"}},"status":400}, toString=function () {
      return msg + ' :: ' + JSON.stringify(metadata);
    }, toJSON=function () {
      return _.assign({
        msg: msg
      }, metadata);
    }

Looking into this…

FYI, getting the same error here.

@jackd942 are you using ES6 or ES7?

@polonel Started out with 7.3 on a brand new install. Hit this error. Blew that away and stepped down to 7.2 because of some of the breaking changes I read about. Same error. Do I need to move down to 6? Thanks!

Yes I would try that. I haven’t tested fully with 7 and all my deployments are running 6.4.

@polonel Just blew away 7 and installed 6.8. Looks like everything is working. Thanks again!