ARTIFACTORY: Why Artifactory is unable to connect to DB when DB is configured with the pg bouncer

ARTIFACTORY: Why Artifactory is unable to connect to DB when DB is configured with the pg bouncer

AuthorFullName__c
Pranav Hegde
articleNumber
000005624
ft:sourceType
Salesforce
FirstPublishedDate
2023-03-19T09:52:00Z
lastModifiedDate
2023-03-19T09:52:00Z
VersionNumber
1

In certain scenarios, if we configure pg bouncer with the Database and try to connect the Database to Artifactory with the below system.yaml configuration then we face issues with Artifactory while starting, so this article will help to resolve those issues. 
 

## Database Configuration
    database:
        ## One of: mysql, oracle, mssql, postgresql, mariadb
        ## Default: Embedded derby

        ## Example for postgresql
        type: "postgresql"
        driver: "org.postgresql.Driver"
        url: "jdbc:postgresql://DB_HOST_NAME:6432/artifactory?prepareThreshold=0"
        username: "artifactory"

The Artifactory will fail to connect to the DB with the below error.