GoteoFoundation / goteo

Goteo Version 3, the Open Source Crowdfunding Platform
http://goteo.org
GNU Affero General Public License v3.0
187 stars 132 forks source link

ERROR: FPM initialization failed #616

Closed SpinnakerRun closed 6 days ago

SpinnakerRun commented 2 months ago

I installed the goteo docker image following the instructions here: https://goteofoundation.github.io/goteo/docs/developers/docker.html

I'm getting http 502 bad gateway response:

  1. browser to my ec2 my.ec2.ip.addr:8081
  2. curl on my ec2 to the docker, ie, curl http://localhost:8081
  3. I opened a shell inside the nginx image and did a curl inside the container. That also gives a 502.

So, it seems the image just isn't running correctly? Or maybe it's because I'm a newbie to this project. Here's how I tried to run it on an ec2 medium ubuntu instance:

sudo apt install net-tools

sudo apt-get update

sudo apt-get install -y ca-certificates curl gnupg lsb-release

sudo mkdir -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

sudo systemctl status docker

sudo usermod -aG docker $USER

newgrp docker

git clone https://github.com/GoteoFoundation/goteo.git

cd goteo/

cp config/docker-settings.yml config/local-docker-settings.yml

docker compose up

goteo-php | loading tasks 655ms ▇▇ 4% goteo-php | copy:devel 3s ▇▇▇▇▇▇▇▇▇ 17% goteo-php | sass:devel 13.6s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 79% goteo-php | Total 17.3s goteo-php | goteo-php | Pointing nginx server as DEVELOPMENT (index_dev.php) goteo-php | goteo-php | System ready! goteo-php | goteo-php | USER_ID: 0 goteo-php | DEBUG: 1 goteo-php | GOTEO_CONFIG_FILE: /application/config/local-docker-settings.yml goteo-php | goteo-php | You can point your browser now to: goteo-php | goteo-php | //0.0.0.0:8081 goteo-php | goteo-php | Check all mailing activity in: goteo-php | goteo-php | localhost:8082 goteo-php | goteo-php | goteo-php | [26-Aug-2024 05:10:53] ERROR: [pool www] please specify user and group other than root goteo-php | [26-Aug-2024 05:10:53] ERROR: FPM initialization failed goteo-php exited with code 0

Looks like this container failed to launch? Any ideas why ...

davidbeig commented 2 months ago

Hi @SpinnakerRun,

I believe people have faced this problem before, did you check previous issues? in #118 there are some insights to how other solved them, mostly due with the priviledges granted to the user that executed docker.

The last three messages in the log show that it's being executed as root, did you do it? if so, then do it with another user, and add it to the docker group.

Still this docker compose is only for development purposes.

Hope this helps!

davidbeig commented 6 days ago

Closing because of no response.