首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >带有消息“在您的集群中找不到活动节点”的NoNodesAvailableException - Laravel 5.2和Heroku Searchbox添加

带有消息“在您的集群中找不到活动节点”的NoNodesAvailableException - Laravel 5.2和Heroku Searchbox添加
EN

Stack Overflow用户
提问于 2016-06-29 00:02:12
回答 0查看 2K关注 0票数 0

我已经下载了Elasticsearch到我的本地,我已经成功地在本地主机上运行了elasticsearch。我目前正在Laravel 5.2上使用elasticquent,当我试图从本地主机('localhost:9200')切换到添加索引时,它提示下面的错误。

代码语言:javascript
复制
Psy Shell v0.7.2 (PHP 5.5.12 ΓÇö cli) by Justin Hileman
>>> App\Products::createIndex($shards = null, $replicas = null);
Elasticsearch\Common\Exceptions\NoNodesAvailableException with message 'No alive
 nodes found in your cluster'

当我使用localhost时,它运行得很好,并且能够立即创建索引。

这是我的配置文件(config\elasticquent.php)

代码语言:javascript
复制
<?php

return array(

    /*
    |--------------------------------------------------------------------------
    | Custom Elasticsearch Client Configuration
    |--------------------------------------------------------------------------
    |
    | This array will be passed to the Elasticsearch client.
    | See configuration options here:
    |
    | http://www.elasticsearch.org/guide/en/elasticsearch/client/php-api/current/_configuration.html
    */

    'config' => [
        //'hosts'     => ['http://xxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@dori-xx-xxx-1.searchly.com:9300'],
        'hosts'     => ['localhost:9200'],

        'retries'   => 1,
    ],

    /*
    |--------------------------------------------------------------------------
    | Default Index Name
    |--------------------------------------------------------------------------
    |
    | This is the index name that Elasticquent will use for all
    | Elasticquent models.
    */

    'default_index' => 'bossing_default_index',

);

我想知道这是否与集群名称有关,但找不到如何使用elasticquent.php配置文件更改集群名称的文档。请帮帮忙。提前谢谢你。

我的searhbox主机运行得很好。

顺便说一句,这是指向elasticquent:https://github.com/elasticquent/Elasticquent的链接,我目前使用的是elasticsearch 2.3.xx

EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38081082

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档