Jaspersoft Reports Server Troubleshooting Tips

The following information can help you with the implementation and management of your JasperReports Server installation.
ccppmop144
The following information can help you with the implementation and management of your JasperReports Server installation.
Multicasting and Cache Distributing over RMI
Multicast is a method of sending IP packets to a group of interested receivers. These packets are only sent to the members of a multicast group with the help of a multicast router. A multicast group is assigned Class D addresses (224.0.0.0 - 239.255.255.255). The first 4 bits of a multicast address should be 1110 and the remaining 28 bits represent different groups.
In some cases, Linux distributions do not have multicast enabled by default and the /etc/hosts file does not include the IP address that is associated with the server host name. As a result, you may encounter the 
hostname associated with the localhost in /etc/hosts
 error. Associate the host name in /etc/hosts with the IP address that is set to the server network interface or to the external static NAT IP address of the server.
Verify that the /etc/hosts has the IP address together with the IP 127.0.0.1 and does not contain the entry for loopback address 127.0.1.1.
$ cat /etc/hosts
127.0.0.1 localhosthost.localdomain localhost
Configure Multicasting in Linux
Follow these steps:
  1. Enable multicast on the eth0 interface.
    1. Log in as a root user on all the instances in the cluster where JasperReports Server is installed.
    2. Run the following command to enable multicasting on eth0:
      $ /sbin/ifconfig eth0 multicast
      All the instances should be in the same network subnet.
    3. Run the following command to verify that your network interface supports multicast:
      $ /sbin/ifconfig - a
      The Multicast attribute is present in the fourth line of the eth0 properties only if the kernel complies with the multicast support.
  2. To configure the map network interface to send multicast traffic, add a default route for multicast traffic to the specific NIC. For example, the following command allows eth0 to send multicast traffic:
    $ route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
    To check if multicast routing is configured, run the following command:
    $ /sbin/route - n
  3. Run the following command to display the multicast group membership information:
    netstat - g
    Once the route add command is run on all servers, ping the multicast IP with the following command: 
    Ping 
    -c <host ip address>
All the IP addresses that are available in the current configured multicast environment appear.
Configure Cache Distribution over RMI on JasperReport Servers
Follow these steps:
  1. Stop the Tomcat server.
  2. Go to <tomcat>/webapps/reportservice/WEB-INF.
  3. Open the -ehcache.xml file in an editor.
  4. Uncomment and configure the following XML element sections in the file.
    • <cacheManagerPeerProviderFactory
      class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
      properties="hostName=10.131.112.249,peerDiscovery=automatic,multicastGroupAddress=228.0.0.1,multicastGroupPort=4446,timeToLive=1"/>
    • <cacheManagerPeerListenerFactory
      class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
      properties="hostName=10.131.112.249,port=40011,remoteObjectPort=40012,socketTimeoutMillis=120000"/>
  5. Uncomment the following XML element sections to allow distribution of this cache:
    • <cacheEventListenerFactory
      class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
      properties="replicateAsynchronously=true, replicatePuts=false, replicateUpdates=true,replicateUpdatesViaCopy=false, replicateRemovals=true "/>
    • <bootstrapCacheLoaderFactory
      class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"
      properties="bootstrapAsynchronously=true, maximumChunkSizeBytes=5000000"/>
  6. Save the file.
  7. Uncomment and configure the same XML sections in 
    <tomcat>/webapps/reportservice/WEB-INF/ehcache_hibernate.xml
     and 
    <tomcat>/webapps/reportservice/WEB-INF/classes/ehcache_hibernate.xml
    .
  8. Repeat the steps for all of the instances of Jaspersoft that are available in the cluster.
  9. Before you start Tomcat, delete the Tomcat temp directory and the work/Catalina/localhost directory.
Configure a Dedicated JasperReports Server for Running Scheduled Reports
You can deploy the JasperReports Server as a standalone application or in a cluster for high concurrency.
You can dedicate JasperReports Server instances to act as scheduler instances and JasperReports Server instances to serve web requests. The instances serving web requests are part of the load balancer and are non-scheduler instances.
When deploying the JasperReports Server in a cluster, we recommend that you dedicate one or more JasperReports Server instances for processing scheduled reports. The dedicated instances share the same repository. They are not part of the load balancer that serves web requests such as running unscheduled reports or using the ad hoc views.        
In a standalone deployment, only a single JasperReports server instance is available. The single instance acts as the scheduler instance and is responsible for the following items:
  • Processing scheduled reports
  • Serving normal web requests
During interactive installation of the patch, you can specify whether you want to go for a dedicated scheduler instance. Answer 'no' if you are running only a single JasperReports Server instance.
If you answer 'yes', then specify whether you want to make the current instance where you are applying the patch a scheduler instance.
  • If you answer 'yes', then the patch performs the necessary configuration to make the current instance a scheduler instance.
  • If you answer 'no' (for instances which are part of the load balancer), the patch performs the necessary configuration to make the current instance a non-scheduler instance.
: Apply the patch to all the JasperReports Server instances. Also, select the appropriate option during installation to make the instance where you are applying the patch a scheduler or a non-scheduler instance.
Restrict Advanced Reporting Notifications to Trusted Email Domains
In Advanced Reporting, users can email reports either as hyperlinks to the report page or as attachments. When scheduling the reports, they can specify the email addresses for sending the reports and job status notifications. Sometimes, reports contain confidential information and users may want to validate the email addresses before sending the notifications. As an administrator, you can specify trusted email domains (for example, ca.com) so that notifications do not go out to email addresses outside these domains. The user can still specify any email address for notification when scheduling a report. However, before sending the emails, the system filters out the email addresses that do not match the trusted domains.
: If you do not specify a list of trusted email domains, then report emails and job status notifications are sent to all email addresses that the user specifies when scheduling reports.
Alternatively, you can disable the email notifications capability so no report or job status notification are sent out.
You can configure the notification restrictions at the organization level specified for a particular 
Clarity Project and Portfolio Management (PPM)
 instance.
Follow these steps:
Invoke the following commands from the 
Clarity Project and Portfolio Management (PPM)
 command-line interface:
  • Run the following command to add trusted email domains.
    admin jaspersoft email -addDomains 
    <comma_separated_list_of_trusted_domains>
    A message appears indicating that the list of trusted domains were added successfully.
  • Run the following command to display the list of existing trusted email domains:
    admin jaspersoft email listDomains
  • Run the following command to remove email domains from the existing list of trusted email domains:
    admin jaspersoft email -removeDomains 
    <comma_separated_list_of_domains_to_remove>
  • Run the following command to disable report emails and job status notifications, regardless of the configuration of trusted domains:
    admin jaspersoft email disableNotifications
    A message appears indicating that email and job notifications are disabled.
  • Run the following command to re enable report emails and job status notifications:
    admin jaspersoft email enableNotifications
    A message appears indicating that email and job notifications are now enabled.
Check the Installer Version
For information about the installer version, check the following files:
  • Read me file (pre-installation)
  • version.html file that is created after you install JasperReports Server (post installation). You can also check this file using the following example URL:
    http://<servername>:<portNumber>/<reportservice>/version.htm
HTTPS Enabled Jaspersoft
Complete the following steps if JasperReports Server is HTTPS enabled.
Follow these steps:
  1. Use a browser to download and save the certificate from the JasperReports Server URL. For example, save it as SETI_JAAS_CER.cer.
  2. From the command prompt, navigate to JDK_HOME on the server where 
    Clarity Project and Portfolio Management (PPM)
     is installed.
  3. Navigate to jre\lib\security. 
    Example:
     C:\jdks\jdk1.8.0_40\jre\lib\security>
  4. Run the following command:
    keytool -importcert -keystore cacerts -alias tomcat7 -storepass changeit -file SETI_JAAS_CER.cer -trustcacerts
  5. Restart 
    Clarity Project and Portfolio Management (PPM)
    .
    To delete an entry from the key store, run the following command:
    keytool -delete -keystore cacerts -alias tomcat7 -storepass changeit
    The downloaded certificate is deleted from the certificate store.
Jaspersoft Sender Email Address
The sender email address is the address that appears when JasperReports Server sends an email notification for a scheduled report. JasperReports Server lets you set the sender email address at the JasperReports Server level, but not at the tenant (organization) level.
The following address is the default sender email address value for the JasperReports Server for On Premise implementations:
You can change this address during the installation.
To change the default address after the installation, follow these steps:
  1. Locate and open the js.quartz.properties file in a text editor.
  2. Edit the report.scheduler.mail.sender.from property to include your sender email address and save the file.
  3. Restart the JasperReports Server.
Troubleshooting JasperReports Server
The following troubleshooting information includes issue descriptions and resolutions.
Failed to Update Properties on the Jaspersoft Server
While saving the Data Warehouse properties in 
Clarity Project and Portfolio Management (PPM)
 System Administration (CSA), you may receive the following error message:
Failed to update properties on the Jaspersoft server. Exception getting ClarityJasperAdmin: Unauthorized access to http://<servername>:<portnumber>/<JasperReportsServerContext> with username <ppmjasperadmin>
This error can be the result of one of the following reasons:
  • The key store file was deleted or the 
    Clarity Project and Portfolio Management (PPM)
     CSA Jaspersoft administrator user (ClarityJasperAdmin) was changed, which resulted in the key store expiration.
    Resolution:
     Regenerate the key store file and copy it to the <JasperReportsServerTomcat>/config folder. For more information, see Generate the Key Store File.
  • The Advanced Reporting content was reimported without first deleting the existing organization/tenant.
    Resolution:
     If you are planning to reimport the content, delete the tenant from the JasperReports Server UI directly or execute the following command from the 
    Clarity Project and Portfolio Management (PPM)
     install directory:
    jaspersoft delete [-properties propertiesFile] -userName username -orgName orgId[,<orgId>..] -url jsUrl -password password
    • orgName <orgId[,<orgId>..]> (JasperReports Server organization mappings)
    • password <password> (JasperReports Server user password)
    • properties <propertiesFile> (Properties file name)
    • url <jsUrl> (JasperReports Server URL)
    • userName <username> (JasperReports Server user name)
User Not Registered Error on the Advanced Reporting Page
When you access the Advanced Reporting page, you may receive the following error message:
Error 401 User Not Registered. User is not registered on the reporting server.
This error can be the result of one of the following reasons:
  • The key store file was not copied to the <JasperReportsServerTomcat>/config folder. Review the app.ca.log file for more information.
    Resolution:
     Locate the generated key store file and its information for organization Name:ca, organization Id:ca in the following location: 
    C:\ca\install\14.3.0.297\config\ 
    Copy the key store file and organization information to the following JasperReports Server installation directory: 
    <JasperReportsServerTomcat>\webapps\<jasperwebcontext>\WEB-INF\config\
  • The user does not exist on the JasperReports Server, but the 
    Clarity Project and Portfolio Management (PPM)
     database shows that the user status is synchronized to JasperReports Server. 
    This situation can occur, after the integration, when the user is deleted in JasperReports Server.
    Resolution:
     Execute the Create and Update Jaspersoft Users job with the Full Sync option.
Internal Server Error on Advanced Reporting Page
When you access the Advanced Reporting page, you may receive the following error message:
Error 500 - Internal Server Error. The server could not retrieve the document due to server-configuration or technical problems. Contact your site administrator.
This error can occur because the key store file was not copied to the <JasperReportsServerTomcat>/config folder. Review the app.ca.log file for more information.
Resolution:
  1. Locate the generated key store file and its information for organization name: ca, organization Id: ca in the following location: 
    C:\ca\install\14.3.0.297\config\
  2. Copy the key store file and organization information to the following JasperReports Server installation directory:
    <JasperReportsServerTomcat>\webapps\<jasperwebcontext>\WEB-INF\config\
Memory Leak Errors May Appear in Tomcat Logs after Stopping or Starting the Server
Occasionally, you may see the following error messages in Tomcat, especially when restarting the JasperReports Servers as a result of maintenance. These errors have been reported on the Linux platform, although they may also be seen in Windows. Related to these errors, you may notice that the Tomcat process does not exit gracefully or that Advanced Reporting is not accessible even though the port is available.
org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/reportservice] created a ThreadLocal with key of type [org.apache.log4j.helpers.ThreadLocalMap] (value [[email protected]]) and a value of type [java.util.Hashtable] (value [{SESSION_ID=5C55FD9CCE7272C7FF20B2E6D122F97D, USER_ID=admin|abc123}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/reportservice] created a ThreadLocal with key of type [net.sf.jasperreports.engine.fonts.FontUtil$1] (value [[email protected]]) and a value of type [java.util.HashSet] (value [[Arial]] ) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
SEVERE: The web application [/reportservice] created a ThreadLocal with key of type [java.lang.InheritableThreadLocal] (value [[email protected]]) and a value of type [org.springframework.security.authentication.UsernamePasswordAuthenticationToken] (value [org.springframew[email protected]cd0a3791: Principal: MetadataUserDetails: admin; Credentials: [PROTECTED]; Authenticated: true; Details: null; Granted Authorities:
Resolution:
  1. Verify that the JasperReports Server Tomcat process is not present after performing a shutdown (for example, 
    "ps -ef | grep tomcat"
    ).
  2. If the process is present, kill the process gracefully (for example, 
    kill -9 <ProcessID>
    ).
  3. Start up the Tomcat process again.
Please Wait Message on the Advanced Reporting Page
When you access the Advanced Reporting page, you may see the “Please Wait” message that does not go away. See KB article: TEC1237912 for details about workarounds to resolve the issue.