SOLVED: Admin page shows FTL offline (and not connection to API), but FTL is running

Funny story: I tried installing it onto a fresh VM again, just to see what would happen, and it's working now. What did I do different?

This time I used Ubuntu Server 16.04, instead of Ubuntu Mini 16.04. I don't know what's different between the two in the end, since pihole should install all the packages it needs, right?

Either way, pi-hole is working great now on my Ubuntu Server VM install.

Okay, so it seems to be an issue of the Mini version of Ubuntu? I'm just preparing a virtual machine for it...

Yep -- just the mini version of Ubuntu. No problems running pi-hole on Ubuntu Server.

I have not been able to install it on a ordinary VM (Virtualbox, enough RAM and disk allocated), so for now let's just accept that it works fine on a regular installation.

Thanks for all the help!

For anyone just seeing this, the solution is that pi-hole is not compatible with Ubuntu Mini, for whatever reason. Use the full version of Ubuntu Server.

I have the exact same problem but running on Raspian. Did a fresh install of the OS and a fresh install of pi-hole yet still have the FTL offline error and web ui says no connection to api. I do notice that this only happens when switching to the dashboard. If I don't use the web ui (which of course means I can't view the graphs), pi-hole runs with no issue.

1 Like

Not sure what you said here. Do you mean FTL is running correctly for you and crashes when you open the dashboard?

A post was split to a new topic: FTL Status is Offline

A post was split to a new topic: FTL offline after reboot

same problem here (FTL not running on raspbian), it seems that both pihole-FTL and dnsmasq both want to use port 53/tcp, and obviously cannot.

I installed pihole in Linux with linuxtoy on an android phone.

I found the api curl -i http://192.168.1.106/admin/api.php?summary always return:

FTLnotrunning: true

Because $socket is false at here

I ensured the FTL is running with:

 sudo netstat -anutp|grep 4711

And I wrote a test script:

<?php
function connectFTL($address, $port=4711)
{
        if($address == "127.0.0.1")
        {
                // Read port
                $portfile = file_get_contents("/var/run/pihole-FTL.port");
                if(is_numeric($portfile))
                        $port = intval($portfile);
        }

        // Open Internet socket connection
        $socket = @fsockopen($address, $port, $errno, $errstr, 1.0);

        return $socket;
}
$socket=connectFTL('127.0.0.1');
$request=">stats";
fwrite($socket, $request) or die('{"error":"Could not send data to server"}');
?>

executed sucessfully with home user role.

But I cannot execute the script with www-data user in Linux deployed with linuxtoy on android.
So the problem is here, the script cannot be changed into www-data user. So the fsockopen aciton is failed.

Only If you installed Linux on android with linuxtoy, you can do this:

  1. replace www-data user with android user in files: /etc/lighttpd/lighttpd.conf, /etc/init.d/lighttpd
  2. change owner of files
sudo chown android:android  -R /var/cache/lighttpd/ /var/lib/php/sessions/ /var/lib/php/sessions/   /var/www/html/ /var/lib/php/sessions/ /var/lib/php/sessions/  /etc/pihole/
 
  1. restart lighttpd
    sudo /etc/init.d/lighttpd restart

Update:
You may just change the group owner of files and don't need to do step 1. (It is not verified, you can take a try)

sudo chown :android  -R /var/cache/lighttpd/ /var/lib/php/sessions/ /var/lib/php/sessions/   /var/www/html/ /var/lib/php/sessions/ /var/lib/php/sessions/  /etc/pihole/

hi am also running into this issue i used linux deploy to install ubuntu bionic can you please explain your solution in more detail as am new to this
i got the change owner part but that's pretty much it, do i need to run your script? (if so, how)