danielsl9.dp Posted September 2, 2021 Share Posted September 2, 2021 I'm installing Jasperreport Server 7.8.0 in a Oracle 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 Oh man, I got A BUNCH of problems. Saddly the documentation and the Wiki of this page is not helping much, regarding the issue of the Keystore files.First of all, the Keystore was saved in the root folder. According to this page:https://community.jaspersoft.com/wiki/how-move-tibco-jasperreports-server-750-encryption-keystore-files-shared-linux-folderI had to made a copy of .jrsks and .jrsksp files and move it to another place (acording to this page) :There are two files that are generated by a TIBCO JapserReports® Server installation: .jrsks and .jrsksp.These files should be located in home directory. These do not impact other applications and can be deleted, they will be recreated by JapserReports Server.Okay, cool, I moved this files to /home/dphillips/keys and updated the keystore.init.properties inside of the WEB-INF of the jasper web aplication and Buildomatic (just in case).The webpage said something about a property that honestly I didn't see inside of the .jrsksp file. We are talking about ksPath.. . I didn't added any change here, maybe this part is outdated.Ok, with these change, the Jasperreport application should work, but now I'm facing another issue: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 don't know what to do here, and I need serious help, cause yesterday I didn't sleep well because of this. I tried to execute js-install script to regenerate a new fresh pair of keys (in the specified path this time, no moves) and the problem persist. I don't think that this is a file access issues because in the path where is located is supposed to be accessible (according to the documentation itself).Can someone give me a hand with this ??????? Link to comment Share on other sites More sharing options...
gustavofarias Posted September 2, 2021 Share Posted September 2, 2021 Please see the last two answers here: https://community.jaspersoft.com/questions/1154891/error-upgrading-community-server-72-75and the last two comments here: https://community.jaspersoft.com/wiki/encryption-jasperreports-server-75I just hate what they did to JRS 7.5+. there is always someone in this forum with the same problem. Link to comment Share on other sites More sharing options...
gustavofarias Posted September 2, 2021 Share Posted September 2, 2021 What worked for me:both .jrsks and .jrsksp in a place other than /rootboth onwned by root : tomcatboth with permission rw- r-- --- Link to comment Share on other sites More sharing options...
danielsl9.dp Posted September 2, 2021 Author Share Posted September 2, 2021 I check your comments, and after read it, I'm almost sure that I done everything well... Now if I re-generate the Keystore files, it is created in /home/dphillips/keys... maybe the tomcat application can't reach that Path ???? It's weird because it's a directory suggested by TIBCO Link to comment Share on other sites More sharing options...
gustavofarias Posted September 2, 2021 Share Posted September 2, 2021 When you run the script to install JRS do you do something like "sudo jr_install blah blah"? If so, the root user will create the files with permission to itself, even in folder other than /root.And Tomcat run as tomcat (at least in the end). Because when you do something like 'sudo service tomcat9 start' I think root has a part on it too.Just in case I gave read permission to both root and tomcat, because I lost much time and sleep trying to make it work. Link to comment Share on other sites More sharing options...
gustavofarias Posted September 2, 2021 Share Posted September 2, 2021 "maybe the tomcat application can't reach that Path"what the file permissions say? who owns it?"It's weird because it's a directory suggested by TIBCO"Just forget what TIBCO say. In this particular thing they messed up. Isn't it weird that there are 3 wiki pages on how do you correct what the install script can't do right? Link to comment Share on other sites More sharing options...
danielsl9.dp Posted September 2, 2021 Author Share Posted September 2, 2021 I executed ls -la to my keys folder and I saw this:-rw-r----- 1 root root 6117 Sep 1 18:40 .jrsks-rw-r----- 1 root root 0 Sep 1 18:40 .jrskspExecuted the following commandchown tomcat:dphillips /home/dphillips/keys/.jrskschown tomcat:dphillips /home/dphillips/keys/.jrskspNow if I run ls -la again-rw-r----- 1 tomcat dphillips 6117 Sep 1 18:40 .jrsks-rw-r----- 1 tomcat dphillips 0 Sep 1 18:40 .jrsksp Restarted the tomcat server but I'm still unable to access, I'm getting same exception Link to comment Share on other sites More sharing options...
gustavofarias Posted September 2, 2021 Share Posted September 2, 2021 In your error message we see this: ".jrsksp,basePath=/home.dphillips/keys,"Shouldn't it be /home/dphillips ? Link to comment Share on other sites More sharing options...
danielsl9.dp Posted September 2, 2021 Author Share Posted September 2, 2021 Yea is that path, sorry I wrote that part of the exception wrong.Already corrected it Link to comment Share on other sites More sharing options...
danielsl9.dp Posted September 3, 2021 Author Share Posted September 3, 2021 Can anyone from the staff help me please. I'm seriously stuck and I don't know how to solve. Link to comment Share on other sites More sharing options...
gustavofarias Posted September 5, 2021 Share Posted September 5, 2021 just tested a fresh installation in my VBox with my own Tomcat and PostgreSql. Just let it install the keystore in /rootThen, move the two .jrsks* to another folder (in my case /var/lib/tomcat9). Change the keystore.init in WEB-INF/classes to reflect new location. Give ownership of the two files to root:tomcat. I'm using Ubuntu. I don't know who executes tomcat in CentOS. Link to comment Share on other sites More sharing options...
danielsl9.dp Posted September 5, 2021 Author Share Posted September 5, 2021 For some reason, your trick works like a charm, now I'm able to deploy the jasper application in tomcat !However, unfortunately got another problem when I try to reach the login page (Servlet.service () for servlet [jsp] threw exception java.lang.NullPointerException at com.jaspersoft.jasperserver.war.themes.MTThemeResolver.resolveThemeName ) but this is another issue, and at least I have gotten the advanceThank you so much for your help Gustavo, you helped me a lot /sites/all/libraries/ckeditor/plugins/smiley/images/teeth_smile.png Link to comment Share on other sites More sharing options...
Solution danielsl9.dp Posted September 5, 2021 Author Solution Share Posted September 5, 2021 So basically, the path for overcome this problem (this case) was: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.Hope you find this helpful for the community. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now