alchemy-fr / Phraseanet

Digital Asset Management PHP app
http://www.phraseanet.com
Other
246 stars 101 forks source link

502 Bad Gateway nginx/1.17.8 #3810

Open xbaker opened 3 years ago

xbaker commented 3 years ago

After deploying docker containers for the latest version 4.1.3 with no error and when i try to get to http://localhost:8082/ i got a big nice error !

502 Bad Gateway
nginx/1.17.8

do you have any idea ?

nmaillat commented 3 years ago

Hello, Without further description of the context and the container's logs (Phraseanet, Gateway, DB etc ...), it is difficult to make a precise diagnosis but often at the first launch of the stack, the installation of the Phraseanet application delays the launch from the FPM process, the Gateway (Nginx) container, tries to reach the Phraseanet container too early and returns a 502. A docker-compose down then a docker-compose up -d or just restarting the Gateway(Nginx) container should solve the problem. Another possibility is that the application installation failed , so you have to look the LOGS of the containers DB, Phraseanet etc...

xbaker commented 3 years ago

Thanks for reply i have this log output in container phraseanet-413_phraseanet_1

config/configuration.yml doesn't exist, entering setup...+ '[' -z admin@alchemy.fr ']'+ '[' -z 'iJRqXU0MwbyJewQLBbra6IWHsWly ' ']'+ /var/alchemy/Phraseanet/bin/setup system:install --email=admin@alchemy.fr --password=iJRqXU0MwbyJewQLBbra6IWHsWly --db-host=db --db-port=3306 --db-user=root --db-password=root --db-template=DublinCore --appbox=ab_master --databox=db_databox1 --server-name=localhost --download-path=./datas/download --lazaret-path=./datas/lazaret --caption-path=./tmp/caption --worker-tmp-files=./tmp/worker --data-path=/var/alchemy/Phraseanet/datas -yPHP Warning: require_once(/var/alchemy/Phraseanet/bin/../vendor/autoload.php): failed to open stream: No such file or directory in /var/alchemy/Phraseanet/bin/setup on line 33PHP Fatal error: require_once(): Failed opening required '/var/alchemy/Phraseanet/bin/../vendor/autoload.php' (include_path='.:/usr/local/lib/php') in /var/alchemy/Phraseanet/bin/setup on line 33config/configuration.yml doesn't exist, entering setup...

so what i did is move configuration.sample.yml to configuration.yml in config dir and then o got

config/configuration.yml exists, skip setup.PHP Warning: require_once(/var/alchemy/Phraseanet/bin/../vendor/autoload.php): failed to open stream: No such file or directory in /var/alchemy/Phraseanet/bin/setup on line 33 PHP Fatal error: require_once(): Failed opening required '/var/alchemy/Phraseanet/bin/../vendor/autoload.php' (include_path='.:/usr/local/lib/php') in /var/alchemy/Phraseanet/bin/setup on line 33

any idea ?

nmaillat commented 3 years ago

i think you launch the stack in "dev" mode but the vendor is missing read this https://github.com/alchemy-fr/Phraseanet#stack-description-and-customization

and this https://github.com/alchemy-fr/Phraseanet#development-mode

h44z commented 3 years ago

I solved this by simply removing the docker-compose.override.yml from the root folder. After that phraseanet started normally.

space192 commented 3 years ago

is there any solution ?