Admin Page Weirdness and No Blocking

Debug Log: https://tricorder.pi-hole.net/Ti77004U/

Details about my system:
Running Debian 10 on Linux Deploy on an Android phone

I'm working on figuring out how to get Pi-Hole up and running, and I've gotten to the point where pihole is running on the phone and I can sort of hit the admin page. However, it does not appear to actually be running, even though it says it's enabled on command line. Clicking on "Enable Blocking" causes it to go green, but as soon as I change a page it goes back to red. Ads are still showing, although curiously when I do pihole -c it appears to be blocking something. I'm thinking it might be a configuration thing, but I've tried different settings when reconfiguring and there's still errors.

If it helps, pi.hole/admin does not work and times out while <ip>/admin does.

$ pihole enable
  [i] Blocking already enabled, nothing to do

I'm honestly a bit lost in the debug log, the conf.d and header errors doesn't appear to be actual errors due to Debian, but the IP and service ones are a bit confusing, because lighttpd appears to be working since I can reach the admin page. I've tried restarting the lighttpd service but it does not change the error. Does anyone have any ideas on what's going on? Appreciate any insight!

I'll not try to help here cuz I don't think I could. I did find the premise rather interesting. Your running Debian Buster ontop of Android. That in and of itself is gonna cause some difficulties. The linux deploy on github that I looked at hasn't been updated in 4 years ( unless I'm incorrect on that ). Just trying to make use of an old mobile? Its interesting. I hope you get it working.

Yep that was basically it! It's an old phone from 2016, and I figured I might as well try and use it instead of buying a RasPI. I saw a few mentions of people getting it working, plus there was a Pi-Hole for Android APK based off Linux Deploy someone had made that I could try, although that ended up not working for me, hence the manual approach. If it ends up not working I'll get an actual Pi, no harm done other than a rooted phone.

1 Like

Correct.
This is not an error if you are running on Debian.

lighttpd seems to be working (the pages are served), but your OS is not returning the expected answers on these tests.

The tests try to read the service status running systemctl is-active lighttpd or service lighttpd status. If those commands return the wrong values or if they are not present in your OS, the debug log will report the service as offline.

About the Headers:

  • The HTTP response should contain a header named X-Pi-hole, with this content "The Pi-hole Web interface is working!", but this is not present here:
    HTTP/1.1 302 Found
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate
    Pragma: no-cache
    Set-Cookie: PHPSESSID=l7qvh4uthr91mru7gegcjq65bl; path=/; HttpOnly; SameSite=Strict
    Location: login.php
    Content-type: text/html; charset=UTF-8
    Date: Sat, 23 Mar 2024 19:48:39 GMT
    Server: lighttpd/1.4.53
    

The same happens with pihole-FTL tests.

To make sure, what is the output of these commands, on the command line:

systemctl status lighttpd
systemctl status pihole-FTL

If systemctl is not present on your OS, try these ones:

service lighttpd status
service pihole-FTL status

Note:
Your screenshot shows the web page is not able to connect to FTL.
This could mean FTL is offline, or the connection using port 4711 is not possible, or it could also mean PHP session expired and you just need to login again.

Interesting, I'm actually getting two different types of responses depending on which one I run.

$ systemctl status lighttpd
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
$ systemctl status pihole-FTL
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
$
$ sudo service lighttpd status
[ ok ] lighttpd is running.
$ sudo service pihole-FTL status
[ ok ] pihole-FTL is running
$

From what I gather from Google that's because systemd is not initialized and it's using sysvinit instead, which doesn't seem like a problem per se, especially since service works.

This is not an issue, but I don't know why the debug was not able to identify the "is running" string (it should).

Anyway, this is just related to the debug log showing the service as offline when it is actually running, but it doesn't explain why your web interface is not connecting to FTL. Are you still seeing the issue on the browser?

Actually I am noticing a possible reason, service does not appear to work unless sudo is applied. Maybe this is related?

$ service lighttpd status
-sh: 14: service: not found

On the browser it still shows "Lost Connection to API", and the "Enable Blocking" button does not persist a change, so I don't think it's connecting.

As I said, this only explains the debug log.

The web interface doesn't use these commands.

What is the output of echo ">stats >quit" | nc localhost 4711 in the command line of your Pi-hole server?

It appears to be hanging. nc works by itself but when trying to query 4711 it hangs.

This means FTL is really offline or something is blocking port 4711.

Hmm if I look for the port I see this, which doesn't seem right because there's no process attached to it. I wonder why the sudo service is showing it as running, and allows me to restart it. It seems like it's running somewhere else entirely.

$ sudo service pihole-FTL restart
.
Stopped

FTL started!

$ netstat -noa | grep "4711"
tcp        0      0 127.0.0.1:4711          0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp6       0      0 ::1:4711                :::*                    LISTEN      off (0.00/0/0)

I'm not sure how to further help you.

Apparently it's not possible to run Pi-hole in Android (Note: Android is not a supported OS).

There were similar attempts, but they all fail:

Ah bummer. I do appreciate the links though, they did not show up when I first did a search. Thank you for your help!

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