Kapacitor: Permission denied to open /root/.kapacitor/cluster.id

Created on 20 Jun 2016  路  3Comments  路  Source: influxdata/kapacitor

I have been getting this message in my kapacitord.err log:

[run] 2016/06/20 16:39:01 E! create server: open /root/.kapacitor/cluster.id: permission denied run: create server: open /root/.kapacitor/cluster.id: permission denied

I have made sure to chown that cluster.id file AND the .kapacitor/ dir to kapacitor:kapacitor and still have no luck starting it with:

service kapacitor start

Here is the interesting bits of my config file:
https://paste.debian.net/740322/

Secondly, during start-up on the command line (which works), it mentions something about not being about to find boltdb, is this something needed, or optional?

I have installed this via the influx repo using apt-get and I'm on Ubuntu 14.04

Most helpful comment

I'd recommend against using /root/.kapacitor as your data directory, and, instead, use /var/lib/kapacitor. The /root directory is usually reserved for anything that runs as the root user (which Kapacitor _shouldn't_ be). I believe the reason why the service kapacitor start command isn't working is because the kapacitor user most likely doesn't have read privileges on the /root directory, so it can't even see into the directory. So the first thing you should do is update your configuration to replace any instances of /root/.kapacitor with /var/lib/kapacitor.

Regarding:

Secondly, during start-up on the command line (which works), it mentions something about not being about to find boltdb, is this something needed, or optional?

It's mandatory, though it is baked into the Kapacitor binary. Can you paste the exact messages that you're seeing?

All 3 comments

I'd recommend against using /root/.kapacitor as your data directory, and, instead, use /var/lib/kapacitor. The /root directory is usually reserved for anything that runs as the root user (which Kapacitor _shouldn't_ be). I believe the reason why the service kapacitor start command isn't working is because the kapacitor user most likely doesn't have read privileges on the /root directory, so it can't even see into the directory. So the first thing you should do is update your configuration to replace any instances of /root/.kapacitor with /var/lib/kapacitor.

Regarding:

Secondly, during start-up on the command line (which works), it mentions something about not being about to find boltdb, is this something needed, or optional?

It's mandatory, though it is baked into the Kapacitor binary. Can you paste the exact messages that you're seeing?

Regarding the boltdb, this is the exact message I am seeing:

[task_store] 2016/06/20 16:51:31 W! could not open old boltd for task_store. Not performing migration. Remove thetask_store.dirconfiguration to disable migration.

As for the /root/ part, I have switched it to /var/lib/ and that has been resolved. Thanks!

The boltdb error is still there though. Since I have installed it via the repo, should the boltdb be baked into there?

Ah, that's just a warning regarding the migration logic here, which means you have still have the deprecated task config section. This section will be removed with future releases, so that message is just letting you know that it couldn't complete the migration (since there's nothing to migrate, since this wasn't an upgrade). Removing that section should get rid of the warning, though.

Was this page helpful?
0 / 5 - 0 ratings