我使用springboot data和postgres创建了一个示例java项目。我开始制作我的docker-compose,但我无法将我的数据库链接到我的应用程序...
我有这个错误
web_1 | org.postgresql.util.PSQLException: Connection to localhost:5438 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
在我的应用程序资源上
server:
po
我正试图在Docker中运行一个开发环境。
我有一个包含4个服务的docker-compose文件:前台、postgres、pgadmin4和节点/快递。如果我在Docker和Express本地运行postgres,我可以连接到数据库。如果我尝试在Docker中运行Express和Postgres,Express正在工作,我还可以通过pgadmin4连接postgres,但我得到:
FATAL: no PostgreSQL user name specified in startup packet
当我尝试连接到数据库的端点时。
在Google搜索之后,我认为这与环境变量由于某些原因而没有正确
我正在Docker中设置一个使用Django和Postgres的应用程序。我无法从应用程序连接到Postgres。我跑步的时候:
docker-compose run web python manage.py runserver
docker-compose run web python manage.py migrate
我得到以下错误:
django.db.utils.OperationalError: could not connect to server: No such file or directory
Is the server running local
我的postgres在运行windows server 2012的AWS实例中。我的桌面在本地机器上。
当使用外部实例IP和默认postgres端口5432连接到DB时,它将显示错误
无法连接到ODBC数据源。
检查是否安装了必要的驱动程序,以及连接属性是否有效。
无法连接到服务器"ec2-xx.xx.xx.xx.ap-south-1.compute.amazonaws.com".
检查服务器是否正在运行,并且您是否有访问请求数据库的权限。
我已确保:
为所有传入端口配置AWS安全组。
Windows server 2012防火墙正在接受所有入站通信量。
我
我刚刚在雪豹上安装了PostgreSQL,无法通过pgAdmin 3连接到数据库服务器。
我在我的本地机器上,但是我一直收到这个错误:
Could not connect to server: connection refused. Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5423?
谈到Postgres,我是个菜鸟,所以我不太清楚问题出在哪里。
但是,我可以通过命令行,通过psql -U postgres登录,并成功启动和停止服
我正在尝试设置我的基本Go应用程序来建立到Postgres数据库的连接。我使用docker-compose将两者都用作服务。当我运行docker-compose up时,当Go应用程序试图连接到Postgres时,我得到了一个超时错误。一些错误或丢失的东西阻止了我的Go应用程序能够连接到Postgres。 docker-compose.yml services:
api:
build: .
ports:
- 8080:8080
environment:
- GOPATH=/go # set up GOPATH in container to