ARTIFACTORY: How to fix database ping failed error when having SSL on RDS database

AuthorFullName__c
Prakriti Vishwakarma
articleNumber
000005979
FirstPublishedDate
2024-01-14T15:36:17Z
lastModifiedDate
2025-07-22

ARTIFACTORY: How to fix database ping failed error when having SSL on RDS database

Issue Description

During the setup of Artifactory with an SSL-enabled Database, an error may occur during Artifactory initialization, indicating a failure to establish a connection with the Database.

[TRACE] JDBC to PostgreSQL URL conversion: begin
[INFO ] No ssl parameter found, falling back to sslmode=disable
[TRACE] JDBC to PostgreSQL URL conversion: end
Database ping failed with error pq: no pg_hba.conf entry for host "123.11.12.90", user "artifactory", database "artifactory", no encryption
Database connection check failed <nil>

 

Solution

To address this issue, you can assess the SSL status of the Database by executing the following query:

SHOW SSL;

This query will provide output indicating whether the SSL mode is set to 'on' or 'off' in the database.

When SSL mode is enabled, you should include sslmode='require' in the JDBC URL within the system.yaml file located at $JFROG_HOME/artifactory/var/etc/. This configuration allows Artifactory to establish a secure connection with the Database.

shared:
  database:
    type: postgresql
    driver: org.postgresql.Driver
    url: jdbc:postgresql://<your db url, for example:localhost:5432>/artifactory?sslmode=require
    username: artifactory
    password: password