Hi. I’m trying to manually write data to influxdb.
When trying to insert data with REST, I get the following error:
“Persistence service not modifiable: influxdb”
Is InfluxDB running at port 8086? Your screen shot says curl can’t connect. That’s probably not a permissions problem - that’s showing the influxdb server isn’t running on port 8086. What does this show?
ps -ef | grep -i influx
Did you happen to forget to start the influxdb server or change the port it is running on?
I assume that in order to write some data to your db you need to authenticate first ? Have you configured some users with write permissions ? I do not see in your curl that you try to authenticate
Check this link in the ‘Authenticate with the HTTP API’ section
did you try the curl command to 127.0.0.1? Your screen shot shows the curl going to 192.168.50.30 - is that the correct address? And the influxdb.conf does show port 8086? There’s something obvious that is wrong. Just after you try the curl command, do a tail of /var/log/syslog. It should show something.
[http]
# Determines whether HTTP endpoint is enabled.
enabled = true
# Determines whether the Flux query endpoint is enabled.
# flux-enabled = false
# The bind address used by the HTTP service.
bind-address = "localhost:8086"
# Determines whether user authentication is enabled over HTTP/HTTPS.
auth-enabled = false
endpoint enabled=true, I un-commented myself as did I change auth-enabled=false.
both of those recently after errors.
Try running the curl command on the server that is running Influxdb. Do you have a firewall enabled on it that might be blocking access?
Your syslog entry shows success with a “204”. Do you have any entries at exactly the same time that you try to run the curl command? I don’t think you are even connecting to the InfluxDB server, so the permissions on the database are irrelevant. Otherwise you’d see an error in the syslog. You wouldn’t get connection refused. Something is blocking access entirely from your test PC. That’s why I think you should run the curl locally to see what it does.
That was it!
Thank you!
I’m now able to write do database.
Although I still haven’t figured out the correct timestamp syntax.
If I write data without time specified - everything works.
If I try to set custom timestamp then it fails.
I’m having the same “Persistence service not modifiable” error when I try to test writing data to the influxdb persistence service using the REST API developer tool in the OpenHAB 3 UI.
I can retrieve data fine and my influxdb.conf hasn’t modified the bind-address so I believe it is defaulted to :8086. The influx database is running on my NAS whereas OpenHAB is on its own Raspberry Pi.
It looks from the REST tool as though it is sending an authorisation token so I’m stuck with what might be wrong.