ARTIFACTORY: How to debug connection timeout could not find database table: db_properties

ARTIFACTORY: How to debug connection timeout could not find database table: db_properties

Products
Frog_Artifactory
Content Type
Installation_Setup
AuthorFullName__c
Paul Pan
articleNumber
000006547
FirstPublishedDate
2025-09-02T10:02:48Z
lastModifiedDate
2025-09-02
VersionNumber
1
Introduction 

If your artifactory failed to start up with the following error message in artifactory service log:

connection timeout could not find database table: db_properties
It usually means there is an issue with artifactory connecting to the database.

Debug 

If you have a database client available ( or if you can install one ), your first debug step should be trying a remote connection to the database
Take PostgreSQL, for example:
psql -h <host> -p 5432 -U <artifactory_user> <artifactory_db>

If you don’t have any database client or are not able to install one, you can follow the steps below to test connections:
1. Go to a directory where you have permission to.
cd /tmp  

2.
Copy the jdbc driver from tomcat lib ( you could also use the jdbc driver of your choice to test if different JDBC version helps )

$cp /opt/jfrog/artifactory/app/artifactory/tomcat/lib/postgresql-42.7.2.jar postgresql-42.7.2.jar 

3.
Create the test script

touch JdbcConnectionTester.java and fill in the connection details
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class JdbcConnectionTester {
    // ---===[ FİLL IN YOUR DETAILS HERE ]===---
    private static final String JDBC_URL = "jdbc:postgresql://your_database_host:5432/your_db";
    private static final String USER = "your_username";
    private static final String PASSWORD = "your_password";

    public static void main(String[] args) {
        Connection connection = null;
        try {
            // Attempt to establish the connection
            System.out.println("Attempting to connect to the database...");
            connection = DriverManager.getConnection(JDBC_URL, USER, PASSWORD);

            // If the connection is successful, the next line will be printed
            if (connection != null) {
                System.out.println("Connection successful!");
                System.out.println("Database Product Name: " + connection.getMetaData().getDatabaseProductName());
                System.out.println("Database Product Version: " + connection.getMetaData().getDatabaseProductVersion());
            }

        } catch (SQLException e) {
            // If the connection fails, an exception will be caught and details printed
            System.err.println("Connection failed!");
            e.printStackTrace();

        } finally {
            // Ensure the connection is closed
            if (connection != null) {
                try {
                    connection.close();
                    System.out.println("Connection closed.");
                } catch (SQLException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}


4. Build with jdbc driver
/opt/jfrog/artifactory/app/third-party/java/bin/javac -cp .:postgresql-42.7.2.jar JdbcConnectionTester.java

5.
Run with jdbc driver

/opt/jfrog/artifactory/app/third-party/java/bin/java -cp .:postgresql-42.7.2.jar JdbcConnectionTester

If the test indicates that connections are fine, it means there could be something specific with Tomcat instead. 

You can follow these steps to enable the finest level logging with tomcat JDBC:
In /opt/jfrog/artifactory/app/artifactory/tomcat/conf/logging.properties
Add the following:
# PostgreSQL JDBC log level
org.postgresql.level = FINEST
org.postgresql.jdbc.PgConnection = FINEST
org.postgresql.Driver.handlers = java.util.logging.ConsoleHandler

You might see logs like this in tomcat-catalina log:
[Context/CookieProcessor] failed to set property [forwardSlashIsSeparator] to [false]
14-May-2025 16:54:58.793 FINE [Catalina-utility-1] org.postgresql.jdbc.PgConnection.<init> PostgreSQL JDBC Driver 42.7.2
14-May-2025 16:54:58.793 FINE [Catalina-utility-1] org.postgresql.jdbc.PgConnection.setDefaultFetchSize   setDefaultFetchSize = 0
14-May-2025 16:54:58.794 FINE [Catalina-utility-1] org.postgresql.jdbc.PgConnection.setPrepareThreshold   setPrepareThreshold = 5
14-May-2025 16:54:58.799 FINE [Catalina-utility-1] org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl Trying to establish a protocol version 3 connection to mydatabaseUrl:5432
14-May-2025 16:54:58.807 FINE [Catalina-utility-1] org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect Receive Buffer Size is 117,696
14-May-2025 16:54:58.807 FINE [Catalina-utility-1] org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect Send Buffer Size is 166,400
14-May-2025 16:54:58.864 FINE [JFrog HikariCP Main connection adder] org.postgresql.jdbc.PgConnection.<init> PostgreSQL JDBC Driver 42.7.2
14-May-2025 16:54:58.864 FINE [JFrog HikariCP Main connection adder] org.postgresql.jdbc.PgConnection.setDefaultFetchSize   setDefaultFetchSize = 0
14-May-2025 16:54:58.865 FINE [JFrog HikariCP Main connection adder] org.postgresql.jdbc.PgConnection.setPrepareThreshold   setPrepareThreshold = 5
14-May-2025 16:54:58.865 FINE [JFrog HikariCP Main connection adder] org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl Trying to establish a protocol version 3 connection to mydatabaseUrl:5432
14-May-2025 16:54:58.867 FINE [JFrog HikariCP Main

The logs indicate that Artifactory Tomcat is trying to establish a connection with the database, however, that connection has timed out and never returned. 
Given that our test connection script is working, it’s likely that connection attempts are stuck in some network layer.
So next step is to try to change the database url to its IP address instead.
Then we see artifactory comes up just fine, and further debugging on the DNS server maybe needed with your network team.