docker-magento2 icon indicating copy to clipboard operation
docker-magento2 copied to clipboard

Error 503 Backend fetch failed on OSX

Open gukandrew opened this issue 6 years ago • 19 comments

I did step by step like readme says. Added magento2.docker into /etc/hosts Started all containers using docker-compose up -d

Then when I visit magento2.docker I expect to see some setup wizard, but only one I got:

Error 503 Backend fetch failed

Backend fetch failed
Guru Meditation:

XID: 48

Varnish cache server

Also tried to start apache2 manually, but without luck. My host os is macOS 10.14.5 (18F132)

Any suggestions?

gukandrew avatar Aug 14 '19 14:08 gukandrew

I was able to reproduce it on a ubuntu machine, I'll try to work on that as soon as possible.

fballiano avatar Aug 26 '19 16:08 fballiano

May be that is because slow startup? I think after waiting about 1,5 hour I was able to open magento home page. It probably because of some docker resources limits. On manjaro linux (arch) docker start everything in ~7min with mostly same hardware.

gukandrew avatar Aug 28 '19 07:08 gukandrew

it's really weird cause on my mac it takes like 15 seconds to spin up all the containers and then also magento it's really fast (latest docker4mac, magento 2.3.2)

fballiano avatar Aug 28 '19 09:08 fballiano

but when I'm on linux (testing on ubuntu with docker 19) I get this error immediately and anyway it takes just a matter of seconds, not minutes.

fballiano avatar Aug 28 '19 09:08 fballiano

I have the same error on Ubuntu 18.04 (docker 19 too).

For information, I saw that the container names used in some scripts like varnishadm.sh, varnishncsa.sh and redis-cli.sh did not match with my container names ( I mean the result of a docker ps command shows me different names ) because I cloned this repo in a folder not called docker-magento2. I was thinking it may cause the issue and I tried to correct it using a key container_name in the docker-composer.yml file (in order to set exactly which name I want) ... but... unfortunately, it was not sufficient to solve the 503 Backend fetch error.

julienloizelet avatar Aug 29 '19 11:08 julienloizelet

@julienloizelet I do have the same trouble. I have let the magento stack in DEFAULT mode and I have NOT run this comande php bin/magento setup:static-content:deploy which set the magento in "compiled" mode, which is BAD practice. I have NO log error anywhere. My folder and contenaire name are the same as required. When i change URL in the DB to acces magento without passing by Varnish it works. The First response take more than 5 secondes to come. I think, something is wrongly setup, and the vanish timeout to magento, (sanity check) and then display no backend for this reason. When putting the server in PRODUCTION mode, varnish works and give result (no more 503 guru)

BUT the first response take 1.3 sec to pop out. I have a full dedicated server with XEON (Debian10). So it's not hardware trouble in anyway. I have 0 data /extension or theme setup ... This should be faster

Thi is weird because yesturday I did a fresh install (like today) but I have no trouble like this. I'm digging

skapin avatar Aug 29 '19 11:08 skapin

As mentionned here, I tried to change /pub/health_check.php by /health_check.php in the varnish.vcl file. I do not have the Varnish error anymore but I'm now stuck with an other Magento error... But this is maybe a good start ....

EDIT : well, in fact, my change has finally solved nothing ... I still have the backend fetch error.

julienloizelet avatar Aug 29 '19 11:08 julienloizelet

You can share your error. But this is weird. I will change it like you said but it works in PRODUCTION (but too long for fresh install with nothing..)

thank you

skapin avatar Aug 29 '19 11:08 skapin

@julienloizelet for the record, i do not use the SSLc ontenaire but TRAEFIK. when removing /pub/, it just dont work anymore, even in prod.

skapin avatar Aug 29 '19 11:08 skapin

For the record, CACHE was DISABLED. by activating it php /bin/magento cache:enable Everything went well. TTFB at 0.113ms instead of ...5.3s

skapin avatar Aug 29 '19 12:08 skapin

Hi, I have the same Error on a Virtualbox Linux Ubuntu 18.04 Server with Docker. However, the mistake did not come immediately. I was able to run the Magento 2 web gui installation up to 27% - but then this error occur.

Now it comes immediately after the system restart.

Anyone have an idea how I can fix this? Thanks in advance. BR Mirko

MirkoHuf avatar Dec 04 '19 22:12 MirkoHuf

However, the mistake did not come immediately. I was able to run the Magento 2 web gui installation up to 27% - but then this error occur.

you've to install via CLI, webinstall never works :-D (it was removed by magento anyways)

fballiano avatar Sep 18 '20 13:09 fballiano

hey I am facing the exact same issue, any work arounds? anyone has a root cause?

matthews52180 avatar Sep 22 '20 01:09 matthews52180

Ubuntu 20.04.1 / Docker version 19.03.13, build 4484c46d9d - same problem...

sergei-sss avatar Sep 28 '20 16:09 sergei-sss

I have this issue on OSX too. :-( I tried the cache trick above but it didn't work. I'm running on a local docker env. Docker 19.03.13 as well.

SamCritch avatar Oct 09 '20 12:10 SamCritch

Same problem on Windows with docker v19.03.13 with the M2.4 branch.

iizno avatar Dec 05 '20 14:12 iizno

same problem here, windows 10, Docker Engine v20.10.2 magento2.3.4-p2

aunhappy avatar Jan 26 '21 11:01 aunhappy

php bin/magento cache:enable get error There are no commands defined in the "cache" namespace. service apache2 start get info [ ok ] Starting Apache httpd web server: apache2. still get error 503 backend fetch failed when open https://magento2.docker/

aunhappy avatar Jan 26 '21 11:01 aunhappy

Same problem, win 10, Docker Wngine v20.10.6, M2.4 branch.

rhathas avatar Jun 16 '21 21:06 rhathas