"BMC_TS-PL000007F Failed to create database connection" seen in the TrueSight.log and TSPS is not starting

Version 1
    Share This:

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    TrueSight Presentation Server


    TSPS Server


    TrueSight Presentation Server all versions


    ERROR 04/01 15:43:06.678 [main] c.b.t.a.u.DatabaseUtil BMC_TS-PL000007F Failed to create database connection.
    org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
    at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:262)
    at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:52)
    at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:216)
    at org.postgresql.Driver.makeConnection(Driver.java:404)
    at org.postgresql.Driver.connect(Driver.java:272)
    at java.sql.DriverManager.getConnection(DriverManager.java:664)
    at java.sql.DriverManager.getConnection(DriverManager.java:247)
    at com.bmc.truesight.api.util.DatabaseUtil.getDatabaseConnection(DatabaseUtil.java:73)
    at com.bmc.truesight.api.util.DatabaseUtil.isHighAvailabilityEnabled(DatabaseUtil.java:130)
    at com.bmc.truesight.platform.components.properties.CPAppPropertiesInitializer.initialize(CPAppPropertiesInitializer.java:194)
    at com.bmc.truesight.platform.shell.ShellMain.initializeEnvironment(ShellMain.java:166)
    at com.bmc.truesight.platform.shell.ShellMain.handleCommandRequest(ShellMain.java:99)
    at com.bmc.truesight.platform.shell.ShellMain.main(ShellMain.java:175)
    Caused by: java.net.ConnectException: Connection refused (Connection refused)
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at org.postgresql.core.PGStream.<init>(PGStream.java:61)
    at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:144)


    The error message can have multiple causes.
    - port conflicts - please verify that all ports are opened up bi-drectionally and allowing for TSPS to come up
    - (Linux) confirm that the user which is starting TSPS is correct (owns the installation)
    - (Linux) check whether your 'ulimit -n' value is set to at least 2048
    - confirm that you have adequate free disk space
    - specify the IP address rather than the hostname in pg_hba.conf (
    https://www.postgresql.org/docs/9.1/static/auth-pg-hba-conf.html? )
    - add the TSPS host name entry in the /etc/hosts (or 
    C:\Windows\System32\drivers\etc\hosts) file on both Primary and Secondary TSPS
    - make sure that a ping to localhost is working fine and resolving to If not, make sure that entry for localhost exists in the /etc/hosts file. 
    (If ping to localhost is not working then TSPS core server won't be able to make connection with Postgres Database)
    - configure TSPS as per https://docs.bmc.com/docs/TSOperations/113/system-requirements-for-presentation-server-843619616.html#SystemrequirementsforPresentationServer-Hardwarerequirements
    - if the system is a VM, ensure that the resources are reserved for this host
    - check that the RSSO is running and port connections are allowed
    - validate that user you are trying to start DB process has a proper permissions over that path (
    ...BMC Software\TrueSightPServer )
    - check whether this directory is empty: ./truesightpserver/data/pgsql

    If the above didn't help, collect the following output and create a ticket for Support:
    - 'tssh properties list'
    - 'tssh server status'
    - tssh dump export'


    Article Number:


    Article Type:


      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles