hankhaines Posted January 19, 2018 Share Posted January 19, 2018 Is there a way to connect the JasperReports v6 server sessions to AWS Elasticache (Redis). I have downloaded and installed in the /usr/share/tomcat7/lib directory the following jar files: wget -c http://central.maven.org/maven2/redis/clients/jedis/2.5.2/jedis-2.5.2.jar wget -c https://github.com/rmohr/tomcat-redis-session-manager/releases/download/2.0-tomcat-7/tomcat-redis-session-manager-2.0.0.jar wget -c http://central.maven.org/maven2/org/apache/commons/commons-pool2/2.2/commons-pool2-2.2.jarand then change the /usr/share/tomcat7/conf/context.xml to have:<Context>... <Valve className="com.orangefunction.tomcat.redissessions.RedisSessionHandlerValve" /> <Manager className="com.orangefunction.tomcat.redissessions.RedisSessionManager" host="redis.cache.hostname" port="6379" database="0" maxInactiveInterval="60" /></Context>But when we try to login the /var/log/jasperreports/jasperreports.log file show:2018-01-19 15:41:20,881 ERROR SystemErrorController,http-bio-80-exec-11:81 - Internal server errorjava.lang.NullPointerException at com.orangefunction.tomcat.redissessions.RedisSessionHandlerValve.invoke(RedisSessionHandlerValve.java:28) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748)and it show a server error.Is there a doc or HOWTO that you can point me to. Link to comment Share on other sites More sharing options...
futesat_1 Posted January 26, 2018 Share Posted January 26, 2018 I'm currently trying to do the same, but I'm not sure if it will be a good idea yet, according to this support articles it doesn't seems a good idea: https://community.jaspersoft.com/documentation/jasperreports-server-ultimate-guide/v55/session-management-and-failoverhttps://community.jaspersoft.com/documentation/jasperreports-server-ultimate-guide/v55/app-server-configuration-failoverBut, if you decide keep trying, open your jasperreports server installation zip an edit this file with the desired config: buildomaticconf_sourcetemplateswebappMETA-INFcontext.xmlLast line of this file is “<Manager pathname="" />” you should override it with your custom config.The reason is because jasperreports webapp uses this one instead of the main tomcat context.xml.I made it work, but now I have another issues with internal caches.I hope it helps! 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