akeneo / pim-community-dev

[Community Development Repository] The open source Product Information Management (PIM)
http://www.akeneo.com
Other
956 stars 518 forks source link

Unable to install following docs #20327

Open Kimbaras opened 1 year ago

Kimbaras commented 1 year ago

Ok so, I'm following the instructions provided on

and

My system is a fresh Ubuntu 22.04 install (I've also reinstalled the OS and tried again before opening this). Followed the instructions by the letter, but when I'm at the step

$ NO_DOCKER=true make prod

The installation fails with the following

Prepare database schema Database does not exist yet 11:53:23 CRITICAL [console] Error thrown while running command "doctrine:database:create --if-not-exists=1 --no-debug=1 --env=dev". Message: "An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known" ["exception" => Doctrine\DBAL\Exception\ConnectionException^ { …},"command" => "doctrine:database:create --if-not-exists=1 --no-debug=1 --env=dev","message" => "An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known"]

By troubleshooting I've found the the setting inside the .env file are reverted to the default ones, so the pointing to the DB, the user and password and so on are lost, no matter what the command is.

Is there something missing in the doc or there is some bug going on?

Thanks

StevenVAIDIE commented 1 year ago

Hello Kimbaras,

Did you know when your .env have been reverted ? In my opinion you just need to change again your .env file and then launch again NO_DOCKER=true make prod

Kimbaras commented 1 year ago

Hello Kimbaras,

Did you know when your .env have been reverted ? In my opinion you just need to change again your .env file and then launch again NO_DOCKER=true make prod

Hey!

Thanks for the fast reply.

Not really sure on WHEN it gets reverted... Basically I've executed composer create-project akeneo/pim-community-standard /srv/pim "7.0.*@stable" as per docs Then customized the .env file with my local settings, and lastly executed NO_DOCKER=true make prod

After the process exits with the error reported, checking the .env file inside the /srv/pim directory, it's again with the default values.

Editing the .env and running again the make prod command results in the same results over and over.

I'm not really an expert with composer and / or yarn so I'm not really sure which line should catch my eye about this...

I'm currently trying the docker router right now, but also that seems to be having it troubles (that is a different story tho)...

Kimbaras commented 1 year ago

I believe there is a missing / unclear step on the docs...

According to the CE docks (which by the way seems not to be updated as they reference the v6.0 version while the docker and EE pages reference for v7.0, minor detail) After either running composer create-project akeneo/pim-community-standard /srv/pim "7.0.*@stable" or extracting the archive I should

Schermata 2023-10-20 alle 12 24 36

Where exactly? All the reference I've found either talks about /srv/pim or the folder where the archive is extracted but the result is the same for both options...

Thanks

Kimbaras commented 1 year ago

Ok, some updates...

Following a mix of the guides for the CE and the EE setups, I've made a little step further... Running composer create-project akeneo/pim-community-standard /srv/pim "7.0.*@stable" NO_DOCKER=true make prod

Resulted in the problem described in the issue and that still persist.

I've downloaded the tar.gz archive, extracted (tried both /opt/akeneo and /srv/pim, same results for both) and run composer install Then edited the .env file and lastly NO_DOCKER=true make prod

With this "flow" it kept the changes to the .env file BUT there is a new error in the deploy, which is Schermata 2023-10-20 alle 13 24 17

So yeah, I'm having an hard time getting it to work and I'm not really sure where the issue is...

Thanks

rakibulinux commented 1 year ago

Ok, some updates...

Following a mix of the guides for the CE and the EE setups, I've made a little step further... Running composer create-project akeneo/pim-community-standard /srv/pim "7.0.*@stable" NO_DOCKER=true make prod

Resulted in the problem described in the issue and that still persist.

I've downloaded the tar.gz archive, extracted (tried both /opt/akeneo and /srv/pim, same results for both) and run composer install Then edited the .env file and lastly NO_DOCKER=true make prod

With this "flow" it kept the changes to the .env file BUT there is a new error in the deploy, which is Schermata 2023-10-20 alle 13 24 17

So yeah, I'm having an hard time getting it to work and I'm not really sure where the issue is...

Thanks

@StevenVAIDIE I'm getting same issues.

rakibulinux commented 1 year ago

Ok, some updates...

Following a mix of the guides for the CE and the EE setups, I've made a little step further... Running composer create-project akeneo/pim-community-standard /srv/pim "7.0.*@stable" NO_DOCKER=true make prod

Resulted in the problem described in the issue and that still persist.

I've downloaded the tar.gz archive, extracted (tried both /opt/akeneo and /srv/pim, same results for both) and run composer install Then edited the .env file and lastly NO_DOCKER=true make prod

With this "flow" it kept the changes to the .env file BUT there is a new error in the deploy, which is Schermata 2023-10-20 alle 13 24 17

So yeah, I'm having an hard time getting it to work and I'm not really sure where the issue is...

Thanks

@Kimbaras bro. I have fixed it by change

sudo nano /etc/elasticsearch/elasticsearch.yml 

# Enable security features
xpack.security.enabled: true

# Enable security features
xpack.security.enabled: false
Kimbaras commented 1 year ago

@rakibulinux thanks for the tip! But did you get it to run after that?

With the change you suggested themake prod command completed successfully and according to the docs that should be enough to have it run on port 8080, but that seem not the case...

Tried also pointing the Apache config to the public folder (as described in the system preparation page but not on the software installation page... no reference to Apache in https://docs.akeneo.com/master/install_pim/manual/installation_ce.html) but getting a different error... error

Definetely there is something missing in the docs here... and to be honest I've already invested more time than I'd like in trying to install this. Anyway, I'll leave this open as it's confirmed there are at least two different errors / bugs in the installation process following the docs that should be, at least acknowledged.

Thanks!

Patchfox commented 1 year ago

@Kimbaras Please check, if apache2 has the right permissions in /public rather in the project folder

Kimbaras commented 1 year ago

@Kimbaras Please check, if apache2 has the right permissions in /public rather in the project folder

I assume the right permission are www-data or whichever user Apache2 uses. Then yes, the permissions are right on /public folder

Patchfox commented 1 year ago

Ok, I only wrote the tip, because I thought the same. But after several changes in the troubleshooting process, it changed the permissions again on my site. So to reconfigure the permission recursively was my solution that the website no longer show a 500 error

Kimbaras commented 1 year ago

Ok, I only wrote the tip, because I thought the same. But after several changes in the troubleshooting process, it changed the permissions again on my site. So to reconfigure the permission recursively was my solution that the website no longer show a 500 error

Uhm, to be fair, after cheking, after I've completed the last make prod command, the permissions inside the folder were a mix of the previously set www-data:www-data and root, so it seems the make command changes something.

I'll try to fix the permissions again and retry.

Thanks

Kimbaras commented 1 year ago

Nope, it wasn't that, still getting the 500...

Anywhere to look for details logs of what is happening?

tylergibson commented 9 months ago

After fiddling with this for hours, the final solution that worked for me:

chmod the entire pim folder and its parents all the way to root as 0755 recursive so the apache user www-data can read it.

setting user and group in /etc/php/8.1/fpm/pool.d/www.conf to my created user, but leaving listen.owner = www-data and listen.group = www-data

disabling security in elasticsearch - /etc/elasticsearch/elasticsearch.yml - xpack.security.enabled = false

and about 30 extra steps missing from the documentation so I could actually follow the documentation.

jch4nni commented 6 months ago

i had similar issues and managed to fix this with the same solution as @tylergibson, but i am still getting a 500 on /#/enrich/product/ which is called with collect-data on the product page - meaning when i open the product page it just shows loading forever. Any solutions here?

edit; i fixxed the issue, after re-checking the logs i noticed my elasticsearch service went down.