Phraseanet icon indicating copy to clipboard operation
Phraseanet copied to clipboard

502 Bad Gateway nginx/1.17.8

Open tarikelbannany opened this issue 4 years ago • 5 comments

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 ?

tarikelbannany avatar Jun 13 '21 20:06 tarikelbannany

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...

nmaillat avatar Jun 14 '21 07:06 nmaillat

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

config/configuration.yml doesn't exist, entering setup...+ '[' -z [email protected] ']'+ '[' -z 'iJRqXU0MwbyJewQLBbra6IWHsWly ' ']'+ /var/alchemy/Phraseanet/bin/setup system:install [email protected] --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 ?

tarikelbannany avatar Jun 14 '21 12:06 tarikelbannany

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

nmaillat avatar Jun 14 '21 17:06 nmaillat

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

h44z avatar Jun 30 '21 14:06 h44z

is there any solution ?

space192 avatar Aug 03 '21 21:08 space192