[SOLVED] Chart generation failed: null

Then I don’t think it’s a problem with item and sitemap but rather with the database.

1 Like

I have droped all the tables from OpenHab database. It gets filled automatically afterwards, so I guess INPUT works.

Did you restart openHAB yet?

Many times

I have exactly the same problem. Any help would be appreciated! (Also on an Synology btw)

@Kees_Schouten Can you tell me which version of OpenHab and Java are you using? I can’t confirm it yet, but I think this started when I’ve updated Java - my older version of OpenHab doesn’t work as well now.

@beeppy

Java version : 1.8.0-151
OpenHab version : 2.3.0.001-SHAPSHOT

Update! It works I’ve update my java to:

Version: 1.8.0_162

To check your java version on synology:

Package manager -> search for “java” -> click on “Open” -> see dialog with version.
At first it didn’t worked but when I restarted my synology server it suddenly worked!

I had the same java version, but openHAB v2.2. Didn’t wan’t to install the pre-release version.

Well, I’ve first updated openHAB to 2.3 and it still didn’t work, but after an upgrade of Java from 151 to 161 - SUCCESS!

So, thank you for your help!

Hello all,

I had the same issue with graphs not showing on an OpenHAB installation on a Synology NAS with the error message in openhab.log “Chart generation failed: null”.

Thanks to this post, I updated my java version (which was 1.8.0-151 before and is 1.8.0-171 now),
and after a restart of the OpenHAB package, it works fine now. :smiley:

Thanks for this!

Kind Regards,
NaBri

One year later, same issue?
I have a DS918+ where I run OpenHAB in a docker container just fine.

Now I also want to run OpenHAB on another location where I have a DS214+ which doesn’t support docker and therefore I have installed the synology package.

I copied config files from DS918 to DS214 (and adapted where necessary) and while it’s basically working with the synology package I do not get Charts rendered in the Basic UI.

Since this is a year later, java version is now at 1.8.0_212 already.

Is there a way to debug this on the diskstation?

What persistence service are you using?
What do the logs show when you try to render a chart?

rrd4j

2019-09-04 10:46:31.689 [WARN ] [thome.ui.internal.chart.ChartServlet] - Chart generation failed: null

If your rrd4j database holds data (you can check that using the REST API) it could be the Problem reported here.

now, I do see *.rdd files in userdata/persistence. each one with 116.408 Bytes

Unfortunately I don’t get any data with the rest service but this is probably user error since I don’t get data on the other machine with working charts as well.
Querying the api for persistence service “rrd4j” returns no items on both machines.

the fontconfig sounds likely, Synology DSM seems to do some things differently than the common linux distro :frowning:

Looking into moving this to the raspberry now

In this case you are doing something wrong. If you want help on that please post the used command (REST API does show the CURL command). The size of the rrd file is set when starting the service for this item, it doesn’t say anything about the content.
I suggested this link because this error did popup a couple of times in the last week’s.

Ok, got the REST call working and there is indeed data stored in rrd4j

{“name”:“ap17_sensor_2_temp”,“datapoints”:“360”,“data”:[{“time”:1567701840000,“state”:“23.75”}, etc

Now, with that verified I tried one more thing

/rrdchart.png?itemsap17_sensor_2_temp?serviceId=rrd4j&period=h

and I get

java.lang.NoClassDefFoundError: Could not initialize class org.rrd4j.graph.RrdGraphConstants at org.rrd4j.graph.RrdGraphDef.<init>(RrdGraphDef.java:80) at org.openhab.persistence.rrd4j.internal.charts.RRD4jChartServlet.createChart(RRD4jChartServlet.java:257)

I think I saw a line mentioning font stuff somewhere but cannot see it anymore.

Since I don’t want to mess up the Diskstation I’m going Raspberry now

thanks

Have a look Here.

Edit: The posted link was not correct, corrected it!

I think I found the solution to my “no charts in openhab on synology” issue:

export FONTCONFIG_PATH=/opt/etc/fonts/

Synology/DSM doesn’t seem to come with proper font stuff out of the box. But It is possible to install additional linux programs and libraries into /opt via OptWare/IPackge or whatever.
Then download the Dejavu font package that rrd4j seems to rely on and add that to fontconfig. Finally make the fontconfig available via the export. Now run openhab (via the karaf script) and - horray - charts get get generated! WOHOOOO

unfortunately, right after this discovery I lost access to the Diskstation at the remote location and can finalize this only in a couple weeks, sigh

Nevertheless I’m playing here with a Raspberry. Where I run into other issues. OH2 Exec and regex result parsing, anybody?

Regards

I’m glad, you a solution.
On that:

Please open a separate thread with a meaningful topic, otherwise the chances of getting help are neglectable.

I am aware, that this is an old thread, but I had the same problem.
Updating Java to 1.8.0_271 solved the problem!