Jaspersoft data sources fail to connect on one server
search cancel

Jaspersoft data sources fail to connect on one server

book

Article ID: 257255

calendar_today

Updated On:

Products

Clarity PPM On Premise

Issue/Introduction

We have set up two Jaspersoft servers in a cluster and a custom data source connecting to the Oracle database.  When one of server in the cluster is up, the database connection is working, but the same connection is not working when other server is up. The reports will fail to run from the server B.

 

Environment

Jaspersoft Cluster, 7.8 and 8.1

Cause

  • Datasource connection information are stored in the Jaspersoft repository schema PPM_JASPERSOFT and table JIJDBCDATASOURCE,  updating the credentials in one server should get reflected in the 2nd server in the cluster
  • Issue is related to the keystore files: .jrsksp and .jrsks. they are not same in both servers.
  • If Server A and Server B use different Jaspersoft keystores to decrypt the password stored in JIJDBCDATASOURCE, only the server which is used to update  password most recently, can decrypt the password successfully
  • Note: This has nothing to do with keystores generated from Clarity PPM using admin commands. 

Resolution

  1. Backup the files .jrsksp and .jrsks under /users/<user> on Server B
  2. Copy the Jaspersoft keystore files from Server A to Server B under the location /users/<user> 
  3. Open Server A context.xml file under $JasperTomcat9\webapps\reportservice\META-INF\context.xml
  4. Copy the encrypted password for jdbc/jasperserver entry from server A, and update the context.xml for server B with this password
  5. If you have an entry for Resource name="jdbc/jasperserverAudit, you have to copy the password for it from server A to server B as well
  6. Restart Tomcat on both servers
  7. Login to Server A Web URL and update the datasource credentials.  
  8. Login to Server B Web URL test the same datasource connection