Setup URL datasource


Hi ,
I created a URL datasource in redash that is my localhost path http://localhost. I am querying to test.php which return a JSON data.But I am getting following error.

Error running query: HTTPConnectionPool(host=‘localhost’, port=80): Max retries exceeded with url: /test.php (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7fe8d7ccde90>: Failed to establish a new connection: [Errno 111] Connection refused’,))

Pleasse help me to resolve same.



What version of Redash are you running? Hosted or open source? Is test.php being served on the same box that runs Redash?


using 7.0.0 beta is open source. Test.php is my apache localhost.


Is apache running localhost on the same container that runs Redash? Or is it localhost on your actual host? I suspect the issue here is that Redash is attempting to reach localhost inside the container so it can’t see your Apache at all.


Yes, I am alsi thinking same. Have you any idea how can I resolve same in ubuntu. I google same but didn’t find a appropriate solution.


I’m not super familiar with Docker. But you should be able to create a port forward between your Docker container and the host system so that traffic on localhost through some arbitrary port is passed back to your host computer and then handled by Apache.


Another approach that might work - more of a temporary “just getting started” approach than a long term solution - is by using the IP address of your desktop instead of localhost.

For example, on my desktop computer here one of it’s “real” IP addresses is

With Apache running on my desktop computer, by default it binds to every IP address. So a Redash container is able to access the stuff on my local Apache website as

If you’re just trying to get an initial thing working, that’s an easy way to do it. :slight_smile:

Hmmm, if you’re data is in SQLite format and it’s ok to be public, there are easier ways too. :smile:


thanks,its works.Able to do same