Exceptional cases:

ARTIFACTORY: How to overcome "org.postgresql.util.PSQLException: The hostname xxx.xxx.xxx.xxx could not be verified by hostnameverifier PgjdbcHostnameVerifier" exception while connecting the external PostgreSQL database to Artifactory?

AuthorFullName__c
Yuvarajan Johnpaul
articleNumber
000005219
ft:sourceType
Salesforce
FirstPublishedDate
2022-03-28T08:36:44Z
lastModifiedDate
2023-01-22T11:05:54Z
VersionNumber
2
Let's say the services are in a closed network due to which the database is not having a DNS to be configured, the TLS verification can be skipped by amending the following attributes to the Artifactory Database connection string.
url: "jdbc:postgresql://<DATABASE_URL>/<ARTIFACTORY_DATABASE_NAME>"?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory&sslmode=allow

The hostname verification would be disabled after amending these attributes and the database doesn't verify the trust against the server [Artifactory].

Please note, when TLS encryption is intended by the Database, it is advised to have a secure connection established against the server by configuring the DNS for the database connection as well as using the appropriate certificates in both the client and the server.