OH2: Java exception instead of chart - why?

One if my charts stopped working without any change - and now I’m asking myself, why.
Here’s the error log:

00:31:00.990 [WARN ] [eclipse.jetty.servlet.ServletHandler] - /chart
javax.imageio.IIOException: I/O error writing PNG file!
        at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1168)[:1.8.0_65]
        at javax.imageio.ImageWriter.write(ImageWriter.java:615)[:1.8.0_65]
        at javax.imageio.ImageIO.doWrite(ImageIO.java:1612)[:1.8.0_65]
        at javax.imageio.ImageIO.write(ImageIO.java:1578)[:1.8.0_65]
        at org.eclipse.smarthome.ui.internal.chart.ChartServlet.doGet(ChartServlet.java:192)[130:org.eclipse.smarthome.ui:0.9.0.b1]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)[20:javax.servlet-api:3.1.0]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)[20:javax.servlet-api:3.1.0]
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)[79:org.eclipse.jetty.servlet:9.2.14.v20151106]
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)[79:org.eclipse.jetty.servlet:9.2.14.v20151106]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[165:org.ops4j.pax.web.pax-web-jetty:4.2.4]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)[77:org.eclipse.jetty.security:9.2.14.v20151106]
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:271)[165:org.ops4j.pax.web.pax-web-jetty:4.2.4]
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[79:org.eclipse.jetty.servlet:9.2.14.v20151106]
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)[165:org.ops4j.pax.web.pax-web-jetty:4.2.4]
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.Server.handle(Server.java:499)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[81:org.eclipse.jetty.util:9.2.14.v20151106]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[81:org.eclipse.jetty.util:9.2.14.v20151106]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_65]
Caused by: org.eclipse.jetty.io.EofException
        at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:192)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.flush(SslConnection.java:808)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:408)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:302)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:129)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:702)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:246)[81:org.eclipse.jetty.util:9.2.14.v20151106]
        at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:208)[81:org.eclipse.jetty.util:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:480)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:768)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:801)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:147)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:140)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:242)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at javax.imageio.stream.FileCacheImageOutputStream.flushBefore(FileCacheImageOutputStream.java:258)[:1.8.0_65]
        at com.sun.imageio.plugins.png.IDATOutputStream.finishChunk(PNGImageWriter.java:196)[:1.8.0_65]
        at com.sun.imageio.plugins.png.IDATOutputStream.finish(PNGImageWriter.java:254)[:1.8.0_65]
        at com.sun.imageio.plugins.png.PNGImageWriter.write_IDAT(PNGImageWriter.java:945)[:1.8.0_65]
        at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1158)[:1.8.0_65]
        ... 27 more
Caused by: java.io.IOException: Datenübergabe unterbrochen (broken pipe)
        at sun.nio.ch.FileDispatcherImpl.write0(Native Method)[:1.8.0_65]
        at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)[:1.8.0_65]
        at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)[:1.8.0_65]
        at sun.nio.ch.IOUtil.write(IOUtil.java:65)[:1.8.0_65]
        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)[:1.8.0_65]
        at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:170)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        ... 45 more
00:31:01.008 [WARN ] [org.eclipse.jetty.server.HttpChannel] - /chart?items=gPoolTemp&period=12h&random=879
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)[165:org.ops4j.pax.web.pax-web-jetty:4.2.4]
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.Server.handle(Server.java:499)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[81:org.eclipse.jetty.util:9.2.14.v20151106]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[81:org.eclipse.jetty.util:9.2.14.v20151106]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_65]
Caused by: javax.imageio.IIOException: I/O error writing PNG file!
        at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1168)[:1.8.0_65]
        at javax.imageio.ImageWriter.write(ImageWriter.java:615)[:1.8.0_65]
        at javax.imageio.ImageIO.doWrite(ImageIO.java:1612)[:1.8.0_65]
        at javax.imageio.ImageIO.write(ImageIO.java:1578)[:1.8.0_65]
        at org.eclipse.smarthome.ui.internal.chart.ChartServlet.doGet(ChartServlet.java:192)[130:org.eclipse.smarthome.ui:0.9.0.b1]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)[20:javax.servlet-api:3.1.0]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)[20:javax.servlet-api:3.1.0]
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)[79:org.eclipse.jetty.servlet:9.2.14.v20151106]
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)[79:org.eclipse.jetty.servlet:9.2.14.v20151106]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[165:org.ops4j.pax.web.pax-web-jetty:4.2.4]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)[77:org.eclipse.jetty.security:9.2.14.v20151106]
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:271)[165:org.ops4j.pax.web.pax-web-jetty:4.2.4]
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[79:org.eclipse.jetty.servlet:9.2.14.v20151106]
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)[165:org.ops4j.pax.web.pax-web-jetty:4.2.4]
        ... 8 more
Caused by: org.eclipse.jetty.io.EofException
        at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:192)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.flush(SslConnection.java:808)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:408)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:302)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:129)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:702)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:246)[81:org.eclipse.jetty.util:9.2.14.v20151106]
        at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:208)[81:org.eclipse.jetty.util:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:480)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:768)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:801)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:147)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:140)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:242)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at javax.imageio.stream.FileCacheImageOutputStream.flushBefore(FileCacheImageOutputStream.java:258)[:1.8.0_65]
        at com.sun.imageio.plugins.png.IDATOutputStream.finishChunk(PNGImageWriter.java:196)[:1.8.0_65]
        at com.sun.imageio.plugins.png.IDATOutputStream.finish(PNGImageWriter.java:254)[:1.8.0_65]
        at com.sun.imageio.plugins.png.PNGImageWriter.write_IDAT(PNGImageWriter.java:945)[:1.8.0_65]
        at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1158)[:1.8.0_65]
        ... 27 more
Caused by: java.io.IOException: Datenübergabe unterbrochen (broken pipe)
        at sun.nio.ch.FileDispatcherImpl.write0(Native Method)[:1.8.0_65]
        at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)[:1.8.0_65]
        at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)[:1.8.0_65]
        at sun.nio.ch.IOUtil.write(IOUtil.java:65)[:1.8.0_65]
        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)[:1.8.0_65]
        at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:170)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        ... 45 more
00:31:01.028 [WARN ] [org.eclipse.jetty.server.HttpChannel] - Could not send response error 500: javax.servlet.ServletException: javax.imageio.IIOException: I/O error writing PNG file!

What could be the reason?
My version: Version: 2.0.0~20160923010346

Thank you!

These make it sound like you could have a full or otherwise unwritable file system.
Check the device where you’re trying to store your images.

I have three other charts running flawlessly on my Pi2. Why is only this one showing this error?

Which folder should I check? I’m just running a normal rr4d based graph without any special hackings. Don’t even know where the images are being stored…

Okay, I found out that this error shows up at EVERY chart I do have - but the others will be presented for some reason, this one won’t.

The question which remains: Where exactly do I have to look for the permission problem?

The fileystem is big enough:

root@rpi2_openhab:~# df -h
Dateisystem    Größe Benutzt Verf. Verw% Eingehängt auf
/dev/root        29G    3,9G   24G   14% /
devtmpfs        459M       0  459M    0% /dev
tmpfs           463M       0  463M    0% /dev/shm
tmpfs           463M    6,6M  457M    2% /run
tmpfs           5,0M    4,0K  5,0M    1% /run/lock
tmpfs           463M       0  463M    0% /sys/fs/cgroup
/dev/mmcblk0p6   63M     20M   43M   32% /boot
tmpfs            93M       0   93M    0% /run/user/1000
tmpfs            93M       0   93M    0% /run/user/0

I guess, I found the problem myself:

root@rpi2_openhab:/etc/openhab2/persistence# ls -l
insgesamt 12
-rw-r--r-- 1 root    root    180 Sep 20 23:31 exec.persist
-rw-r--r-- 1 openhab openhab 246 Sep 14 21:34 readme.txt
-rw-r--r-- 1 root    root    195 Sep 20 23:31 rrd4j.persist

Since I’ve changed owner and group from the persitence config from root to openhab, the error messages vanished and the chart is being drawn again.

My guess was wrong - it stopped worked again and I have no clue why :frowning:
That’s what my log’s saying:

19:52:22.761 [WARN ] [eclipse.jetty.servlet.ServletHandler] - /chart
javax.imageio.IIOException: I/O error writing PNG file!
        at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1168)[:1.8.0_65]
        at javax.imageio.ImageWriter.write(ImageWriter.java:615)[:1.8.0_65]
        at javax.imageio.ImageIO.doWrite(ImageIO.java:1612)[:1.8.0_65]
        at javax.imageio.ImageIO.write(ImageIO.java:1578)[:1.8.0_65]
        at org.eclipse.smarthome.ui.internal.chart.ChartServlet.doGet(ChartServlet.java:192)[130:org.eclipse.smarthome.ui:0.9.0.b1]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)[20:javax.servlet-api:3.1.0]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)[20:javax.servlet-api:3.1.0]
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)[79:org.eclipse.jetty.servlet:9.2.14.v20151106]
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)[79:org.eclipse.jetty.servlet:9.2.14.v20151106]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[165:org.ops4j.pax.web.pax-web-jetty:4.2.4]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)[77:org.eclipse.jetty.security:9.2.14.v20151106]
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:271)[165:org.ops4j.pax.web.pax-web-jetty:4.2.4]
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[79:org.eclipse.jetty.servlet:9.2.14.v20151106]
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)[165:org.ops4j.pax.web.pax-web-jetty:4.2.4]
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.Server.handle(Server.java:499)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[81:org.eclipse.jetty.util:9.2.14.v20151106]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[81:org.eclipse.jetty.util:9.2.14.v20151106]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_65]
Caused by: org.eclipse.jetty.io.EofException
        at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:192)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.flush(SslConnection.java:808)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:408)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:302)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:129)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:702)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:246)[81:org.eclipse.jetty.util:9.2.14.v20151106]
        at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:208)[81:org.eclipse.jetty.util:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:480)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:768)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:801)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:147)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:140)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:242)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at javax.imageio.stream.FileCacheImageOutputStream.flushBefore(FileCacheImageOutputStream.java:258)[:1.8.0_65]
        at com.sun.imageio.plugins.png.IDATOutputStream.finishChunk(PNGImageWriter.java:196)[:1.8.0_65]
        at com.sun.imageio.plugins.png.IDATOutputStream.finish(PNGImageWriter.java:254)[:1.8.0_65]
        at com.sun.imageio.plugins.png.PNGImageWriter.write_IDAT(PNGImageWriter.java:945)[:1.8.0_65]
        at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1158)[:1.8.0_65]
        ... 27 more
Caused by: java.io.IOException: Datenübergabe unterbrochen (broken pipe)
        at sun.nio.ch.FileDispatcherImpl.write0(Native Method)[:1.8.0_65]
        at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)[:1.8.0_65]
        at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)[:1.8.0_65]
        at sun.nio.ch.IOUtil.write(IOUtil.java:65)[:1.8.0_65]
        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)[:1.8.0_65]
        at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:170)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        ... 45 more
19:52:22.793 [WARN ] [org.eclipse.jetty.server.HttpChannel] - /chart?items=gPoolTemp&period=W&random=597
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)[165:org.ops4j.pax.web.pax-web-jetty:4.2.4]
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.Server.handle(Server.java:499)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[81:org.eclipse.jetty.util:9.2.14.v20151106]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[81:org.eclipse.jetty.util:9.2.14.v20151106]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_65]
Caused by: javax.imageio.IIOException: I/O error writing PNG file!
        at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1168)[:1.8.0_65]
        at javax.imageio.ImageWriter.write(ImageWriter.java:615)[:1.8.0_65]
        at javax.imageio.ImageIO.doWrite(ImageIO.java:1612)[:1.8.0_65]
        at javax.imageio.ImageIO.write(ImageIO.java:1578)[:1.8.0_65]
        at org.eclipse.smarthome.ui.internal.chart.ChartServlet.doGet(ChartServlet.java:192)[130:org.eclipse.smarthome.ui:0.9.0.b1]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)[20:javax.servlet-api:3.1.0]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)[20:javax.servlet-api:3.1.0]
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)[79:org.eclipse.jetty.servlet:9.2.14.v20151106]
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)[79:org.eclipse.jetty.servlet:9.2.14.v20151106]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[165:org.ops4j.pax.web.pax-web-jetty:4.2.4]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)[77:org.eclipse.jetty.security:9.2.14.v20151106]
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:271)[165:org.ops4j.pax.web.pax-web-jetty:4.2.4]
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[79:org.eclipse.jetty.servlet:9.2.14.v20151106]
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)[165:org.ops4j.pax.web.pax-web-jetty:4.2.4]
        ... 8 more
Caused by: org.eclipse.jetty.io.EofException
        at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:192)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.flush(SslConnection.java:808)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:408)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:302)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:129)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:702)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:246)[81:org.eclipse.jetty.util:9.2.14.v20151106]
        at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:208)[81:org.eclipse.jetty.util:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:480)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:768)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:801)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:147)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:140)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:242)[78:org.eclipse.jetty.server:9.2.14.v20151106]
        at javax.imageio.stream.FileCacheImageOutputStream.flushBefore(FileCacheImageOutputStream.java:258)[:1.8.0_65]
        at com.sun.imageio.plugins.png.IDATOutputStream.finishChunk(PNGImageWriter.java:196)[:1.8.0_65]
        at com.sun.imageio.plugins.png.IDATOutputStream.finish(PNGImageWriter.java:254)[:1.8.0_65]
        at com.sun.imageio.plugins.png.PNGImageWriter.write_IDAT(PNGImageWriter.java:945)[:1.8.0_65]
        at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1158)[:1.8.0_65]
        ... 27 more
Caused by: java.io.IOException: Datenübergabe unterbrochen (broken pipe)
        at sun.nio.ch.FileDispatcherImpl.write0(Native Method)[:1.8.0_65]
        at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)[:1.8.0_65]
        at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)[:1.8.0_65]
        at sun.nio.ch.IOUtil.write(IOUtil.java:65)[:1.8.0_65]
        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)[:1.8.0_65]
        at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:170)[70:org.eclipse.jetty.io:9.2.14.v20151106]
        ... 45 more
19:52:22.813 [WARN ] [org.eclipse.jetty.server.HttpChannel] - Could not send response error 500: javax.servlet.ServletException: javax.imageio.IIOException: I/O error writing PNG file!

The strange thing is: My other charts are working fine…

Okay, I was able to narrow the problem down:
ALL charts showing this error, not only one. And the error only shows up, when I’m changing the scale of the chart.

Here’s the sitemap code, maybe there’s the fault:

Frame label="Garten" {
  Text item=PoolTemp {
      Text item=PoolTemp
      Switch item=PoolTempScale label="Temperaturverlauf" mappings=[12="12h", 24="24h", 72="72h", 999="Woche"] icon="chart"
      Chart item=PoolTemp period=12h refresh=1800 visibility=[PoolTempScale==12, PoolTempScale=="NULL"]
      Chart item=PoolTemp period=D   refresh=3600 visibility=[PoolTempScale==24]
      Chart item=PoolTemp period=3D  refresh=4800 visibility=[PoolTempScale==72]
      Chart item=PoolTemp period=W   refresh=6000 visibility=[PoolTempScale==999]
  }
}

“broken pipe” sounds as if the web browser cancelled the HTTP request meanwhile. The exceptions thus do not hint at any problem.

Could you come up with a minimal sitemap example where the problem occurs and post an issue at https://github.com/eclipse/smarthome/issues?

1 Like

@Kai, thank you - for some reason, I cannot reproduce this problem anymore. Maybe the latest nightly build solved the problem, but not sure. Now I can change the scale of my charts and there is no Java exception anymore…:confused:

@Kai:
HA! Got it - at least I know the trigger now!
When I switch the scale on my laptop using the website -> no Java error
When I switch the scale on my iPhone (using iOS app) -> Java error

Once the error appeared, it won’t go away anymore for this sitemap.
Maybe the iOS apps messes up some rights at the server?

Should I still file the issue at the link provided by you - or somewhere else (because it seems to be an app problem)?

I cannot really tell as it is still unclear to me whether the problem is in the iOS app or on the runtime (or both).
Could you try to get the exception by doing simple HTTP requests (i.e. mimicking the iOS app), e.g. through curl?

Hmmm…If someone can tell me how I could find out, what requests the iOS app is sending to the server, of course I do.
Using other words: What kind of request should I pack into a http call to mimicking the change of the chart scale via iOS?

It only happens when using the buttons which change the visibility property; refreshing the page under iOS doesn’t provoke the mistake :frowning:

I actually do not even now what “the change of the chart scale” exactly is in the iOS app…
Maybe @belovictor or @digitaldan can help providing infos of what requests the app sends.

Hi all,
to clear this one up: “the change of the chart scale” is just a “visibility” propererty for the chart(s), which is bound to a switch item offering the different intervals/scales, like posted here:

Pushing the switch on the web doesn’t provoke any error message; doing the same under iOS, shows the given error. I still try set up an reproduceable setting with a minimal test sitemap (because in the most simple form, this java exception doesn’t show up).

Maybe it does happen, because the chart is nested into a “text” or “frame” item, but still not sure about the order it has to follow…

The problem seems to happen everytime, when the iOS wants to refresh the chart. This happens - of course - always when changing the interval/scale of my chart. It the chart gets an update (by refresh interval or changing the scale) AND the iOS app is open, the error occurs.

It also occurs, when the chart is open on the iOS app - and I’m changing the scale on my PC webbrowser for the same chart. Then, I see a short flicker on the iOS screen (although nothing where touched/pressed) - and the error comes up again in the log file. As soon as close the iOS app, I can change the scale of the chart on my PC based webbrowser as often as I want, there is no error message.

Ergo: This seems to happen anytime a refresh-request from iOS gets to openHAB.

@Kai, I was able to reproduce the problem with a minimal sitemap!
When I use this sitemap…

sitemap test label="Test"
{ Frame {
    Text item=RaspberryTemp label="Raspberry Pi2 [%.1f °C]" {
       Text item=RaspberryTemp
       Switch item=RaspberryTempScale label="Temperaturverlauf" mappings=[12="12h", 24="24h", 72="72h", 999="Woche"] icon="chart"
       Chart item=RaspberryTemp period=12h refresh=1800 visibility=[RaspberryTempScale==12, RaspberryTempScale=="NULL"]
       Chart item=RaspberryTemp period=D   refresh=3600 visibility=[RaspberryTempScale==24]
       Chart item=RaspberryTemp period=3D  refresh=4800 visibility=[RaspberryTempScale==72]
       Chart item=RaspberryTemp period=W   refresh=6000 visibility=[RaspberryTempScale==999]
    }
  }
}

…the problem shows up in the log.
When I remove the frame, the problem vanishes:

sitemap test label="Test"
{ 
    Text item=RaspberryTemp label="Raspberry Pi2 [%.1f °C]" {
       Text item=RaspberryTemp
       Switch item=RaspberryTempScale label="Temperaturverlauf" mappings=[12="12h", 24="24h", 72="72h", 999="Woche"] icon="chart"
       Chart item=RaspberryTemp period=12h refresh=1800 visibility=[RaspberryTempScale==12, RaspberryTempScale=="NULL"]
       Chart item=RaspberryTemp period=D   refresh=3600 visibility=[RaspberryTempScale==24]
       Chart item=RaspberryTemp period=3D  refresh=4800 visibility=[RaspberryTempScale==72]
       Chart item=RaspberryTemp period=W   refresh=6000 visibility=[RaspberryTempScale==999]
    }
  
}

This means: The refresh of a chart which is nested in a text item which is itself nested in a frame object causes the Java exception. If the chart is only a member of a text object (and nothing above), this error doesn’t show up.

The remaining question is: Should I file an issue for the iOS app - or for the OH2 core?

Thank you!

For further reference: https://github.com/openhab/openhab.ios/issues/89

Thanks for that - so I guess the analysis should rather happen on the iOS app side, not on the runtime.

1 Like

I got the identical error as you - some charts would work, others wouldn’t and throws the same java errors in logs. Did you find a workaround for this? I don’t see any updates on the issues page?

I had migrated OH2.2 from an NTC CHIP to a Raspberry Pi (need more horsepower), following the backup/restore method. Ran into quite a number of issues which I’ve slowly fixed, this and zwave issue are the only remaining problems! (oh, and java sitting near 100% CPU quite often)

Hmmm, I’ll answer my own question here… in a nutshell, OpenJDK sux.
Changed from OpenJDK to Oracle Java as per below article and voila, CPU dropped to normal levels which inherently fixed the charting issue as well. I suspect timeouts in the chart binding due to massively high CPU usage with openjdk java caused the I/O errors - perhaps it couldn’t get enough processor time to complete its job.

Only Zwave issue to fix now… :slight_smile: