简体   繁体   English

地址不可用 服务器是否在该主机上运行并接受 TCP/IP 连接?

[英]Address not available Is the server running on that host and accepting TCP/IP connections?

I am using PostgreSQL 14.4 inside Docker, and pgAdmin inside Docker for Windows.我在 Docker 中使用 PostgreSQL 14.4,在 Docker for Windows 中使用 pgAdmin。

My command I used我使用的命令

docker run -d --name vy_posgres_for_acc -p 5432:5432 -e POSTGRES_PASSWORD=postgres -e POSTGRES_USER=postgres -e PGDATA=D:\docker_mount\postgres\data postgres:latest


docker run -d -p 5050:80 -e PGADMIN_DEFAULT_EMAIL=donhuvy@hotmail.com -e PGADMIN_DEFAULT_PASSWORD=postgres dpage/pgadmin4:latest

# Go to http://localhost:5050/login PG admin 6.10

Error of pgAdmin pgAdmin 的错误

Address not available Is the server running on that host and accepting TCP/IP connections?

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

How to fix it?如何解决?

Since you have multiple containers you want to use together, one way to handle things like this is to use Docker Compose .由于您有多个要一起使用的容器,因此处理此类事情的一种方法是使用Docker Compose You create a Compose file, which is a YAML file declaring your containers.您创建一个 Compose 文件,它是一个用于声明您的容器的 YAML 文件。 When you use docker compose to start them, it will create a network for you containing all the containers.当您使用docker compose启动它们时,它将为您创建一个包含所有容器的网络。 They'll then be able to access each other by host name (which defaults to the service name you use in the Compose file).然后,它们将能够通过主机名(默认为您在 Compose 文件中使用的服务名称)相互访问。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 服务器是否在主机“localhost”(::1) 上运行并在端口 5432 上接受 TCP/IP 连接? - Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? django 无法连接到服务器:权限被拒绝服务器是否在主机上运行并在端口远程主机上接受 TCP/IP 连接 - django could not connect to server: Permission denied Is the server running on host and accepting TCP/IP connections on port remote host psql:无法连接到服务器:连接被拒绝服务器是否在主机“ localhost”(:: 1)上运行并在端口5432上接受TCP / IP连接? - psql: could not connect to server: Connection refused Is the server running on host “localhost” (::1) and accepting TCP/IP connections on port 5432? 连接到“localhost”的服务器,端口 5432 失败:连接被拒绝服务器是否在该主机上运行并接受 TCP/IP 连接? - connection to server at "localhost" , port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? 无法连接到服务器:连接被拒绝 服务器是否在主机上运行……并接受端口 5432 上的 TCP/IP 连接? - could not connect to server: Connection refused Is the server running on host … and accepting TCP/IP connections on port 5432? 无法连接到服务器:连接被拒绝 服务器是否在主机“127.0.0.1”上运行并接受端口 5432 上的 TCP/IP 连接? - Could not connect to server: Connection refused Is the server running on host “127.0.0.1” and accepting TCP/IP connections on port 5432? linux 中的导轨。 服务器是否在主机“localhost”(::1) 上运行并接受端口 5432 上的 TCP/IP 连接? - Rails in linux. Is the server running on host “localhost” (::1) and accepting TCP/IP connections on port 5432? Postgresql:连接被拒绝 服务器是否在主机“127.0.01”(127.0.0.1)上运行并接受端口 5432 上的 TCP/IP 连接? - Postgresql: Connection refused Is the server running on host “127.0.01” (127.0.0.1) and accepting TCP/IP connections on port 5432? 从 EC2 实例连接到 RDS 时出现问题:服务器是否在主机上运行/接受端口 5432 上的 TCP/IP 连接? - Problem connecting to RDS from EC2 instance: Is the server running on host/accepting TCP/IP connections on port 5432? Rails 服务器是否在主机“localhost”(127.0.0.1)上运行并接受端口 5432 上的 TCP/IP 连接? - Rails Is the server running on host “localhost” (127.0.0.1) and accepting TCP/IP connections on port 5432?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM