Influx DB under Windows with OH2

I upgraded to OH2 just a few days ago and everything seems to be running apart from the Persitence Service.

I tried to install the old RRD4J as this was running fine under 1.8.3 but I was not able to manage get this running again!
However, I have now installed the Influx DB und Windows and it seems to run somehow. For example I am able to store the example parameters “CPU” Value =0.64 and so on and I can also find the values in a list.

If I open my sitemap with a “Graph” the OH2 tries to access the Influx database, as I get some notifiaction about the request from OH2.

The one thing that is not working is the automated storage of the persisted values from OH.

The influxdb.cfg file looks like this:


The influxdb.persist file looks like this:
Strategies {

everyHour : "0 0 * * * ?"
everyDay  : "0 0 0 * * ?"
everyMinute : "0 * * * * ?"

 // if no strategy is specified for an item entry below, the default list will be used
default = everyMinute


Each line in this section defines for which item(s) which strategy(ies) should be applied.
You can list single items, use “" for all items or "groupitem” for all members of a group
item (excl. the group item itself).
Items {
// persist all items once a day and on every change and restore them from the db at startup
rweTempWZ : strategy = everyMinute, everyChange, everyDay, restoreOnStartup
ESP82661T01 : strategy = everyMinute, everyChange, everyDay, restoreOnStartup
ESP82661T02 : strategy = everyMinute, everyChange, everyDay, restoreOnStartup

The three values above are shown on sitemaps, so it seems that there is a value behind and the variable is defined properly.

The influxdb.conf file stored in the same folder as the influx installation I have uncommented the following parameters only and maybe here is a part of the problem. As I am using a windows system, maybe the location for data and wal is not set correctly. (I just wonder, because if I go in the influx DB console, I can show the vlaues that I have stored before, so somewhere Influx seems to save data)


Where the metadata/raft database is stored
dir = “/var/lib/influxdb/meta”

The directory where the TSM storage engine stores TSM files.
#dir = "/var/lib/influxdb/data"
dir = “c:\influx\data”

wal-dir = “/var/lib/influxdb/wal”
wal-dir = “c:\influx\wal”

Determines whether HTTP endpoint is enabled.
enabled = true

The bind address used by the HTTP service.
bind-address = “:8086”

Determines whether user authentication is enabled over HTTP/HTTPS.
auth-enabled = true

If anybody has influx running under windows communicating with OH2 I would be very happy about some feedback about the configuration files which are used, so that I can adopt.

Best regards,

Please paste code more readable with code fences:


your code goes here

In fact, there should be no problem at all with rrd4j or influxdb, whatever kind of OS you use, rather than anything else it would be the java version which may cause side effects, but in question of influxdb, I guess this is some sort of cygwin.

When running openHAB and influxdb on the same computer, you should configure openHAB to use localhost:8086 or, and not the real ethernet address.

Hi Udo,

thanks for the quick reply. I have just changed the IP to localhost.

My Java version is Version 8 and Update 144 1.8.0_144-b01

As I am using also the RWE plugin for the control of my heatings, I need to use the command:


may this cause the problems?

today after work I will post the configuration files once again.


Maybe editing your posting would suffice :wink:

:slight_smile: Hi Udo, I just tried to edit the posting. I hope it is more readable now…

Seems to me that either there went something wrong when you posted the code at first place, or there are a few issues in influxdb.conf.

Line 4,9,11,12,19 : wrong quotation marks, please only use " and neither nor
Line 11: missing # at the very beginning

I have just checked the log from InfluxDB and this log reads, that the influxdb.conf file was not found so the standard configuration is choosen…

The executable files were just copied to c:\influx\
The path of the data etc. is under C:\users\Frank.influxdb…

[I] 2017-09-26T19:38:39Z InfluxDB starting, version 1.3.5, branch HEAD, commit 9d9001036d3585cf21925c13a57881bc6c8dcc7e
[I] 2017-09-26T19:38:39Z Go version go1.8.3, GOMAXPROCS set to 4
[I] 2017-09-26T19:38:39Z no configuration provided, using default settings
[I] 2017-09-26T19:38:39Z Using data dir: C:\Users\Frank\.influxdb\data service=store
[I] 2017-09-26T19:38:39Z C:\Users\Frank\.influxdb\data\_internal\monitor\3\000000002-000000002.tsm (#0) opened in 998.5µs engine=tsm1 service=filestore
[I] 2017-09-26T19:38:39Z C:\Users\Frank\.influxdb\data\_internal\monitor\5\000000001-000000001.tsm (#0) opened in 999µs engine=tsm1 service=filestore
[I] 2017-09-26T19:38:39Z reading file C:\Users\Frank\.influxdb\wal\_internal\monitor\3\_00009.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-09-26T19:38:39Z C:\Users\Frank\.influxdb\data\openhab\autogen\2\000000002-000000002.tsm (#0) opened in 1.001ms engine=tsm1 service=filestore
[I] 2017-09-26T19:38:39Z reading file C:\Users\Frank\.influxdb\wal\_internal\monitor\5\_00005.wal, size 1024723 engine=tsm1 service=cacheloader
[I] 2017-09-26T19:38:39Z reading file C:\Users\Frank\.influxdb\wal\openhab\autogen\2\_00007.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-09-26T19:38:39Z C:\Users\Frank\.influxdb\data\_internal\monitor\1\000000001-000000001.tsm (#0) opened in 1.9975ms engine=tsm1 service=filestore
[I] 2017-09-26T19:38:39Z C:\Users\Frank\.influxdb\data\openhab\autogen\2 opened in 33.007ms service=store
[I] 2017-09-26T19:38:39Z C:\Users\Frank\.influxdb\data\_internal\monitor\3 opened in 33.9056ms service=store
[I] 2017-09-26T19:38:39Z reading file C:\Users\Frank\.influxdb\wal\_internal\monitor\1\_00008.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-09-26T19:38:39Z C:\Users\Frank\.influxdb\data\_internal\monitor\1 opened in 48.8994ms service=store
[I] 2017-09-26T19:38:40Z reading file C:\Users\Frank\.influxdb\wal\_internal\monitor\5\_00006.wal, size 1667903 engine=tsm1 service=cacheloader
[I] 2017-09-26T19:38:40Z reading file C:\Users\Frank\.influxdb\wal\_internal\monitor\5\_00007.wal, size 86181 engine=tsm1 service=cacheloader
[I] 2017-09-26T19:38:40Z reading file C:\Users\Frank\.influxdb\wal\_internal\monitor\5\_00008.wal, size 0 engine=tsm1 service=cacheloader
[I] 2017-09-26T19:38:40Z C:\Users\Frank\.influxdb\data\_internal\monitor\5 opened in 598.8023ms service=store
[I] 2017-09-26T19:38:40Z opened service service=subscriber
[I] 2017-09-26T19:38:40Z Starting monitor system service=monitor
[I] 2017-09-26T19:38:40Z 'build' registered for diagnostics monitoring service=monitor
[I] 2017-09-26T19:38:40Z 'runtime' registered for diagnostics monitoring service=monitor
[I] 2017-09-26T19:38:40Z 'network' registered for diagnostics monitoring service=monitor
[I] 2017-09-26T19:38:40Z 'system' registered for diagnostics monitoring service=monitor
[I] 2017-09-26T19:38:40Z Starting precreation service with check interval of 10m0s, advance period of 30m0s service=shard-precreation
[I] 2017-09-26T19:38:40Z Starting snapshot service service=snapshot
[I] 2017-09-26T19:38:40Z Storing statistics in database '_internal' retention policy 'monitor', at interval 10s service=monitor
[I] 2017-09-26T19:38:40Z Starting continuous query service service=continuous_querier
[I] 2017-09-26T19:38:40Z Starting HTTP service service=httpd
[I] 2017-09-26T19:38:40Z Authentication enabled:false service=httpd
[I] 2017-09-26T19:38:40Z Listening on HTTP:[::]:8086 service=httpd
[I] 2017-09-26T19:38:40Z Starting retention policy enforcement service with check interval of 30m0s service=retention
[I] 2017-09-26T19:38:40Z Listening for signals
[I] 2017-09-26T19:38:40Z Sending usage statistics to
[httpd] ::1 - - [26/Sep/2017:21:44:16 +0200] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.3.5" 14bde3cb-a2f3-11e7-8001-000000000000 118001
[httpd] ::1 - - [26/Sep/2017:21:44:28 +0200] "POST /query?chunked=true&db=&epoch=ns&q=set+openhab HTTP/1.1" 400 104 "-" "InfluxDBShell/1.3.5" 1bf054b5-a2f3-11e7-8002-000000000000 848
[httpd] ::1 - - [26/Sep/2017:21:44:38 +0200] "POST /query?chunked=true&db=&epoch=ns&q=get+openab HTTP/1.1" 400 145 "-" "InfluxDBShell/1.3.5" 21fd11f0-a2f3-11e7-8003-000000000000 997
[httpd] ::1 - - [26/Sep/2017:21:44:43 +0200] "POST /query?chunked=true&db=&epoch=ns&q=open+openhab HTTP/1.1" 400 147 "-" "InfluxDBShell/1.3.5" 24cec723-a2f3-11e7-8004-000000000000 991
[I] 2017-09-26T19:44:46Z SHOW DATABASES service=query
[httpd] ::1 - - [26/Sep/2017:21:44:46 +0200] "POST /query?db=&epoch=ns&q=SHOW+DATABASES HTTP/1.1" 200 123 "-" "InfluxDBShell/1.3.5" 267508bc-a2f3-11e7-8005-000000000000 2003