Azure Database for PostgreSQL flexible server Private access, connection issues from Looker Studio

Sam S Kumar 20 Reputation points
2025-06-02T07:49:53.5733333+00:00

I have a Azure postgres flexible server replica running with private access.

My intention is to connect this replica with Looker studio for reporting and analytics but I am failing to establish a connection.

What I am trying -

  • I created a Azure Virtual Machine in the same private sub net of the postgres replica
  • I am able to succesfully connect to psql from this VM
  • I installed a haproxy in the VM to mask the IP while connecting from Looker studio

I see the following in the error logs of postgres while attempting a connection from Looker Studio -

2025-06-01 18:31:01 UTC-683c9c65.b8b-FATAL: no pg_hba.conf entry for host "172.16.5.12", user "mishipay_user", database "mpmain", SSL off

I see that 172.16.5.12 is the private IP of the VM.

Following is the config of /etc/haproxy/haproxy.cfg

global

    log /dev/log    local0 debug

    log /dev/log    local1 notice

    chroot /var/lib/haproxy

    stats socket /run/haproxy/admin.sock mode 660 level admin

    stats timeout 30s

    user haproxy

    group haproxy

    daemon

defaults

    log     global

    mode    tcp

    option  tcplog

    timeout connect 30s

    timeout client  60s

    timeout server  300s

resolvers azure_dns

    nameserver dns1 168.63.129.16:53

    hold valid 10s

frontend pgsql_front

    bind *:5433

    mode tcp

    option tcplog

    default_backend pgsql_back

backend pgsql_back

    mode tcp

    option tcplog

    server <psqlendpoint>:5432 check

Azure Database for PostgreSQL
{count} votes

Accepted answer
  1. Saraswathi Devadula 4,765 Reputation points Microsoft External Staff Moderator
    2025-06-05T12:08:04.4+00:00

    Hello Sam S Kumar

    Following our discussion, you were unable to connect to the server from the Looker Studio when the SSL is On.

    In further investigation, when SSL was disabled on the PostgreSQL server, the application was able to connect successfully, confirming the issue was related to SSL configuration.

    • We advised to download all root CA certificates related to the PostgreSQL server and converted all certificates to PEM format. Combined the PEM certificates into a single file.
    • This combined certificate file was used for establishing the SSL connection from the application.
    • After completing these steps, you were able to connect to the PostgreSQL database with SSL enabled.

    I hope this has been helpful!

    Your feedback is important so please take a moment to accept answers. If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!

    If this answers your query, do click Accept Answer and Upvote for was this answer helpful.
    User's image


1 additional answer

Sort by: Most helpful
  1. Alberto Morillo 34,661 Reputation points MVP Volunteer Moderator
    2025-06-03T01:22:16.1566667+00:00

    Configure NSG (Network Security Group) and Azure Firewall, if used, to allow incoming traffic on port 5432 from Google IP ranges. You can find Google IP ranges here. Google's IP address ranges can change over time.

    You should connect Looker Studio to the public IP address of the VM.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.