I have installed redash using docker on my local mac. installation looks fine.
I have a list of datasources on AWS-RDS(mysql), and a mysql(in an Ec2), mongodb(ec2), snowflake
But i see its connecting to snowflake alone as its not hosted by us.
Whereas the other connections timed out. I tried allowing ports 5000, 5678(redash docker server) or allowing all ip’s/ports on ec2(0.0.0.0/0), still i wasn’t able to connect. It looks more like docker issue related. Am new to docker as well. Any help would be appreciated asap. Looks like common problem others faced. But don’t see any straight forward answer.
Note: With the same config i can connect from my IDE - datagrip to the mysql/mongodb without any issue.
These errors usually mean that you haven’t enabled network access between Redash and your database server(s). Are the databases also running on your Mac?
Yes, it is able to connect to internet. I just found that am connecting through VPN. So is it possible that VPN is blocking, any settings needs to be enabled in docker as if it’s connecting from my laptop?
That’s a bit beyond my element. More of a docker question than a Redash one. You can test it by SSH’ing into the server and then trying to connect to your database directly.
Just run docker ps to see your list of containers and then:
docker exec -it <mycontainer> bash
to effectively SSH into it. Then see about connecting to your data source or pinging it.
Also check your VPN settings to see if there’s a firewall in place. This seems a likely culprit.
Okay, I got the problem now,
Solution worked for me: Order of starting services matters. Restart Docker if you have connected to VPN. Order should be start VPN and then start DOCKER.
May be am stupid with DOCKER, but if it helps someone…
Problem history and analysis
Initially after redash self hosted docker setup on my mac, none of the datasources(mysql/mongodb running aws instances) can be connected from it, but was able to connect to snowflake which was managed by snowflake.
So i thought there were problems with my instances not allowing ports or ip which requires whitelisting.
But wait, i can connect from laptop locally through IDE’s like sqlPro or Datagrip to these mysql instances though i did not whitelist my mac ip nor the instances are allowing all ip’s/ports.
My instances allows all ip’s though our VPN, thats why connection from my local works, coz am connected to VPN.
So its not instances that has problems, but docker does not go through VPN was what my assumption, so started digging in that direction, and i got a whole lot of answers on it, one of them was the order of how you start your DOCKER and VPN matters. I had to restart docker after connecting to VPN that changes docker connect through VPN. Phew!!! that was 2-weeks of docker networking and aws networking and VPN… Now i think i can connect anything