tomcatcentos7jasperserver

Could not locate .jrsksp Keystore (Jasper Report Server 7.8.0 in CentOS 7)


Not sure if this question fits in this site but I'm desperate. I'm installing Jasperreport Server 7.8.0 in a Virtual Machine with CentOS 7. I'm not using the bundle, I'm installing everything separate (Tomcat, PostgreSQL... and Jasper). I already installed Tomcat and PostgreSQL, but now is the time of Jasperreport Application and got a lot of headaches with the Keystore files. Saddly the documentation and the Wiki of this page is not helping much, (there are like 3 wiki pages on how do you correct what the install script can't do right).

The first time that I ran the js-install script, the keystore was saved inside the root folder. According to this page, I had to made a copy of .jrsks and .jrsksp files and move it to another place. And the suggested place to put these files is at home server folders, according to this

I did everything and when I started the Tomcat Server, the Jasper Application didn't start and the log file of tomcat are giving me this exception:

Caused by: org.apache.commons.configuration2.ex.ConfigurationException: Could not locate: org.apache.commons.configuration2.io.FileLocator@7664ab35[fileName=.jrsksp,basePath=/home/dphillips/keys,sourceUrl=,encoding=ISO-8859-1,fileSystem=com.jaspersoft.jasperserver.crypto.utils.Base64SynchronizingFilesSystem@4bfce17c,locationStrategy=com.jasperssoft.jasperserver.crypto.utils.JrsBasePathLocationStrategy@2e7dfb58]

I tried:

  1. Updating the keystore.init.properties located in the WEB-INF folder of the Jasper webapplication, and buildomatic folder (inside of the jasperreport-server-cp-7.8.0-bin), delete the keys from the selected path and re-run js-install script to generate again a pair of keys.

  2. Changed tomcat user access permissions as you can see here

enter image description here

Both attempts failed.

Anyone who has managed to install this on linux have any idea how to proceed?


Solution

  • Finally found a path to solve this. I did the following:

    1. Update the keystore.init.properties in both locations (the one that are inside of buildomatic and the other one inside of WEB-INF) and set the ks and ksp path to /var/lib/tomcat (this can vary dependending of the user name that your system uses for tomcat).

    2. Move the two ,jrsks files to /var/lib/tomcat from root folder (if you have it in a different folder like me, move those files from that folder and save it in /var/lib/tomcat).

    3. Grant permissions to both files for root and tomcat (chown root:tomcat filename).

    4. Restart tomcat.

    You may keep having issues after following these steps (Keystore was tampered with or password was incorrect for example), if this is the case, then go to buildomatic folder and execute the js-install.sh script for re-generate the pair of keys again. This time you will not have to move any key because in the previous steps you modified the keystore.init.properties. What you will still have to do grant permissions again to the new pair of keys like before.