简体   繁体   English

Azure PostgreSQL 服务器的数据库:主机没有 pg_hba.conf 条目

[英]Azure Database for PostgreSQL server: no pg_hba.conf entry for host

In my Azure portal I created the resource "Azure Database for PostgreSQL server".在我的 Azure 门户中,我创建了资源“PostgreSQL 服务器的 Azure 数据库”。 I set up the firewall to enable two Virtual Networks (in order to allow the correct functioning of two applications) and the IP address of my local computer (in order to be able to work on the database using DBeaver as client).我设置了防火墙以启用两个虚拟网络(以允许两个应用程序正常运行)和我本地计算机的 IP 地址(以便能够使用 DBeaver 作为客户端在数据库上工作)。 This has worked for several months although, since I have a dynamic IP address, I often have to change the enabled address.虽然这已经工作了几个月,但由于我有一个动态的 IP 地址,我经常不得不更改启用的地址。 Now I'm trying to update it but, when I try to connect to the database via DBeaver, I get the following error:现在我正在尝试更新它,但是当我尝试通过 DBeaver 连接到数据库时,出现以下错误:

FATAL: no pg_hba.conf entry for host "XX.XX.XX.XX", user "myuser", database "mydatabase", SSL on

where "XX.XX.XX.XX" is exactly the IP address I have enabled in Azure.其中“XX.XX.XX.XX”正是我在 Azure 中启用的 IP 地址。

I tried to install a second Client (pgAdmin) but I get the same error.我试图安装第二个客户端(pgAdmin),但我得到了同样的错误。 Also, since my applications that use the database seem to work properly, I tried to verify the connection data that I use in DBeaver (host, database, user, password) but they are all correct.此外,由于我使用数据库的应用程序似乎工作正常,我尝试验证我在 DBeaver 中使用的连接数据(主机、数据库、用户、密码),但它们都是正确的。

In Azure, in the "Connection security" tab of my database (see image below) I read the following warning:在 Azure 中,在我的数据库的“连接安全”选项卡中(见下图),我阅读了以下警告:

Some network environments may not report the actual public-facing IP address needed to access your server. Contact your network administrator if adding your IP address does not allow access to your server.

So changing the IP address has no effect?那么改IP地址没有效果? How can I solve the problem?我该如何解决这个问题?

在此处输入图像描述

I solved the problem by restarting the database: https://docs.microsoft.com/en-us/azure/postgresql/howto-restart-server-portal我通过重新启动数据库解决了这个问题: https://docs.microsoft.com/en-us/azure/postgresql/howto-restart-server-portal

In the Azure Portal change require_secure_transport from server parameters to OFF .在 Azure 门户中,将require_secure_transport从服务器参数更改为OFF

make ssl connection non mandatory in server parameters for postgres service in azure, its dynamic parameter so no postgres service restart not required使 ssl 连接在 azure 中的 postgres 服务的服务器参数中不是必需的,它的动态参数因此不需要 postgres 服务重启

or fix/configure application to use secure(ssl) connections only或修复/配置应用程序以仅使用安全(ssl)连接

在此处输入图像描述

暂无
暂无

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

相关问题 错误:'没有主机的 pg_hba.conf 条目' 将 Django 与 PostgreSQL 一起使用? - Error: 'no pg_hba.conf entry for host' using Django with PostgreSQL? Azure PostgreSql 连接致命:主机“xx.xx.xx.xx”、用户“xyz”、数据库“xyz”、SSL 上没有 pg_hba.conf 条目 - Azure PostgreSql Connection FATAL: no pg_hba.conf entry for host "xx.xx.xx.xx", user "xyz", database "xyz", SSL on psql:主机没有 pg_hba.conf 条目,无法连接到服务器 - psql: no pg_hba.conf entry for host, could not connect to server Postgresql“没有pg_hba.conf条目”错误 - Postgresql “no pg_hba.conf entry” error 致命:主机“ fe80 :: 1%lo0”没有pg_hba.conf条目 - FATAL: no pg_hba.conf entry for host “fe80::1%lo0” 当入侵者更改pg_hba.conf文件时,是否可以通过pgAdmin保护PostgreSQL访问? - Is there any way to protect PostgreSQL access via pgAdmin when an intruder changes pg_hba.conf file? 我收到此错误 28000:在 .Net Core 项目中应用迁移时主机“XXX.xx.xx.192”没有 pg_hba.conf 条目 - iam getting this error 28000: no pg_hba.conf entry for host "XXX.xx.xx.192" while applying migrations in .Net Core Project pg_hba.conf中的IP范围用于远程访问pgsql - IP range in pg_hba.conf for remote access to pgsql 如何通过在 postgres 的 pg_hba.conf 文件中指定 docker-compose 主机名来允许连接? - How can I allow connections by specifying docker-compose host names in postgres's pg_hba.conf file? 无法连接到数据库Postgres pg_hba(OSX) - Could not connect to database postgres pg_hba (OSX)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM