Insights module in xFlow gives Could not retrieve the document due to internal server error

Document ID : KB000118586
Last Modified Date : 01/03/2019
Show Technical Document Details
Issue:
Attempts to launch the Insights App in Service Desk Manager (SDM) xFlow gives "Could not retrieve the document due to internal server error"  and  "Server unavailable Please contact administrator".
Cause:
It is a generic error message and it can have many causes.
Resolution:
(1)

<CA Business Intelligence>\apache-tomcat\webapps\jasperserver-pro\WEB-INF\logsJasperserver.log has an error:

2018-10-26 11:17:15,497 ERROR CABIUtil,http-apr-8080-exec-3:69 - com.ca.bicoe.cajasperserver.common.util.CABIExceptionForRunTime: javax.crypto.BadPaddingException: Given final block not properly padded
    at com.ca.bicoe.cajasperserver.preauth.sso.ext.auth.Encryptor.decrypt(Encryptor.java:192)
    at com.ca.bicoe.cajasperserver.preauth.sso.ext.auth.EncryptorService.decryptcabi(EncryptorService.java:92)
    at com.ca.bicoe.cajasperserver.preauth.sso.ext.filter.TokenService.processToken(TokenService.java:74)
    at com.ca.bicoe.cajasperserver.preauth.sso.ext.filter.ExternalAuthenticationProxyFilter.doFilterreq(ExternalAuthenticationProxyFilter.java:99)
    at com.ca.bicoe.cajasperserver.preauth.sso.ext.filter.ExternalAuthenticationProxyFilter.doFilter(ExternalAuthenticationProxyFilter.java:80)
 
Caused by: javax.crypto.BadPaddingException: Given final block not properly padded
    at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:966)
    at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:824)
    at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:436)
    at javax.crypto.Cipher.doFinal(Cipher.java:2165)
    at com.ca.bicoe.cajasperserver.preauth.sso.ext.auth.Encryptor.decrypt(Encryptor.java:167)
    ... 66 more

This occurs when the casm_insights keystore in Insights is not in sync with the the casm_insights keystore in Jasper Server.

Follow the steps below to fix this issue:
  1. On xFlow server, backup <xFlow_Install>\APPS\Services\insightmicroservice-17.1.706\keystore folder
  2. On Jasper server, backup <CA Business Intelligence>\apache-tomcat\webapps\jasperserver-pro\WEB-INF\config  folder
  3. Over write the contents of #2 above with the contents of #1 above
  4. Restart CA Business Intelligence Tomcat service
  5. Restart CA xFlow Analyst Interface service
(2)

..\xFlow\APPS\logs\insightMS.log has an error message:

INFO - 2019-03-01 10:19:56 [play.core.server.AkkaHttpServer] - Listening for HTTP on /0:0:0:0:0:0:0:0:9016
INFO - 2019-03-01 10:20:21 [config.Configuration] - REQUEST insights.protocol = http
INFO - 2019-03-01 10:20:21 [config.Configuration] - REQUEST insights.hostname = sdmhml03
INFO - 2019-03-01 10:20:21 [config.Configuration] - REQUEST insights.domain = sdmhml03:9016
ERROR - 2019-03-01 10:20:22 [controllers.InsightController] - Exception while processing request
java.lang.NumberFormatException: null
    at java.lang.Integer.parseInt(Unknown Source)
    at java.lang.Integer.parseInt(Unknown Source)
    at config.Configuration.getRequestTimeout(Configuration.java:173)
    at controllers.InsightController.buildWSRequest(InsightController.java:330)
    at controllers.InsightController.jasperLogout(InsightController.java:136)

Follow the steps below to fix this issue:

Make sure l1admin_general_config  table has the following entries:

insights.jasper.context
insights.jasper.domain
insights.jasper.hostname
insights.jasper.protocol
insights.jasper.requestimeout
insights.jasper.sso.orgid
insights.jasper.theme
insights.protocol