RRDJ Graphs no longer working after Backup / Restore

Hi,

i was having a working installation of OH 2.5.12 on an RPi. Now I ran a backup with the backup tool of Openhabian-Config and copied the resulting file to a new system.

The new server is a debian LXC container where i had installed Debian 10 and Openhabian manually and restored the Backup from the aforementioned RPi. After completion everything worked fine, except the Graphs for RRDJ. All Graphs in the Sitemap showing questionmarks only.

Now I have checked that the rrdj files are being generated in the correct directory.
When I run http://192.168.1.40:8080/rrdchart.png?items=TemperaturWoZi&period=h this resulted in the following output:

HTTP ERROR 500

Problem accessing /rrdchart.png. Reason:

Server Error

Caused by:

java.lang.ExceptionInInitializerError
at org.rrd4j.graph.RrdGraphDef.(RrdGraphDef.java:80)
at org.openhab.persistence.rrd4j.internal.charts.RRD4jChartServlet.createChart(RRD4jChartServlet.java:261)
at org.openhab.persistence.rrd4j.internal.charts.RRD4jChartServlet.service(RRD4jChartServlet.java:161)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:852)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:544)
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:536)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1581)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1307)
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:482)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1549)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1204)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:494)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:374)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.io.IOException: Problem reading font data.
at org.rrd4j.graph.RrdGraphConstants$FontConstructor.getFont(RrdGraphConstants.java:287)
at org.rrd4j.graph.RrdGraphConstants.(RrdGraphConstants.java:304)
… 36 more
Caused by: java.io.IOException: Problem reading font data.
at java.desktop/java.awt.Font.createFont0(Unknown Source)
at java.desktop/java.awt.Font.createFont(Unknown Source)
at org.rrd4j.graph.RrdGraphConstants$FontConstructor.getFont(RrdGraphConstants.java:283)
… 37 more
Caused by:

java.lang.RuntimeException: java.io.IOException: Problem reading font data.
at org.rrd4j.graph.RrdGraphConstants$FontConstructor.getFont(RrdGraphConstants.java:287)
at org.rrd4j.graph.RrdGraphConstants.(RrdGraphConstants.java:304)
at org.rrd4j.graph.RrdGraphDef.(RrdGraphDef.java:80)
at org.openhab.persistence.rrd4j.internal.charts.RRD4jChartServlet.createChart(RRD4jChartServlet.java:261)
at org.openhab.persistence.rrd4j.internal.charts.RRD4jChartServlet.service(RRD4jChartServlet.java:161)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:852)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:544)
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:536)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1581)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1307)
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:482)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1549)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1204)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:494)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:374)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Problem reading font data.
at java.desktop/java.awt.Font.createFont0(Unknown Source)
at java.desktop/java.awt.Font.createFont(Unknown Source)
at org.rrd4j.graph.RrdGraphConstants$FontConstructor.getFont(RrdGraphConstants.java:283)
… 37 more
Caused by:

java.io.IOException: Problem reading font data.
at java.desktop/java.awt.Font.createFont0(Unknown Source)
at java.desktop/java.awt.Font.createFont(Unknown Source)
at org.rrd4j.graph.RrdGraphConstants$FontConstructor.getFont(RrdGraphConstants.java:283)
at org.rrd4j.graph.RrdGraphConstants.(RrdGraphConstants.java:304)
at org.rrd4j.graph.RrdGraphDef.(RrdGraphDef.java:80)
at org.openhab.persistence.rrd4j.internal.charts.RRD4jChartServlet.createChart(RRD4jChartServlet.java:261)
at org.openhab.persistence.rrd4j.internal.charts.RRD4jChartServlet.service(RRD4jChartServlet.java:161)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:852)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:544)
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:536)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1581)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1307)
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:482)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1549)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1204)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:494)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:374)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918)
at java.base/java.lang.Thread.run(Unknown Source)

I have re-run the system setting for the rights. I have removed and reinstalled the RRDJ Persistence service. Nothing changed anything.

Any ideas what went wrong here ? I am not a Linux guy so I am kind of stuck.
Any help would be appreciated.
Thanks a lot
Frank

Is the new system the same version? OH 2.5.12 ?
I think you cannot restore from 2.5 to version 3.

Yes, it is the same version. Restore went smooth, no error. Everything else is working absolutely fine, it is just the graphs.

I have set up a OH3 container in parallel which I configured manually and just copied the textual configurations over. This one works as well but shows the same problem with graphs. So both, the fresh OH3 as well as the restored OH2 system behave the same. Hence I am suspecting the LXC container (although I have read about users running LXC containers on proxmox without problems)

I use proxmox but run OH3 on a full VM as I couldn’t get the USB connections to work if I created a LXC container.

Hm, USB aside, did it work in the container?

As far as I remember, it was @Udo_Hartmann who runs the LXC version. Udo, may I ask you if you needed to tweak anything after installation ?

Ubuntu 20.04 server.
Yes it did work in a container but getting the USB to pass through never worked like it was supposed to. I had to hack files etc and it still didn’t work.
In the VM the USB and any other external devices connect straight away and it is easier to do as well.

Hm, ok, thanks. As per documentation, the recommended OS for Openhabian is Debian, hence I went with Debian 10 as the basis.

I am still wondering why it is ONLY the graphs that do not work. Everything else is just working like a charm.

The OH3 graphs work edstraight up.
You don’t need to configure anything. They “just appear”.
I was using OH2.5 before and I did a snapshot and upgraded to OH3. Then did an OH3 backup.
Then rolled back to OH2.5.
Then created another VM with OH3 on it and restored the OH3 files. Then I deleted all the rules in OH3 and any file based stuff and redid everything via the UI and also just did all my rules in JavaScript.
After swapping over the rules I shutdown the OH2.5
Everything works well.

Oh…you are using Openhabian…I am using Openhab not Openhabian.

Openhabian on Linux is nothing more than just a bunch of very well engineered scripts (Kudos to the team!) that install all required components for Openhab (like the JRE and stuff), installs Openhab itself, sets up the samba shares and so on and so forth. So it IS Openhab, but installed in a quite convinient way :wink:

Never used it. Sounds OK though.
I don’t need samba shares etc.
I just followed the install instructions and it was up and running on about 10 minutes.

I am using OH since 1.8, so I am familiar with it…I guess :wink:

My installation on the RPi still works fine, including graphics (it’s just powered down right now). I just wanted to consolidate some RPis with OH, ioBroker, Nodered, Influx, Docker, Zabbix and some testsystems onto a single Proxmox Box, hence the backup and restore action. I usually maintain OH on a file level configuration. So in case desaster strikes, I can simply flash a new SD Card with Openhabian, restore the textfiles, do some adjustments and I am good to go.

Now, the plan was to use LXC containers as they are more easy to back up, provide snapshots before updates and are faster (As the Proxmox Server runs on a Core i5). As I wrote, the config has worked for years and it is just the Graphs that do not get displayed anymore.

I snapshot the VM and also proxmox has a backup server that you can dump the whole VM to somewhere else and it does so using delta changes. IE the first backup takes a long time but after that it is quicker. You can also backup the VM when it is running.

Guess we are getting off-topic now. I understand containers and VMs quite well and their pros and cons. There have been reasons to go with containers and I would expect the problem is not the container as it works for Udo.

So let’s get back to the problem with the graphs please :wink:

Maybe you have to copy over the rrd files as well or are they in the backup?

If rrdj is not working as expected, the recommendation is to delete them, which I did. After that , rrdj starts creating them from scratch, which it did as well. So looking at the error messages I posted, I’d say rrdj is working and it generates the files (which i checked, including the rights) but has a problem with generating the graphs themselves.

you didn’t move rrd file across processor architectures (ARM to x86), did you ?
I guess that wouldn’t work.

I deleted the files already during the debug process, so they got created all new. Not sure why they would not work across architectures though?

endianess i.e. lo/hi byte ordering