title: yii2 elasticsearch | Make sure a GET /_nodes
body: <p>I installed elasticsearch and try to make a request, but in response I get an error</p>
  
  <pre><code>Cluster autodetection did not find any active node. Make sure a GET /_nodes reguest on the hosts defined in the config returns the "http_address" field for each node.
  </code></pre>
  
  <p>when i run the command <code>CURL -X GET http://localhost:9200</code></p>
  
  <pre><code>{
    "name" : "DS12IC4",
    "cluster_name" : "elasticsearch_denysmaksiura",
    "cluster_uuid" : "YzFUXRS6SPmObJcC4bv_ag",
    "version" : {
      "number" : "6.8.5",
      "build_flavor" : "oss",
      "build_type" : "tar",
      "build_hash" : "78990e9",
      "build_date" : "2019-11-13T20:04:24.100411Z",
      "build_snapshot" : false,
      "lucene_version" : "7.7.2",
      "minimum_wire_compatibility_version" : "5.6.0",
      "minimum_index_compatibility_version" : "5.0.0"
    },
    "tagline" : "You Know, for Search"
  }
  </code></pre>
  
  <p>my main.php file</p>
  
  <pre><code>'elasticsearch' =&gt; [
              'class' =&gt; 'yii\elasticsearch\Connection',
              'nodes' =&gt; [
                  ['http_address' =&gt; 'localhost:9200'],
                  // configure more hosts if you have a cluster
              ],
          ],
  </code></pre>
  
  <p>my controller</p>
  
  <pre><code>$model = new SearchAllForms();
          $dataProvider = $model-&gt;globalSearch(Yii::$app-&gt;request-&gt;queryParams);
          echo"&lt;pre&gt;";
          var_dump($dataProvider-&gt;getModels());
          exit;
  </code></pre>
  
  <p>my model(testing request)</p>
  
  <pre><code>$query = $this::find();
  
          $dataProvider = new ActiveDataProvider([
              'query' =&gt; $query,
              'key' =&gt; 'id'
          ]);
  
          $query-&gt;query(['match' =&gt; ['name' =&gt; 'Гидротест']]);
  
          return $dataProvider;
  </code></pre>
  
  <p>How to remove this error?</p>