When using current master (checkout d5e1d01adafff7e42d985537b953f7d5ba506f47) generation of database (php bin/console pim:installer:db --env=prod) errors out on ElasticSearch and does not continue generation of database.
foo@akeneo-dev:~/pim-community-dev$ php bin/console pim:installer:db --env=prod
Prepare database schema
Dropped database for connection namedakeneo_pim
Created databaseakeneo_pim
for connection named default
ATTENTION: This operation should not be executed in a production environment.Creating database schema...
Database schema created successfully!
Nothing to update - your database is already in sync with the current entity metadata.
Reset elasticsearch indexes[ElasticsearchCommon\Exceptions\NoNodesAvailableException]
No alive nodes found in your cluster
Installed using a combination of current information on master documentation on Ubuntu server 17.04
Hi @TheOnlyJoey,
This error is not coming from the PIM, but from Elasticsearch, it seems it doesn't find any alive nodes .
I'd suggest you, to have a look at the existing questions already raised on Elasticsearch forum concerning this error i.e:
https://github.com/elastic/elasticsearch-php/issues/519
https://github.com/elastic/elasticsearch-php/issues/300
Elasticsearch documentation:
https://www.elastic.co/start
https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started.html
I hope this information helps you!
Regards,
Karen
Hey Karen,
So i actually tried multiple version of ElasticSearch already and verified this was not a problem of my local version.
I also had contact with the ElasticSearch developers and they mention its probably the implementation in Akeneo that causes this.
The composer builds fine, so ElasticSearch has build and setup correctly.
I tested on 2 different systems (Ubuntu 16.04 and Debian Sid) and both had the exact same issue regardless of setup.
This error breaks Akeneo from generating a correct database, I think these types of errors are quite lethal a couple of days before release.
@TheOnlyJoey,
Could you share with us your system file information?
Thanks,
Karen
Tested systems are (as mentioned) Ubuntu 16.04 with dependencies installed from the Akeneo documentation (from master) and Debian Sid with latest packages.
Also tested on Ubuntu 17.04 initially. All systems use PHP7.1 as recommended.
@TheOnlyJoey,
We think this could be a connection issue related as this error is usually appearing when using the default value for parameter 'index_hosts' ('localhost:9200').
The working config value is '
You can find the 'index_hosts' param in app/config/parameters.yml
Regards,
Karen
Changing the value to ':@:' results in:
[ElasticsearchCommon\Exceptions\InvalidArgumentException]
Could not parse URI
Also as you can see in https://github.com/akeneo/pim-community-dev/blob/master/app/config/parameters.yml.dist#L13 the default value for index_hosts is 'localhost:9200'
Hello @TheOnlyJoey
Sorry there was a problem on the value's display in the previous comment.
The working config value is:
'<user>:<password>@<server>:<port>'
it is indeed by default 'elastic:changeme@localhost:9200'
Regards,
Karen
It seems that there is no warning or check if ElasticSearch is running, Composer seems to originally have killed the ElasticSearch service.
Restarting the process forced fixed the issue, using normal localhost:9200.
It might be a good idea to make sure ElasticSearch is running in the console pim:installer:db script, since without this, the install will not complete.
i am trying to get akeneo to run with an aws elastic search cluster... getting
In StaticNoPingConnectionPool.php line 51:
No alive nodes found in your cluster
In app/config/parameters.yml i changed the index_host to the aws vpc endpoint - does anyone have any idea?
In my case the index_host value in app/config/parameters.yml was:
localhost :9200
So I removed the white space and now it works fine:
localhost:9200
the solution was port:80... aws uses port 80...
Hi,
i wasted so much time to get this.
localhost:9200 didnt work
localhost: 9200 didnt work
Dont know why akeneo isnt shipping out of the box working containers.
take a look at the documentation
https://docs.akeneo.com/3.0/install_pim/docker/installation_docker.html
in your parameters.yml.dist you have to set
elastic:changeme@elasticsearch:9200
After this:
cleanup the container
docker-compose down -v
start the container
docker-compose up -d
bin/docker/pim-dependencies.sh
bin/docker/pim-initialize.sh
and elasticsearch should work.
So the conneciton string for ElasticSearch Head google chrome plugin is:
(here you can also check if the elasticsearch machine is running)
http://localhost:9210/
elastic : default username for elasticsearch, nowhere set
changeme: default password for elasticsearch, nowhere set
elasticsearch: in the docker-compose.yml you should find "elasticsearch", thats the hostname which is used here.
9200: the used port is set in
docker-compose.override.yml
- '9210:9200'
9200 docker machine port
9210 external port for connecting from your host machine
i am trying to get akeneo to run with an aws elastic search cluster... getting
In StaticNoPingConnectionPool.php line 51:No alive nodes found in your cluster
In app/config/parameters.yml i changed the index_host to the aws vpc endpoint - does anyone have any idea?
did you solve this already?
@Rud5G yes... aws uses port 80...
Please, can someone help me out? I facing the same challenge and I have been on it for hours without any progress.
`In StaticNoPingConnectionPool.php line 53:
No alive nodes found in your cluster
The command terminated with an error code: 1.
Error during PIM installation. The command terminated with an error code: 1.
`
I have followed through all the suggested solutions listed above but there is no change. I am using Akeneo version 3.2.
Most helpful comment
In my case the index_host value in app/config/parameters.yml was:
localhost :9200
So I removed the white space and now it works fine:
localhost:9200