search cancel

Unable to access CABI UI as postgres database is shutting down.

book

Article ID: 134601

calendar_today

Updated On:

Products

CA Infrastructure Management CA Performance Management - Usage and Administration

Issue/Introduction

After trying to stop/start the CABI tomcat and postgres services, cannot access CABI ui.

 

In the <CABI_INSTALL_DIR>/apache-tomcat/webapps/jasperserver-pro/WEB-INF/logs/jasperserver.log we see:

 

Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (FATAL: the database system is shutting down)

 at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)

 at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)

 at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)

 at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.SQLDataSourceWrapper.getConnection(SQLDataSourceWrapper.java:46)

 at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:83)

 at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)

 ... 211 more Using  <CABI_INSTALL_DIR>/stopServers.sh fails to stop the postgres database.  

Environment

Release :

Component : IM Data Aggregator

Cause

This indicates there may have been an issue closing sessions and there were sessions that needed to be terminated. Postgres will not stop the database using a normal stop if there are sessions open

Resolution

Stop postgres using the fast option. The fast option disconnects any open sessions during the shutdown.     

1)  cd <CABI_INSTALL_DIR>

2)  Run:

./stopServers.sh tomcat  

3) Verify the postgres user:


find postgresql/data -maxdepth 0 -printf '%u\n'

Example:

# find postgresql/data -maxdepth 0 -printf '%u\n'

postgres

4) Shut down the database using fast mode:
su <postgresUser> -c "postgresql/bin/pg_ctl -m fast -D postgresql/data -l postgresql/logs/log.txt stop" Example:

su postgres -c "postgresql/bin/pg_ctl -m fast -D postgresql/data -l postgresql/logs/log.txt stop"



4) If shutdown was successful:

./startServers.sh