Reputation: 1
Have any one tried connecting to postgresql from Jenkins and trying to run the script?
I had installed postgresql database plugin in jenkins And then in the Jenkins Configuration Tool I had tried configuring the postgresql When i try Test connection am getting an error as shown in the below image.
I am using a windows machine and have tried accessing the database using padmin and also tried via psql in command prompt they works fine but now connecting with jenkins am getting the following error
org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "223.228.174.18", user "jxxxxxxxxl", database "dxxxxxxxxx", SSL off
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:293)
Upvotes: 0
Views: 3734
Reputation: 1
I was able to fix this issue by adding two parameters in the Additional Properties in the Jekins Configurations for postgresql. Please find the attached image. Fix Image1
Upvotes: 0
Reputation: 7844
Find the postgresql.conf
file and edit.
In this file, if present update or add the '*'
for the listen_address
like one given below
listen_addresses = '*'
Locate the pg_hba.conf
file (normally found at: pgsql/data/pg_hba.conf
) and update that as below
host all all 0.0.0.0/0 md5
Restart the postgresql service like
service postgresql restart
Note: In a linux based OS, it will normally look like
/etc/init.d/postgresql restart
or
service postgresql restart
Upvotes: 1