Status offline on Centos 7, pihole works

The issue I am facing:
on the web i/f status always says: 'Offline' - though pihole works as expected
if I disable via admin page, then enable, says 'Active', when page refreshes, says again 'Offline'
looking on this forum, found similar issue, with such solution:

ls -l /usr/bin/sudo

---s--x--x. 1 root root 151424 Oct 14 23:28 /usr/bin/sudo

did below line, result below

sudo chmod 4755 /usr/bin/sudo

ls -l /usr/bin/sudo

-rwsr-xr-x. 1 root root 151424 Oct 14 23:28 /usr/bin/sudo

but, didn't help

Details about my system:
Centos 7, Apache

pihole status

[✓] FTL is listening on port 53
[✓] UDP (IPv4)
[✓] TCP (IPv4)
[✓] UDP (IPv6)
[✓] TCP (IPv6)

[✓] Pi-hole blocking is enabled

pihole version

Pi-hole version is v5.8.1 (Latest: v5.8.1)
AdminLTE version is v5.10.1 (Latest: v5.10.1)
FTL version is v5.13 (Latest: v5.13)

error_log has:

[Sun Jan 23 10:50:30.975554 2022] [php7:warn] [pid 1506] [client 192.168.1.28:55140]
PHP Warning: Executing sudo pihole status web failed. in
/var/www/html/admin/scripts/pi-hole/php/func.php on line 150, referer:
http://192.168.1.8/admin/index.php?login
[Sun Jan 23 10:50:30.975662 2022] [php7:notice] [pid 1506] [client
192.168.1.28:55140] PHP Notice: Undefined variable: temperaturelimit in
/var/www/html/admin/scripts/pi-hole/php/header.php on line 379, referer:
http://192.168.1.8/admin/index.php?login

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

sudo: no tty present and no askpass program specified
[Sun Jan 23 10:54:32.243870 2022] [php7:warn] [pid 23573] [client
192.168.1.28:63654] PHP Warning: Executing sudo pihole disable failed. in
/var/www/html/admin/scripts/pi-hole/php/func.php on line 150, referer:
http://192.168.1.8/admin/index.php

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

sudo: no tty present and no askpass program specified
[Sun Jan 23 10:54:36.474311 2022] [php7:warn] [pid 1486] [client 192.168.1.28:63670]
PHP Warning: Executing sudo pihole enable failed. in
/var/www/html/admin/scripts/pi-hole/php/func.php on line 150, referer:
http://192.168.1.8/admin/index.php

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

sudo: no tty present and no askpass program specified
[Sun Jan 23 10:54:42.761389 2022] [php7:warn] [pid 19274] [client
192.168.1.28:63668] PHP Warning: Executing sudo pihole status web failed. in
/var/www/html/admin/scripts/pi-hole/php/func.php on line 150, referer:
http://192.168.1.8/admin/index.php?login
[Sun Jan 23 10:54:42.761470 2022] [php7:notice] [pid 19274] [client
192.168.1.28:63668] PHP Notice: Undefined variable: temperaturelimit in
/var/www/html/admin/scripts/pi-hole/php/header.php on line 379, referer:
http://192.168.1.8/admin/index.php?login

what am I doing wrong ?
(also, temperature doesn't work)

Please generate a debug log, upload it when prompted and post the token URL here.

thanks:
pihole -d -a
...
[✓] Your debug token is: https://tricorder.pi-hole.net/8vl49yVF/

I think the problem is related to running an unsupported web server.

*** [ DIAGNOSING ]: Dashboard and block page
[✗] Block page X-Header: X-Header does not match or could not be retrieved.
HTTP/1.1 200 OK
Date: Sun, 23 Jan 2022 01:43:01 GMT
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 mod_wsgi/3.4 Python/2.7.5 PHP/7.3.33
X-Powered-By: PHP/7.3.33
Content-Type: text/html; charset=UTF-8

What device are you running Pi-hole on? We only check in two places for temp sensors (there are many!) and due to a bug the above error message gets printed. This has been fixed in the next release (the error message, not the temp sensor lookup).

_

What is the output of

sudo pihole status web

thanks! it's an old HP SFF PC:

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Model name:            Intel(R) Core(TM)2 Duo CPU     E6550  @ 2.33GHz
Stepping:              11
CPU MHz:               1998.000
CPU max MHz:           2333.0000
CPU min MHz:           1998.0000
BogoMIPS:              4654.96

# sudo pihole status web
53

I do have lmsensors if that can be adapted ?

# sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +37.0°C  (high = +78.0°C, crit = +100.0°C)
Core 1:       +35.0°C  (high = +78.0°C, crit = +100.0°C)

smsc47b397-isa-0480
Adapter: ISA adapter
fan1:        1789 RPM
fan2:           0 RPM
fan3:        1253 RPM
fan4:        1005 RPM
temp1:        +53.0°C
temp2:        +43.0°C
temp3:        +25.0°C
temp4:       -128.0°C

The reply is correct, so it is likely an permission issue with your apache.


We do look for sensors in

You might want to support

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.