Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 503 Backend fetch failed on OSX #34

Open
gukandrew opened this issue Aug 14, 2019 · 19 comments
Open

Error 503 Backend fetch failed on OSX #34

gukandrew opened this issue Aug 14, 2019 · 19 comments

Comments

@gukandrew
Copy link

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 gukandrew changed the title Error 503 Backend fetch failed Error 503 Backend fetch failed on OSX Aug 14, 2019
@fballiano
Copy link
Owner

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

@gukandrew
Copy link
Author

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.

@fballiano
Copy link
Owner

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
Copy link
Owner

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.

@julienloizelet
Copy link

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.

@skapin
Copy link

skapin commented Aug 29, 2019

@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

@julienloizelet
Copy link

julienloizelet commented Aug 29, 2019

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.

@skapin
Copy link

skapin commented Aug 29, 2019

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
Copy link

skapin commented Aug 29, 2019

@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
Copy link

skapin commented Aug 29, 2019

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

@MirkoHuf
Copy link

MirkoHuf commented Dec 4, 2019

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

@fballiano
Copy link
Owner

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)

@matthews52180
Copy link

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

@sergei-sss
Copy link

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

@SamCritch
Copy link

SamCritch commented Oct 9, 2020

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.

@iizno
Copy link

iizno commented Dec 5, 2020

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

@aunhappy
Copy link

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

@aunhappy
Copy link

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/

@rhathas
Copy link

rhathas commented Jun 16, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests