There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

Help making munin work in ubuntu with lighttpd

I’m trying to install munin in my ubuntu VPS
I used apt install munin-node munin to install it.

But I can’t make the web interface work.
Since I already have pihole there I’m using lighttpd with this config (for the most part the default from the documentation)

<pre style="background-color:#ffffff;">
<span style="color:#323232;">server.modules += ( "mod_alias" )
</span><span style="color:#323232;">server.modules += ( "mod_fastcgi" )
</span><span style="color:#323232;">server.modules += ( "mod_rewrite" )
</span><span style="color:#323232;">
</span><span style="color:#323232;">$SERVER["socket"] == ":8467" {
</span><span style="color:#323232;">
</span><span style="color:#323232;">alias.url += ( "/munin-static" => "/etc/munin/static" )
</span><span style="color:#323232;">alias.url += ( "/munin"        => "/var/cache/munin/www/" )
</span><span style="color:#323232;">server.document-root = "/var/cache/munin/www/"
</span><span style="color:#323232;">
</span><span style="color:#323232;">fastcgi.server += ("/munin-cgi/munin-cgi-graph" =>
</span><span style="color:#323232;">                   (( "socket"      => "/var/run/lighttpd/munin-cgi-graph.sock",
</span><span style="color:#323232;">                      "bin-path"    => "/usr/lib/munin/cgi/munin-cgi-graph",
</span><span style="color:#323232;">                      "check-local" => "disable",
</span><span style="color:#323232;">                   )),
</span><span style="color:#323232;">                  "/munin-cgi/munin-cgi-html" =>
</span><span style="color:#323232;">                   (( "socket"      => "/var/run/lighttpd/munin-cgi-html.sock",
</span><span style="color:#323232;">                      "bin-path"    => "/usr/lib/munin/cgi/munin-cgi-html",
</span><span style="color:#323232;">                      "check-local" => "disable",
</span><span style="color:#323232;">                   ))
</span><span style="color:#323232;">                 )
</span><span style="color:#323232;">
</span><span style="color:#323232;">url.rewrite-repeat-if-not-file += (
</span><span style="color:#323232;">                   "/munin/(.*)" => "/munin-cgi/munin-cgi-html/$1",
</span><span style="color:#323232;">                   "/munin-cgi/munin-cgi-html$" => "/munin-cgi/munin-cgi-html/",
</span><span style="color:#323232;">                   )
</span><span style="color:#323232;">}
</span>

When the service is restarted it the log shows this error even when the files have 777 permissions

<pre style="background-color:#ffffff;">
<span style="color:#323232;">(gw_backend.c.1404) invalid "bin-path" => "/usr/lib/munin/cgi/munin-cgi-graph" (check that file exists, is regular file, and is executable by lighttpd)
</span><span style="color:#323232;">(gw_backend.c.1404) invalid "bin-path" => "/usr/lib/munin/cgi/munin-cgi-html" (check that file exists, is regular file, and is executable by lighttpd)
</span>

When I try to run a config with the command lighttpd -D -f /etc/munin/lighttpd.conf
The output is this

<pre style="background-color:#ffffff;">
<span style="color:#323232;">(gw_backend.c.324) child exited: 1 unix:/var/run/lighttpd/munin-cgi-html.sock-3
</span><span style="color:#323232;">(gw_backend.c.468) unlink /var/run/lighttpd/munin-cgi-html.sock-3 after connect failed: Connection refused
</span><span style="color:#323232;">(gw_backend.c.324) child exited: 1 unix:/var/run/lighttpd/munin-cgi-graph.sock-0
</span><span style="color:#323232;">(gw_backend.c.468) unlink /var/run/lighttpd/munin-cgi-graph.sock-0 after connect failed: Connection refused
</span>

Do you guys have any clue what might be happening?

med ,

If the files exist, are regular, are correct and the permissions don’t prohibit access, maybe there’s something else blocking the connection attempt.

Given that it’s ubuntu, could it be an AppArmor thing? Not sure if that’s enabled by default these days.

Seems to me like it can’t run the binaries, so there’s nothing listening on the sockets you’ve specified. Fix the bin-path issue, fix the problem

pe1uca OP ,

You’re right, I thought giving 777 would be enough, I had to change the owner and group of the files to the ones of lighttpd.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines