0

varnish server gives back error message:

Error 503 Backend fetch failed
Backend fetch failed

Guru Meditation:
XID: 131307

varnish log info:

Varnish cache server   
# varnishlog -q 'RespStatus == 503'
*   << Request  >> 131307
-   Begin          req 196933 rxreq
-   Timestamp      Start: 1577129611.804607 0.000000 0.000000
-   Timestamp      Req: 1577129611.804607 0.000000 0.000000
-   ReqStart       172.19.0.1 57376
-   ReqMethod      GET
-   ReqURL /index.php/admin/customer/index/index/key/a1cb5649e0727c563c92b6873c654c996b94a4729dfdb8247ef3b57350c20ff2/
-   ReqProtocol    HTTP/1.1
-   ReqHeader      Host: m2.docker
-   ReqHeader      Connection: keep-alive
-   ReqHeader      Upgrade-Insecure-Requests: 1
-   ReqHeader      User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36
-   ReqHeader      Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
-   ReqHeader      Referer: http://m2.docker/index.php/admin/admin/system_store/index/key/3685fd86510c4b9c1f7796f25f1b7fda21adcab527d13b0c3822bcb2d207ae40/
-   ReqHeader      Accept-Encoding: gzip, deflate
-   ReqHeader      Accept-Language: en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7
-   ReqHeader      Cookie: admin=3c2d07d3c163dd84faed04865f7e1401; form_key=CgVTpyUNua3s7Ynq; private_content_version=e105233d30e3e7553aa81958343c8dfb; AMCVS_8F99160E571FC0427F000101%40AdobeOrg=1; s_cc=true; mage-translation-storage=%7B%7D; mage-translation-file-version=%7
-   ReqHeader      X-Forwarded-For: 172.19.0.1
-   VCL_call       RECV
-   ReqURL         /index.php/admin/customer/index/index/key/a1cb5649e0727c563c92b6873c654c996b94a4729dfdb8247ef3b57350c20ff2/
-   ReqUnset       Accept-Encoding: gzip, deflate
-   ReqHeader      Accept-Encoding: gzip
-   ReqURL         /index.php/admin/customer/index/index/key/a1cb5649e0727c563c92b6873c654c996b94a4729dfdb8247ef3b57350c20ff2/
-   ReqURL         /index.php/admin/customer/index/index/key/a1cb5649e0727c563c92b6873c654c996b94a4729dfdb8247ef3b57350c20ff2/
-   ReqURL         /index.php/admin/customer/index/index/key/a1cb5649e0727c563c92b6873c654c996b94a4729dfdb8247ef3b57350c20ff2/
-   VCL_return     hash
-   VCL_call       HASH
-   VCL_return     lookup
-   Debug          "XXXX MISS"
-   VCL_call       MISS
-   VCL_return     fetch
-   Link           bereq 196935 fetch
-   Timestamp      Fetch: 1577129676.180708 64.376101 64.376101
-   RespProtocol   HTTP/1.1
-   RespStatus     503
-   RespReason     Backend fetch failed
-   RespHeader     Date: Mon, 23 Dec 2019 19:34:36 GMT
-   RespHeader     Server: Varnish
-   RespHeader     Content-Type: text/html; charset=utf-8
-   RespHeader     Retry-After: 5
-   RespHeader     X-Varnish: 196934
-   RespHeader     Age: 0
-   RespHeader     Via: 1.1 varnish-v4
-   VCL_call       DELIVER
-   RespUnset      Age: 0
-   RespUnset      Server: Varnish
-   RespUnset      X-Varnish: 196934
-   RespUnset      Via: 1.1 varnish-v4
-   VCL_return     deliver
-   Timestamp      Process: 1577129676.180742 64.376135 0.000034
-   RespHeader     Content-Length: 283
-   Debug          "RES_MODE 2"
-   RespHeader     Connection: keep-alive
-   Timestamp      Resp: 1577129676.180834 64.376226 0.000092
-   Debug          "XXX REF 1"
-   ReqAcct        1658 0 1658 175 283 458
-   End

I have used the 'default.vcl' from Magento 2 backend export.

3
  • Have you tried restarting php-fpm, nginx/apache, varnish, in that order? Can you also post your httpd or nginx configuration regarding the varnish? Commented Dec 23, 2019 at 21:19
  • Hi Savcas, thank you so much for your reply. I'm using docker image to make the Magento 2 dev environment. The web server is apache not Niginx.
    – Jeff Yu
    Commented Dec 23, 2019 at 21:34
  • Does this answer your question? Magento 2 503 Backend Fetch Failed Commented Oct 26, 2023 at 13:08

1 Answer 1

0

for me this issue got resolved when i disabled magento csp module in local

php bin/magento module:disable Magento_Csp
php bin/magento c:f

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.