I have two servers on the same network with ElasticSearch (one for testing
and one for production), apparently they communicate with each other, and
this information was not clear to me until I have this problem.
After some time using the ElasticSearch to store data, some queries Index
were not working. When I checked the command "curl -XGET http: //
localhost: 9200 / _cluster / health pretty" the result was as follows:
{
"Cluster_name": "ElasticSearch"
"Status", "red",
"Timed_out": false,
"Number_of_nodes": 1,
"Number_of_data_nodes": 1,
"Active_primary_shards": 58,
"Active_shards": 58,
"Relocating_shards": 0,
"Initializing_shards": 0,
"Unassigned_shards": 142,
"Number_of_pending_tasks": 0
}
Researching about the problem, I found two solutions, the first is to erase
all data and start from zero (which is impractical at this stage), the
other solution is to transfer the data indexed in the test server to the
production server and cut connection between them. My problem with the
second alternative is because I have no more data in the testing server
because I manually delete the ElasticSearch on my test server.
I know it's inevitable that I lose some of the data that have been added to
the production server, but I wonder if there is any way to recover the data
of maximum and reurn to add data normally.
Some error logs I found that may be useful:
On ElasticSearch.log when I try to add something:
[2015-04-05 15:55:07] log.ERROR: 503 Server Exception: Server error response
[status code] 503
[reason phrase] Service Unavailable
[url] http://localhost:9200/myindex/mytype
{"error":"UnavailableShardsException[[mixkids][3] Primary shard is not
active or isn't assigned to a known node. Timeout: [1m], request: index
{[myindex][mytype][AUyK7sucZwoXoezgxc43],
source[{"id":"AUyK7styZwoXoezgxc4u","ativo":false,"tipo":"local","nome":"Estacionamento
Maluco","link":"jogos\/crazyparking\/"}]}]","status":503} []
{"file":"/var/folderofmyproject/php/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/GuzzleConnection.php","line":189,"class":"Elasticsearch\Connections\GuzzleConnection","function":"process5xxError"}
On PHP.log when I try to add something:
Fatal error: Uncaught exception 'Guzzle\Http\Exception\ServerErrorResponseException' with message 'Server error response [status code] 503 [reason phrase] Service Unavailable [url] http://localhost:9200/myindex/mytype' in /var/folderofmyproject/php/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/BadResponseException.php:44 Stack trace: #0 /var/folderofmyproject/php/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Request.php(145): Guzzle\Http\Exception\BadResponseException::factory(Object(Guzzle\Http\Message\EntityEnclosingRequest), Object(Guzzle\Http\Message\Response)) #1 [internal function]: Guzzle\Http\Message\Request::onRequestError(Object(Guzzle\Common\Event)) #2/var/folderofmyproject/php/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php(164): call_user_func(Array, Object(Guzzle\Common\Event)) #3 /var/customers/webs/educamix/kids/areadospais/php/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDis in /var/customers/webs/educamix/kids/areadospais/php/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/GuzzleConnection.php on line 198
I using Elasticsearch 1.5 (recently upgraded from 0.9) and PHP
Sorry for my poor English, and all help is welcome.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b3915846-143e-4af8-a99b-962a79e76663%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.