ByteInternet / hypernode-docker

Fast and easy Docker for Magento development
https://community.hypernode.io/hypernode-docker
35 stars 8 forks source link

502 Bad Gateway Connection refused? #73

Closed Aquive closed 1 year ago

Aquive commented 1 year ago

I get a 502 Bad Gateway error when trying to open an url. I checked all "usual suspects", but could not find the issue. I can open a *.txt file in the browser which is on the filesystem. But when I try to open a PHP file I get the error.

2022/12/07 15:43:16 [error] 1374#1374: *118 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.1, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nag-m2.hypernode.local", referrer: "http://app.hypernode.local/" What is the issue? And how can I solve it?

vdloo commented 1 year ago

sounds like there's something wrong with your php-fpm process. do you see it running in your process list (ps auxf | grep php) and can you attach to the PHP screen as the root user? (screen -x)

Aquive commented 1 year ago
root@203da2c863cd ~ # screen -x
There are several suitable screens on:
        11197.hypernode_service_mailhog (12/07/2022 06:18:19 PM)        (Detached)
        11190.hypernode_service_mysql   (12/07/2022 06:18:19 PM)        (Detached)
        11209.hypernode_service_varnish (12/07/2022 06:18:19 PM)        (Detached)
        11176.hypernode_service_nginx   (12/07/2022 06:18:18 PM)        (Detached)
        11179.hypernode_service_redis   (12/07/2022 06:18:18 PM)        (Detached)
Type "screen [-d] -r [pid.]tty.host" to resume one of them.

When I do htop and filter for php I get 0 results. I already tried /etc/my_init.d/60_restart_services.sh

And

ps auxf | grep php
root       11572  0.0  0.0   6016   880 pts/4    S+   18:22   0:00  |               \_ grep php

Any ideas?

Aquive commented 1 year ago

@vdloo you pointed me in the right direction somehow /etc/hypernode/magweb.json had PHP version 8.1 listed in it but this version is not available in the image I have, so it was skipping starting of the PHP version. Fixed it by using a valid version. Thanks!