ElasticSearch on local server with Laragon

Old Nick

Well-known member
I try to install ES on a local server (powered by Laragon).
I used this tutorial : https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/installation.html

I correctly installed composer and ElasticSearch, but I stuck on the following command:
composer require 'vendor/autoload.php';

1675542558175.png

So I did it this way and got some results:
Code:
C:\laragon\www
λ cd vendor

C:\laragon\www\vendor
λ autoload.php

C:\laragon\www\vendor
λ [main 2023-02-06T18:44:40.809Z] update#setState idle
[main 2023-02-06T18:44:41.764Z] [UtilityProcess id: 1, type: extensionHost, pid: <none>]: creating new...
[main 2023-02-06T18:44:41.782Z] [UtilityProcess id: 1, type: extensionHost, pid: 3724]: successfully created
[main 2023-02-06T18:44:43.755Z] [UtilityProcess id: 1, type: extensionHost, pid: 3724]: waiting to exit...
[main 2023-02-06T18:44:43.774Z] [UtilityProcess id: 1, type: extensionHost, pid: 3724]: received exit event with code 0
[main 2023-02-06T18:44:43.774Z] Extension host with pid 3724 exited with code: 0, signal: unknown.

Not sure I understand, was the command executed correctly?

Anyway, I'm completely lost with the rest...
$client = Elastic\Elasticsearch\ClientBuilder::create()->build();
What to do with that??

Thanks.
 
Are you installing on a local Windows machine or something else?
Yes, on my Windows PC.

I tried to setup ES as your tutorial indicate and i think the client is loaded:
Code:
[2023-02-08T09:00:08,361][INFO ][o.e.n.Node               ] [PC-NICOLAS] started {PC-NICOLAS}{ZEp9l8KnSni9CG_nqdILug}{CcYrq_URSc2JBYysox6vjA}{PC-NICOLAS}{127.0.0.1}{127.0.0.1:9300}{cdfhilmrstw}{ml.allocated_processors_double=8.0, xpack.installed=true, ml.machine_memory=8423460864, ml.allocated_processors=8, ml.max_jvm_size=4211081216}

127.0.0.1:9300
So i use this IP and port in ES settings (ACP XF) but when i test the connection i receive this error on the terminal:
Code:
[2023-02-08T09:00:44,517][WARN ][o.e.x.c.s.t.n.SecurityNetty4Transport] [PC-NICOLAS] received plaintext traffic on an encrypted channel, closing connection Netty4TcpChannel{localAddress=/127.0.0.1:9300, remoteAddress=/127.0.0.1:54595, profile=default}

Don't know if i have to connect with HTTPS but if it's is the case idk the USERNAME and PASSWORD i must use.
 
Like this it doesn't trigger error in Terminal but still can't connect to the ES server.
I tried https://localhost:9300 on a browser but error time out.

I'm going to start from the beginning with a clear head...
 
Back
Top Bottom