SplendX
SplendX

Reputation: 1

NoAliveNodes Elasticsearch-PHP (Ingest-Attachment)

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".

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);

Upvotes: 0

Views: 51

Answers (0)

Related Questions