0
Answered

Doesn't connect to elasticsearch

teknik 2 years ago updated 2 years ago 7

Hi,

Using filerun's latest version (2018.11.11) on Ubuntu 16.04,everything works fine except filerun is not connecting to elasticsearch.

As you can see on screenshots elasticsearch up and running and reachable through bot lan and wan but when i goto Searching->Enable file indexing->Test Server then loading spin turns but does nothing. Am i missing something ?

Answer

Answer
Answered

Time to upgrade ElasticSearch. FileRun has and will be only tested with ElastSearch version 6.0 as the oldest version.

ElasticSearch version 2 reached end of life a year back.

If FileRun fails to connect to the server, it will actually say so as a result of pressing the "Test server" button. If you are not getting any feedback, there is some different problem. You should check the PHP error log.

this is the log output when i click to test button :

[Wed Apr 03 13:41:05.762140 2019] [:error] [pid 3123] [client 192.168.1.7:61973] PHP Fatal error: Uncaught Elasticsearch\\Common\\Exceptions\\BadRequest400Exception: {"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"No handler for type [keyword] declared on field [path]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [all]: No handler for type [keyword] declared on field [path]","caused_by":{"type":"mapper_parsing_exception","reason":"No handler for type [keyword] declared on field [path]"}},"status":400} in /var/www/html/system/classes/vendor/Elasticsearch/Connections/Connection.php:615\nStack trace:\n#0 /var/www/html/system/classes/vendor/Elasticsearch/Connections/Connection.php(279): Elasticsearch\\Connections\\Connection->process4xxError(Array, Array, Array)\n#1 /var/www/html/system/classes/vendor/React/Promise/FulfilledPromise.php(25): Elasticsearch\\Connections\\Connection->Elasticsearch\\Connections\\{closure}(Array)\n#2 /var/www/html/system/classes/vendor/GuzzleHttp/Ring/Future/CompletedFutureValue.php(55): React\\Promise\\FulfilledPromise->then(Object(Closure), NULL, NU in /var/www/html/system/classes/vendor/Elasticsearch/Connections/Connection.php on line 615, referer: http://192.168.1.190:9099/?module=cpanel&_popup_id=popups_1

ok problem fixed. I've uninstalled and re-installed elasticsearch and now it's connecting without any problem.

The thing makes me confuse is should i install both Tika and Elasticsearch or just Elasticsearch is enough by it's own ?

Tika is used only for extracting text contents from non-plain-text files, such as PDFs or office files. ElasticSearch is used only for indexing and searching.

I've the same problem, the logs as follwoing:

[03-Apr-2019 19:25:56 UTC] PHP Fatal error: Uncaught Elasticsearch\Common\Exceptions\BadRequest400Exception: {"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"No handler for type [keyword] declared on field [path]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [all]: No handler for type [keyword] declared on field [path]","caused_by":{"type":"mapper_parsing_exception","reason":"No handler for type [keyword] declared on field [path]"}},"status":400} in /var/www/wiki/system/classes/vendor/Elasticsearch/Connections/Connection.php:615
Stack trace:
#0 /var/www/wiki/system/classes/vendor/Elasticsearch/Connections/Connection.php(279): Elasticsearch\Connections\Connection->process4xxError(Array, Array, Array)
#1 /var/www/wiki/system/classes/vendor/React/Promise/FulfilledPromise.php(25): Elasticsearch\Connections\Connection->Elasticsearch\Connections\{closure}(Array)
#2 /var/www/wiki/system/classes/vendor/GuzzleHttp/Ring/Future/CompletedFutureValue.php(55): React\Promise\FulfilledPromise->then(Object(Closure), NULL, NU in /var/www/wiki/system/classes/vendor/Elasticsearch/Connections/Connection.php on line 615

it looks like versioning problem. I'm using external elastic search and it work just fine with a lot of other apps.

i cannot reinstall it.

can you advice?

Answer
Answered

Time to upgrade ElasticSearch. FileRun has and will be only tested with ElastSearch version 6.0 as the oldest version.

ElasticSearch version 2 reached end of life a year back.

Vlad is right, i was using elasticsearch 2x when i had the problem,i've uninstalled and updated to 6x then problem solved, you need to upgrade your elasticsearch version.