将AWS EC2 postgresql与docker apache超集容器连接

将AWS EC2 postgresql与docker apache超集容器连接,postgresql,amazon-ec2,apache-superset,Postgresql,Amazon Ec2,Apache Superset,我正在AWS EC2 ubuntu操作系统中运行postgresql。我已成功连接到pgAdmin。我还成功地运行了apache superset的docker容器并成功登录 当我尝试使用以下命令将超集链接到postgresql数据库时: **Database *** testdb **SQLAlchemy URI ***postgresql+psycopg2://myuser:mypassword@awsUbuntupublicIP:5432/testdb 我得到下面的错误 错误:连接失败

我正在AWS EC2 ubuntu操作系统中运行postgresql。我已成功连接到pgAdmin。我还成功地运行了apache superset的docker容器并成功登录

当我尝试使用以下命令将超集链接到postgresql数据库时:

**Database *** testdb
**SQLAlchemy URI ***postgresql+psycopg2://myuser:mypassword@awsUbuntupublicIP:5432/testdb 
我得到下面的错误
错误:连接失败,请检查您的连接设置。

您是否检查了EC2实例安全组上的入站端口设置?我已将端口打开为PostgreSQL TCP 5432 0.0.0/0您是否检查了EC2实例安全组上的入站端口设置?我已将端口打开为PostgreSQL TCP 5432 0.0.0/0