IIOException when showing Chart

Hello,

I’m running openHAB 2.0 on a raspberry pi with the openhabian distribution. I’ve configured a temperature sensor to persist the data to show it in a chart. Unfortunately I can’t see any chart in PaperUI. In the logs there is an IIOException.

My rrd4j.persist looks like this:

Strategies {
   everyMinute	: "0 * * * * ?"
   everyHour    : "0 0 * * * ?"
   everyDay     : "0 0 0 * * ?"
   default = everyChange
}

Items {
    Bathroom_Temperature : strategy = everyMinute, restoreOnStartup
    Bathroom_Humidity : strategy = everyMinute, restoreOnStartup
}
2018-05-28 20:58:55.315 [WARN ] [org.eclipse.jetty.server.HttpChannel] - //192.168.0.107:8080/chart?items=Bathroom_Temperature&period=h&theme=bright&t=1527533861658
javax.servlet.ServletException: javax.imageio.IIOException: I/O error writing PNG file!
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:88) [191:org.ops4j.pax.web.pax-web-jetty:6.0.7]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [87:org.eclipse.jetty.server:9.3.22.v20171030]
	at org.eclipse.jetty.server.Server.handle(Server.java:534) [87:org.eclipse.jetty.server:9.3.22.v20171030]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:333) [87:org.eclipse.jetty.server:9.3.22.v20171030]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) [87:org.eclipse.jetty.server:9.3.22.v20171030]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283) [79:org.eclipse.jetty.io:9.3.22.v20171030]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108) [79:org.eclipse.jetty.io:9.3.22.v20171030]
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [79:org.eclipse.jetty.io:9.3.22.v20171030]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [90:org.eclipse.jetty.util:9.3.22.v20171030]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [90:org.eclipse.jetty.util:9.3.22.v20171030]
	at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: javax.imageio.IIOException: I/O error writing PNG file!
	at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1168) ~[?:?]
	at javax.imageio.ImageWriter.write(ImageWriter.java:615) ~[?:?]
	at javax.imageio.ImageIO.doWrite(ImageIO.java:1612) ~[?:?]
	at javax.imageio.ImageIO.write(ImageIO.java:1492) ~[?:?]
	at org.eclipse.smarthome.ui.internal.chart.ChartServlet.doGet(ChartServlet.java:302) ~[?:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) ~[?:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[?:?]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:284) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[?:?]
	... 10 more
Caused by: org.eclipse.jetty.io.EofException
	at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:199) ~[?:?]
	at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:420) ~[?:?]
	at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:313) ~[?:?]
	at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:147) ~[?:?]
	at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:739) ~[?:?]
	at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[?:?]
	at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[?:?]
	at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:519) ~[?:?]
	at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:750) ~[?:?]
	at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:801) ~[?:?]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:235) ~[?:?]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:219) ~[?:?]
	at org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:355) ~[?:?]
	at javax.imageio.stream.FileCacheImageOutputStream.flushBefore(FileCacheImageOutputStream.java:258) ~[?:?]
	at com.sun.imageio.plugins.png.IDATOutputStream.finishChunk(PNGImageWriter.java:196) ~[?:?]
	at com.sun.imageio.plugins.png.IDATOutputStream.finish(PNGImageWriter.java:254) ~[?:?]
	at com.sun.imageio.plugins.png.PNGImageWriter.write_IDAT(PNGImageWriter.java:945) ~[?:?]
	at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1158) ~[?:?]
	at javax.imageio.ImageWriter.write(ImageWriter.java:615) ~[?:?]
	at javax.imageio.ImageIO.doWrite(ImageIO.java:1612) ~[?:?]
	at javax.imageio.ImageIO.write(ImageIO.java:1492) ~[?:?]
	at org.eclipse.smarthome.ui.internal.chart.ChartServlet.doGet(ChartServlet.java:302) ~[?:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) ~[?:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[?:?]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:284) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[?:?]
	... 10 more
Caused by: java.io.IOException: Broken pipe
	at sun.nio.ch.FileDispatcherImpl.writev0(Native Method) ~[?:?]
	at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:51) ~[?:?]
	at sun.nio.ch.IOUtil.write(IOUtil.java:148) ~[?:?]
	at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:504) ~[?:?]
	at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:179) ~[?:?]
	at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:420) ~[?:?]
	at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:313) ~[?:?]
	at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:147) ~[?:?]
	at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:739) ~[?:?]
	at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[?:?]
	at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[?:?]
	at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:519) ~[?:?]
	at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:750) ~[?:?]
	at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:801) ~[?:?]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:235) ~[?:?]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:219) ~[?:?]
	at org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:355) ~[?:?]
	at javax.imageio.stream.FileCacheImageOutputStream.flushBefore(FileCacheImageOutputStream.java:258) ~[?:?]
	at com.sun.imageio.plugins.png.IDATOutputStream.finishChunk(PNGImageWriter.java:196) ~[?:?]
	at com.sun.imageio.plugins.png.IDATOutputStream.finish(PNGImageWriter.java:254) ~[?:?]
	at com.sun.imageio.plugins.png.PNGImageWriter.write_IDAT(PNGImageWriter.java:945) ~[?:?]
	at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1158) ~[?:?]
	at javax.imageio.ImageWriter.write(ImageWriter.java:615) ~[?:?]
	at javax.imageio.ImageIO.doWrite(ImageIO.java:1612) ~[?:?]
	at javax.imageio.ImageIO.write(ImageIO.java:1492) ~[?:?]
	at org.eclipse.smarthome.ui.internal.chart.ChartServlet.doGet(ChartServlet.java:302) ~[?:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) ~[?:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[?:?]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:284) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[?:?]
	... 10 more

I’ve no clue how to fix this. I hope someone can help me.
Best regards!

See also:

Thank you for the link. The problem was in my chart configuration. I had a ‘refresh’-value of 600. As far as I understood the ‘refresh’-value was in seconds and from OH 2.2 the unit changed to milliseconds. I think my raspberry pi is too slow to generate an image every 600ms (it now tooks some seconds to appear). Increasing the time to 120000 did the trick.