Добрый день.
Нуб, учусь. Есть проект, дали посмотреть, сказали , сам разберешься. Поставил на Windows10,OpenServer.
При открытии получаю ошибку.
ElasticSearch стоит, по localhost:9200 и 127.0.0.1:9200 ответ получаю.
Валится на protected\vendor\elasticsearch\elasticsearch\src\Elasticsearch\ConnectionPool\StaticNoPingConnectionPool.php(51)
Elasticsearch\Common\Exceptions\NoNodesAvailableException -- No alive nodes found in your cluster.
В composer.json :"require": { "elasticsearch/elasticsearch": "^7.1"}.
В папке protected\vendor\elasticsearch\elasticsearch\composer.json :
{
"name": "elasticsearch/elasticsearch",
"description": "PHP Client for Elasticsearch",
"keywords": ["search","client", "elasticsearch"],
"type": "library",
"license": "Apache-2.0",
Что и где посмотреть?
Спасибо.
Нуб, "No alive nodes found in your cluster"
Re: Нуб, "No alive nodes found in your cluster"
Разобрался, для ElasticSearch был прописан левый IP. Исправил и получил другую ошибку :
Elasticsearch\Common\Exceptions\Missing404Exception {"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index
[tromb_prod]","resource.type":"index_or_alias","resource.id":"tromb_prod","index_uuid":"_na_","index":"tromb_prod"}],....
Подскажите, где копать.
Elasticsearch\Common\Exceptions\Missing404Exception {"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index
[tromb_prod]","resource.type":"index_or_alias","resource.id":"tromb_prod","index_uuid":"_na_","index":"tromb_prod"}],....
Подскажите, где копать.
Re: Нуб, "No alive nodes found in your cluster"
Теперь создайте индекс.
Re: Нуб, "No alive nodes found in your cluster"
Если бы знал как.
Направте, буду очень благодарен.
Направте, буду очень благодарен.
Re: Нуб, "No alive nodes found in your cluster"
Поискать в консольных командах, миграциях или ещё где-то как он создаётся.
Re: Нуб, "No alive nodes found in your cluster"
Нашел в yicc команду elasticmap. В каталоге command есть файл ElacticMapCommand где создается индекс
class ElasticMapCommand extends CConsoleCommand
{
private $client;
public function run($args)
{
$index = Yii::app()->params['elastic']['index'];
$type = 'good_color';
$orderingMap = [
'type' => 'object',
'properties' => [ ...
Но при запуске yiic elasticmap получаю
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true."}],"type":"illegal_argument_exception","reason":"Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true."}
class ElasticMapCommand extends CConsoleCommand
{
private $client;
public function run($args)
{
$index = Yii::app()->params['elastic']['index'];
$type = 'good_color';
$orderingMap = [
'type' => 'object',
'properties' => [ ...
Но при запуске yiic elasticmap получаю
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true."}],"type":"illegal_argument_exception","reason":"Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true."}
Re: Нуб, "No alive nodes found in your cluster"
Версия вашего ElasticSearch не совпадает с серверной.
Re: Нуб, "No alive nodes found in your cluster"
У меня компе стоит elasticsearch-7.2.0-windows-x86_64,
а в composer.json "require": { "elasticsearch/elasticsearch": "^7.1" }
а в composer.json "require": { "elasticsearch/elasticsearch": "^7.1" }
Re: Нуб, "No alive nodes found in your cluster"
Индекс создался, но все равно Elasticsearch\Common\Exceptions\BadRequest400Exception
{"error":{"root_cause":[{"type":"query_shard_exception","reason":"failed to create query:
Индекс через localhost:9200
концовка индекса
"id": {
"type": "long"
},
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
"sku": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"status": {
"type": "boolean"
}
}
},
"settings": {
"index": {
"creation_date": "1564124057923",
"number_of_shards": "1",
"number_of_replicas": "1",
"uuid": "OfRpEPcvT5mHxvwH_G__nw",
"version": {
"created": "7020099"
}, ...
{"error":{"root_cause":[{"type":"query_shard_exception","reason":"failed to create query:
Индекс через localhost:9200
концовка индекса
"id": {
"type": "long"
},
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
"sku": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"status": {
"type": "boolean"
}
}
},
"settings": {
"index": {
"creation_date": "1564124057923",
"number_of_shards": "1",
"number_of_replicas": "1",
"uuid": "OfRpEPcvT5mHxvwH_G__nw",
"version": {
"created": "7020099"
}, ...