docker-magento2
docker-magento2 copied to clipboard
Error 503 Backend fetch failed on OSX
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?
I was able to reproduce it on a ubuntu machine, I'll try to work on that as soon as possible.
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.
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)
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.
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 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
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.
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
@julienloizelet for the record, i do not use the SSLc ontenaire but TRAEFIK. when removing /pub/, it just dont work anymore, even in prod.
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
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
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)
hey I am facing the exact same issue, any work arounds? anyone has a root cause?
Ubuntu 20.04.1 / Docker version 19.03.13, build 4484c46d9d - same problem...
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.
Same problem on Windows with docker v19.03.13 with the M2.4 branch.
same problem here, windows 10, Docker Engine v20.10.2 magento2.3.4-p2
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/
Same problem, win 10, Docker Wngine v20.10.6, M2.4 branch.