Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install following docs #20327

Open
Kimbaras opened this issue Oct 20, 2023 · 14 comments
Open

Unable to install following docs #20327

Kimbaras opened this issue Oct 20, 2023 · 14 comments

Comments

@Kimbaras
Copy link

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
Copy link
Collaborator

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link

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
Copy link

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
Copy link
Author

Kimbaras commented Oct 21, 2023

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

With the change you suggested the make 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
Copy link

Patchfox commented Nov 4, 2023

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

@Kimbaras
Copy link
Author

Kimbaras commented Nov 6, 2023

@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
Copy link

Patchfox commented Nov 6, 2023

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
Copy link
Author

Kimbaras commented Nov 6, 2023

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
Copy link
Author

Kimbaras commented Nov 6, 2023

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

Anywhere to look for details logs of what is happening?

@tylergibson
Copy link

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
Copy link

jch4nni commented May 10, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants