Oathkeeper giving "Access request denied because roundtrip failed" error for upstream server connection

Hi There,

I’m using oathkeeper to connect to a upstream server which is running on localhost. But it gives me error saying below.

time=“2019-07-07T05:12:50Z” level=info msg=“started handling request” method=GET remote=“172.18.0.1:56246” request=/test/a
time=“2019-07-07T05:12:50Z” level=warning msg=“Access request denied because roundtrip failed” access_url=“http://127.0.0.1:4457/test/a” error=“dial tcp 127.0.0.1:4457: connect: connection refused” granted=false
2019/07/07 05:12:50 http: proxy error: dial tcp 127.0.0.1:4457: connect: connection refused
time=“2019-07-07T05:12:50Z” level=info msg=“completed handling request” measure#oathkeeper-proxy.latency=93853298 method=GET remote=“172.18.0.1:56246” request=/test/a status=502 text_status=“Bad Gateway” took=93.853298ms

Can anybody please help me.

@hackerman could you please help me to find out where the issue is. I have my server running on http://127.0.0.1:4457/ and http://127.0.0.1:4457/test/a is a reachable page. But from oathkeepr docker instance it seems not reachable. I was following https://www.ory.sh/docs/oathkeeper/configure-deploy to run oathkeeper.

Docker networks do not work the same way localhost works. Please read https://docs.docker.com/network/