collectd: mkdir (/var/lib/collectd): No such file or directory

Open
#31,155 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
linux
Domain
backend

Research direction

Start by reading the collectd package configuration and startup files in this repository; the report points to a missing /var/lib/collectd directory after saving LuCI Statistics settings. Reproduce the setup on the reported OpenWrt realtek/rtl930x target and trace how collectd's data directory is configured or created. Done means collectd starts after Save & Apply without the reported directory error.

Written by the indexing model from the issue text.

Description

bug
Package Name

collectd

Maintainer

Jo-Philipp Wich [email protected], Hannu Nyman [email protected]

OpenWrt Version

SNAPSHOT

OpenWrt Target/Subtarget

realtek/rtl930x

Steps to Reproduce
  1. Install luci-app-statistics and collectd
  2. Go to Statistics -> Setup change something and press Save&Apply
  3. Go to logs
Actual Behaviour

I see this error log and collectd no longer starts:

daemon.err: collectd[4855]: plugin_load: plugin "cpu" successfully loaded.
daemon.err: collectd[4855]: plugin_load: plugin "interface" successfully loaded.
daemon.err: collectd[4855]: plugin_load: plugin "iwinfo" successfully loaded.
daemon.err: collectd[4855]: plugin_load: plugin "load" successfully loaded.
daemon.err: collectd[4855]: plugin_load: plugin "memory" successfully loaded.
daemon.err: collectd[4855]: plugin_load: plugin "rrdtool" successfully loaded.
daemon.err: collectd[4855]: rrdtool plugin: RRASingle = true: creating only AVERAGE RRAs
daemon.err: collectd[4855]: change_basedir: mkdir (/var/lib/collectd): No such file or directory
daemon.err: collectd[4855]: Error: Unable to change to directory `/var/lib/collectd'.
daemon.info: procd: Instance collectd::instance1 s in a crash loop 6 crashes, 0 seconds since last crash

There is no /var/lib on my device.

# uci show collectd
collectd.globals=globals
collectd.globals.alt_config_file='/etc/collectd.conf'

Also interesting:

# ls /var/run/collectd/
-s

This weird -s file seems to contain a bunch of binary data.

Confirmation Checklist
Dominant language
Makefile
Stars
4.7k
Forks
4k
Avg merge
2d 2h
Merged PRs (30d)
251

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openwrt/packages

All issues in openwrt/packages

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.