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

Version 1
    Share:|

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


    PRODUCT:

    TrueSight Presentation Server


    COMPONENT:

    TSPS Server


    APPLIES TO:

    TrueSight Presentation Server all versions



    QUESTION:

    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)


    ANSWER:

    The error message can have multiple causes.

    Here are a few other conditions which are associated with this symptom:
    - 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 TSPS host name entry in /etc/hosts (or 
    C:\Windows\System32\drivers\etc\hosts) file on both Primary and Secondary TSPS
    - 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
    - Also 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, send the output to:
    - 'tssh properties list'
    - 'tssh server status'
    - tssh dump export'


     


    Article Number:

    000166712


    Article Type:

    FAQ/Procedural



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