# NoAliveNodes Elasticsearch-PHP (Ingest-Attachment)

**URL:** <https://discuss.elastic.co/t/noalivenodes-elasticsearch-php-ingest-attachment/324151>\
**Category:** Elasticsearch\
**Created:** [January 28, 2023, 8:33am UTC](https://discuss.elastic.co/t/noalivenodes-elasticsearch-php-ingest-attachment/324151 "2023-01-28T08:33:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SplendX](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/splendx/32/116560_2.png) [@SplendX](https://discuss.elastic.co/u/SplendX)\
**Post date:** [January 28, 2023, 8:33am UTC](https://discuss.elastic.co/t/noalivenodes-elasticsearch-php-ingest-attachment/324151/1 "2023-01-28T08:33:52Z")

</div>

Hello, I'm new to programming. when used in php-es code "**return $client-\>ingest()-\>putPipeline($params);**" outputs an error "NoAliveNodes", but when using for example "**return $client-\>index($params);**" it works! Plugin Ingest-Attachment installed version 8.2.0 as well as ES and Kibana. I use PuTTY to connect to the server, and test everything on httpd with php 7.4. SElinux disable, ports are open in the firewall. Here is an example of code that does not work, and gives an error "NoAliveNodes".

```auto
require_once "connect.php";
    $client = \Elasticsearch\ClientBuilder::create()->build();
    $params = [
        'id' => 'attachment',
        'body' => [
            'description' => 'Extract attachment information',
            'processors' => [
                [
                    'attachment' => [
                        'field' => 'content',
                        'indexed_chars' => -1
                    ]
                ]
            ]
        ],
        
    ];
    return $client->ingest()->putPipeline($params);
  

```

When deleting return "$client-\>ingest()-\>putPipeline($params);" and using "return $client-\>index($params);" there is no error, but the code does not work even when I try to use print\_r($params);

---

<div class="post-metadata">

**Author:** ![SplendX](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/splendx/32/116560_2.png) [@SplendX](https://discuss.elastic.co/u/SplendX)\
**Post date:** [January 30, 2023, 7:21pm UTC](https://discuss.elastic.co/t/noalivenodes-elasticsearch-php-ingest-attachment/324151/2 "2023-01-30T19:21:12Z")

</div>

**I found the problem in elasticsearch.yml, needed to be replaced with #network.host:0.0.0.0**

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 27, 2023, 7:21pm UTC](https://discuss.elastic.co/t/noalivenodes-elasticsearch-php-ingest-attachment/324151/3 "2023-02-27T19:21:38Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
