Kapacitor fluxtask showing error

I am running Kapacitor as docker container. I wanted to use fluxtask, below is the configuration i added:

  enabled = true
  task-run-org = "provided-influxdb-org"

I am getting following error:

run: open server: open service *fluxtask.Service: creating analytical store: could not create database for analytic store, tried 5 times

If i disable the fluxtask, kapacitor is working fine.

Any resolution for this.

In order to work it needs an InfluxDB database, and as you can see it tried to create it but failed (probably due to permission).

refer to: