502 Bad Gateway after set-up #130
Description
Hi there,
I am running this on a macbook with High Sierra, and Docker CE Version 18.06.0-ce-mac70 (26399).
I completed the quick set-up (all seemed fine with the magento installer), then guessing from the output of docker ps, I visited
http://localhost:32798
But I get 502 Bad Gateway - nginx/1.9.15
I also added a /etc/hosts entry to point to
127.0.0.1 magento2.docker
And tried visiting
http://magento2.docker:32798
But still the same.
I can see varnish running usingthe varnishlog command in the varnish container. I see the 502 error there too. e.g.
# varnishlog
* << BeReq >> 32774
- Begin bereq 32773 fetch
- Timestamp Start: 1535393431.384210 0.000000 0.000000
- BereqMethod GET
- BereqURL /
- BereqProtocol HTTP/1.1
- BereqHeader Host: magento2.docker:32798
- BereqHeader Pragma: no-cache
- BereqHeader Upgrade-Insecure-Requests: 1
- BereqHeader User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
- BereqHeader DNT: 1
- BereqHeader Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
- BereqHeader Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
- BereqHeader X-Forwarded-For: 172.23.0.1
- BereqHeader Accept-Encoding: gzip
- BereqHeader X-Varnish: 32774
- VCL_call BACKEND_FETCH
- VCL_return fetch
- BackendClose 17 default(172.23.0.6,,80) toolate
- BackendOpen 17 default(172.23.0.6,,80) 172.23.0.7 39786
- Backend 17 default default(172.23.0.6,,80)
- Timestamp Bereq: 1535393431.384616 0.000406 0.000406
- Timestamp Beresp: 1535393434.546414 3.162204 3.161798
- BerespProtocol HTTP/1.1
- BerespStatus 502
- BerespReason Bad Gateway
- BerespHeader Server: nginx/1.9.15
- BerespHeader Date: Mon, 27 Aug 2018 18:10:34 GMT
- BerespHeader Content-Type: text/html; charset=UTF-8
- BerespHeader Content-Length: 575
- BerespHeader Connection: keep-alive
- TTL RFC -1 -1 -1 1535393435 1535393435 1535393434 0 0
- VCL_call BACKEND_RESPONSE
- TTL VCL 0 3600 0 1535393435
- VCL_return deliver
- BerespHeader Content-Encoding: gzip
- BerespUnset Content-Length: 575
- Storage malloc Transient
- ObjProtocol HTTP/1.1
- ObjStatus 502
- ObjReason Bad Gateway
- ObjHeader Server: nginx/1.9.15
- ObjHeader Date: Mon, 27 Aug 2018 18:10:34 GMT
- ObjHeader Content-Type: text/html; charset=UTF-8
- ObjHeader Content-Encoding: gzip
- Fetch_Body 3 length -
- Gzip G F E 575 199 80 1512 1522
- BackendReuse 17 default(172.23.0.6,,80)
- Timestamp BerespBody: 1535393434.546953 3.162743 0.000539
- Length 199
- BereqAcct 448 0 448 172 575 747
- End
I tried disabling varnish (removing the block in docker-compose.yml and add the block for nginx), but after restart I cannot access anything (port 80 - refused to connect).
I can see nginx is running in the web container:
# service nginx status
[ ok ] nginx is running.
Can you give me any ideas/ can I provide further information to assist diagnosis?