Why i’m getting the error “Failed to check postgres migration version: pq: no pg_hba.conf entry for host “10.196.64.203”, user “xray”, database “xraydb”, SSL off”

Batel Tova
2023-01-22 11:08

The error "Failed to set Postgres statement timeout to 18000000: pq: no pg_hba.conf entry for host "10.196.64.203", user "xray", database "xraydb", SSL off"
Is usually occurring because the secondary node failed to access the PostgreSQL database running on the primary node. Please make sure to allow Client Authentication for the secondary node by editing /var/opt/jfrog/postgres/data/pg_hba.conf, be sure to restart PostgreSQL after you update the configuration file.

Moreover, you will probably need to edit /etc/mongod.conf on the primary node to allow remote access to MongoDB accordingly. This will also require a restart of MongoDB.

Finally, restart the Xray server on the secondary node, after the application of all the above-mentioned changes.