Code Monkey home page Code Monkey logo

Comments (3)

BETLOG avatar BETLOG commented on June 9, 2024

I think this was related to #1281 (comment)

from munin.

BETLOG avatar BETLOG commented on June 9, 2024

Nope.

Can anyone help me out with this error?
2023/11/22 20:58:29 [ERROR] Unable to create '/var/lib/munin/munin/pi4b-df_inode-devtmpfs-g.rrd': you must define at least one Round Robin Archive

I was thinking that by deleting /var/lib/munin/munin/pi4b*.rrd and restarting munin it probably should generate new databases with the relevant round-robin-ness....but that didnt work, unless maybe i missed deleting something relevant.

from munin.

BETLOG avatar BETLOG commented on June 9, 2024

Two things:

1/2) Permissions get changed to bad values... by (i assume) munin-cron
eg:
I'll stop everything before I start munin-check:

root@betlognuc:/home/user# systemctl stop munin munin-node apache2

root@betlognuc:/home/user# munin-check -f
check /var/cache/munin/www
check /var/lib/munin/cgi-tmp
ls: cannot access '/var/lib/munin/cgi-tmp/munin-cgi-graph/*': No such file or directory
# /var/lib/munin/cgi-tmp/munin-cgi-graph/* : Wrong owner ( != munin)
chown: cannot access '/var/lib/munin/cgi-tmp/munin-cgi-graph/*': No such file or directory
check /var/lib/munin/datafile
check /var/lib/munin/datafile.storable
check /var/lib/munin/graphs
check /var/lib/munin/htmlconf.storable
check /var/lib/munin/limits
check /var/lib/munin/limits.storable
check /var/lib/munin/munin
check /var/lib/munin/munin-graph.stats
check /var/lib/munin/munin-stats.stats
check /var/lib/munin/munin-update.stats
check /var/lib/munin/munin-update.stats.tmp
check /var/lib/munin/state-munin-betlogbeast.storable
check /var/lib/munin/state-munin-betlogbrick.storable
check /var/lib/munin/state-munin-betlognuc.storable
check /var/lib/munin/state-munin-p3bplus.storable
check /var/lib/munin/state-munin-pi3bplus.storable
check /var/lib/munin/state-munin-pi3b.storable
check /var/lib/munin/state-munin-pi4b.storable
check /var/lib/munin/state-munin-pizerocam0.storable
check /var/lib/munin/state-munin-pizerocam1.storable
check /var/lib/munin/state-munin-pizerocam2.storable
check /var/lib/munin/state-munin-pizerocam3.storable
check /var/lib/munin/state-munin-router.storable
check miscellaneous
# /var/lib/munin/datafile : Wrong permissions (664 != 644)
# /var/lib/munin/munin-graph.stats : Wrong permissions (664 != 644)
# /var/lib/munin/munin-update.stats : Wrong permissions (664 != 644)
Check done.  Please note that this script only checks most things,
not all things.

Please also note that this script may be buggy.

I'll come back to : /var/lib/munin/cgi-tmp/munin-cgi-graph/* later.

Moving on: Wrong permissions (664 != 644).
So I re-run munin-check -f to see if the previous run fixed them.

root@betlognuc:/home/user# munin-check -f
check /var/cache/munin/www
check /var/lib/munin/cgi-tmp
ls: cannot access '/var/lib/munin/cgi-tmp/munin-cgi-graph/*': No such file or directory
# /var/lib/munin/cgi-tmp/munin-cgi-graph/* : Wrong owner ( != munin)
chown: cannot access '/var/lib/munin/cgi-tmp/munin-cgi-graph/*': No such file or directory
check /var/lib/munin/datafile
check /var/lib/munin/datafile.storable
check /var/lib/munin/graphs
check /var/lib/munin/htmlconf.storable
check /var/lib/munin/limits
check /var/lib/munin/limits.storable
check /var/lib/munin/munin
check /var/lib/munin/munin-graph.stats
check /var/lib/munin/munin-stats.stats
check /var/lib/munin/munin-update.stats
check /var/lib/munin/state-munin-betlogbeast.storable
check /var/lib/munin/state-munin-betlogbrick.storable
check /var/lib/munin/state-munin-betlognuc.storable
check /var/lib/munin/state-munin-p3bplus.storable
check /var/lib/munin/state-munin-pi3bplus.storable
check /var/lib/munin/state-munin-pi3b.storable
check /var/lib/munin/state-munin-pi4b.storable
check /var/lib/munin/state-munin-pizerocam0.storable
check /var/lib/munin/state-munin-pizerocam1.storable
check /var/lib/munin/state-munin-pizerocam2.storable
check /var/lib/munin/state-munin-pizerocam3.storable
check /var/lib/munin/state-munin-router.storable
check miscellaneous
Check done.  Please note that this script only checks most things,
not all things.

Please also note that this script may be buggy.

yep

root@betlognuc:/home/user# lso /var/lib/munin/datafile /var/lib/munin/munin-graph.stats /var/lib/munin/munin-update.stats
 644 -rw-r--r-- 1 munin munin 1081419 Nov 23 10:20 /var/lib/munin/datafile
 644 -rw-r--r-- 1 munin munin       8 Nov 23 10:21 /var/lib/munin/munin-graph.stats
 644 -rw-r--r-- 1 munin munin     101 Nov 23 10:20 /var/lib/munin/munin-update.stats

and yep confirmed

Restarting
root@betlognuc:/home/user# systemctl start munin munin-node apache2
root@betlognuc:/home/user# systemctl status munin munin-node apache2
shows normal operational results.

But because munin-cron has already kicked in while I was writing, the permissions are now broken again:

root@betlognuc:/home/user# munin-check -f
check /var/cache/munin/www
check /var/lib/munin/cgi-tmp
ls: cannot access '/var/lib/munin/cgi-tmp/munin-cgi-graph/*': No such file or directory
# /var/lib/munin/cgi-tmp/munin-cgi-graph/* : Wrong owner ( != munin)
chown: cannot access '/var/lib/munin/cgi-tmp/munin-cgi-graph/*': No such file or directory
check /var/lib/munin/datafile
check /var/lib/munin/datafile.storable
check /var/lib/munin/graphs
check /var/lib/munin/htmlconf.storable
check /var/lib/munin/limits
check /var/lib/munin/limits.storable
check /var/lib/munin/munin
check /var/lib/munin/munin-graph.stats
check /var/lib/munin/munin-stats.stats
check /var/lib/munin/munin-update.stats
check /var/lib/munin/munin-update.stats.tmp
check /var/lib/munin/state-munin-betlogbeast.storable
check /var/lib/munin/state-munin-betlogbrick.storable
check /var/lib/munin/state-munin-betlognuc.storable
check /var/lib/munin/state-munin-p3bplus.storable
check /var/lib/munin/state-munin-pi3bplus.storable
check /var/lib/munin/state-munin-pi3b.storable
check /var/lib/munin/state-munin-pi4b.storable
check /var/lib/munin/state-munin-pizerocam0.storable
check /var/lib/munin/state-munin-pizerocam1.storable
check /var/lib/munin/state-munin-pizerocam2.storable
check /var/lib/munin/state-munin-pizerocam3.storable
check /var/lib/munin/state-munin-router.storable
check miscellaneous
# /var/lib/munin/datafile : Wrong permissions (664 != 644)
# /var/lib/munin/munin-graph.stats : Wrong permissions (664 != 644)
# /var/lib/munin/munin-update.stats : Wrong permissions (664 != 644)
Check done.  Please note that this script only checks most things,
not all things.

Please also note that this script may be buggy.

2/2) returning to /var/lib/munin/cgi-tmp/munin-cgi-graph/*

Cron complains

Date: Thu, 23 Nov 2023 03:32:01 +1000 (AEST)
From: Cron Daemon <[email protected]>
To: [email protected]
Subject: Cron <www-data@betlognuc> cgitmpdir=$({ cat /etc/munin/munin.conf /etc/munin/munin-conf.d/* 2>/dev/null || true; } | sed -nE 's/^\s*cgitmpdir\s+(\S.*)$/\1/p' | tail -1); cgitmpdir=${cgitmpdir:-/var/lib/munin/cgi-tmp}; if [ -d
        "$cgitmpdir" ]; then find "$cgitmpdir/" -type f -mtime +1 -delete; find "$cgitmpdir/" -mindepth 1 -type d -empty -delete; fi

find: cannot delete ‘/var/lib/munin/cgi-tmp/munin-cgi-graph’: Permission denied

It's a little odd and probably cron-pertinent that these mails are timestamped 03:32:01 of whatever day they arrive.

munin-check seems to be inherently incorrect:

ls: cannot access '/var/lib/munin/cgi-tmp/munin-cgi-graph/*': No such file or directory
# /var/lib/munin/cgi-tmp/munin-cgi-graph/* : Wrong owner ( != munin)
chown: cannot access '/var/lib/munin/cgi-tmp/munin-cgi-graph/*': No such file or directory

ie:
(side note: I have needed to do this in the past, and it doesn't seem to get changed 'by itself' but I'll do it again here just to be sure: chmod g+w /var/lib/munin/cgi-tmp/munin-cgi-graph/)

If munin-check gets it's way I have no dynazoom graph rendering:
chown munin:munin /var/lib/munin/cgi-tmp/munin-cgi-graph/
But this (NOT what munin-check wants) makes dynazoom work:
chown munin:www-data /var/lib/munin/cgi-tmp/munin-cgi-graph/

So:

  • permissions are being forced on each munin-cron cycle for (at least):
    /var/lib/munin/datafile
    /var/lib/munin/munin-graph.stats
    /var/lib/munin/munin-update.stats
  • munin-check does not know the correct apache2-compatible perms for /var/lib/munin/cgi-tmp/munin-cgi-graph/

ps: The only error I see across all of the logs is:
/var/log/munin/munin-update.log
2023/11/23 11:08:09 [ERROR] Unable to create '/var/lib/munin/munin/pi4b-df_inode-devtmpfs-g.rrd': you must define at least one Round Robin Archive
Which I assume should happen automatically on node discovery, but in light of the above: seems maybe a permission issue.

from munin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.