2016-06-28 2 views
0

ローカルにElasticsearchをダウンロードしました。ローカルホスト上でelasticsearchを正常に実行しました。私は現在Laravel 5.2でelasticquentを使用しています。ローカルホスト( 'localhost:9200')から切り替えてインデックスを追加しようとすると、以下のエラーが表示されました。NoNodesAvailableException - 「クラスタ内にアライブノードが見つかりません」 - Laravel 5.2およびHeroku Searchbox上に追加

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を使用していますが、正常に動作していて、すぐにインデックスを作成できました。

これは私の設定ファイル(設定の\ elasticquent.php)

<?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:[email protected]ori-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 私は現在、(あなたは、ホストのためにそれは私の作品をこのようにポート80を使用しようとすることができ2.3.xx

答えて

1

をelasticsearch使用しているだけで作られましたテストアカウント):

http://[user]:[pass]@bifur-eu-west-1.searchly.com:80

希望これは私がポート80を使用するのでは考えていない、私はこの今夜をテストするだろうと私はUPDAのために返されます、 ミハイル

+0

を支援しますテ。私はelasticsearchに自分のモデルをマップするのに苦労しているので、これがうまくいくことを願っています。ありがとう。 –

関連する問題