Unable to view reports in statistics module (broken images)

I’m having an issue getting the statistics module to generate graphs and PDF reports. warn.log and generation of PDFs results in the following error:

HTTP ERROR 500

Problem accessing /plugins/monitoring/graph. Reason:

Could not initialize class sun.awt.X11FontManager

Caused by:

java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at sun.font.FontManagerFactory$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.font.FontManagerFactory.getInstance(Unknown Source) at java.awt.Font.getFont2D(Unknown Source) at java.awt.Font.getFontName(Unknown Source) at java.awt.Font.getFontName(Unknown Source) at com.lowagie.text.pdf.PdfGraphics2D.getCachedBaseFont(PdfGraphics2D.java:892) at com.lowagie.text.pdf.PdfGraphics2D.setFont(PdfGraphics2D.java:887) at com.lowagie.text.pdf.PdfGraphics2D.<init>(PdfGraphics2D.java:204) at com.lowagie.text.pdf.PdfContentByte.createGraphics(PdfContentByte.java:2850) at org.jivesoftware.openfire.reporting.graph.GraphServlet.writePDFContent(GraphServlet.java:186) at org.jivesoftware.openfire.reporting.graph.GraphServlet.service(GraphServlet.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.jivesoftware.openfire.container.PluginServlet.handleServlet(PluginServlet.java:269) at org.jivesoftware.openfire.container.PluginServlet.service(PluginServlet.java:109) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:547) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1359) at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:78) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1330) at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:164) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1330) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1330) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:478) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:941) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110) at org.eclipse.jetty.server.Server.handle(Server.java:349) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441) at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:919) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:582) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533) at java.lang.Thread.run(Unknown Source)

OS is CentOS 5, install is fresh. Openfire version is 3.9.1. I’ve installed the font package mentioned here https://confluence.atlassian.com/display/FISHKB/Missing+Java+Fonts, but have not made any progress.

Any help the community can offer is appreciated!

Thanks.

Are you using OpenJDK or the Ex-Sun Oracle JDK?

You could try to set the JVM parameter "-Djava.awt.headless=true", anyhow "NoClassDefFoundError" sounds more like a missing class.

I’ve tried both the packaged OpenJDK and am now running on the OracleJDK. Can you tell me where to put that JVM parameter?

It should be /etc/sysconfig/openfire - add / extend there:

export OPENFIRE_OPTS="-Djava.awt.headless=true -Xfoo"

Then starting Openfire should fail as the “-Xfoo” parameter is unknown - if this is the case remove “-Xfoo” and start Openfire.

I assume that you did configure here the JAVA_HOME for Oracles JDK - otherwise a more or less random JRE is used by Openfire.

A second look at the openfire config file revealed I neglected to uncomment the JAVA_HOME variable. Once that was fixed and Openfire was running the Sun JDK I was able to the graphs working as expected. Thanks for the help LG.

We just upgraded from 3.8.2 to 3.9.3 and our graphs in the monitoring plugin are now broken as described above. We are running RedHat 6 using the JRE contained within the Openfire directory. We tried some of the suggestions here but couldn’t get it working. Is anyone else running RedHat with this issue and could provide a workaround or fix for this issue?

1 Like

Last night we upgraded from 3.8.2 to 3.9.3 (latest release from OF site) and the graphs do not work fo us either. Our setup is a virtualized copy of CentOS 6.5 x64. The graphs and charts were working on our previous install. We did the upgrade by performing an rpm -Uhvv upgrade.

Any thoughts or suggestions would be greatly appreciated!

Thanks,

Ozzie

Resolution

Install the libgcc_s.so.1 package and restart the application:

For RedHat (or similar distributions):

yum install libgcc_s.so.1

For Debian (or similar distributions):

apt-get install libgcc_s.so.1

“yum install libgcc_s.so.1”

This has solved the missing graphs/missing content issue for me.

centOS 6.7, 64bit

openfire’s builtin JRE

OF version: 3.10.2

monitoring plugin version: 1.4.6

Thanks Gerd!!