FTL offline, Load is red in a Linux Deploy container on Android

Those "lsof" messages are probably related to running Pi-hole in a container and am not sure if they are harmless.

Are you sure SELinux is disabled ?

sestatus

The "setenforce 0" command gets reset back again to enforcing after a reboot.
If you want SELinux to be disabled persistent, lookup the line that says "SELINUX=enabled" and change into "SELINUX=disabled" in below file:

nano /etc/selinux/config

Also, log files ownership and permissions could be wrong.
What does below output ?

ls -al /var/log/*pihol*

Missed this bit.
Yeah systemd works better with Pi-hole.
Make sure "pihole-FTL" starts at boot with:

systemctl enable pihole-FTL

root@localhost:~# ls -al /var/log/pihol
-rw-r--r--. 1 root pihole 31931 Aug 21 20:56 /var/log/pihole_debug.log
-rw-r--r--. 1 pihole pihole 12339 Aug 21 20:31 /var/log/pihole-FTL.log
-rw-r--r--. 1 dnsmasq root 2444383 Aug 21 21:59 /var/log/pihole.log

Did you check "sestatus" ?

File permissions look right:

root@noads:~# ls -al /var/log/*pihol*.log
-rw-r--r-- 1 root    pihole   32360 May 11 23:30 /var/log/pihole_debug.log
-rw-r--r-- 1 pihole  pihole  242143 Aug 21 18:51 /var/log/pihole-FTL.log
-rw-r--r-- 1 dnsmasq root   1170546 Aug 21 19:32 /var/log/pihole.log

Dont know whats bugging permissions now.

yes SELinux is disabled

socket_create(): failed: reason: (Permission Denied)

debug token cnkshz0zqo

Last one I can think of, a user not being part of group permissions.
Below one displays groups that the "pihole" user is in:

$ groups pihole
pihole : pihole www-data

To modify groups for particular user:

usermod -G pihole,www-data pihole

still same

i came across this but (permission denied error in php socket programming) dont know how to verify wheather it is working in terminal and also /usr/sbin/setsebool httpd_can_network_connect=1 returns SELinux disabled

If your sure SELinux is disabled, this solution does not apply to you.

i tried to enable SELinux using setenforce 1 but it also returns SELinux Disabled

since it says permission denied. So i'm thinking to make all the users as root. But I dont know how to do.
or
execute certian commands like socket creation in code with sudo

root@localhost:~# groupadd -g 3001 aid_bt
groupadd: GID '3001' already exists
root@localhost:~# groupadd -g 3002 aid_bt_net
groupadd: GID '3002' already exists
root@localhost:~# groupadd -g 3003 aid_inet
groupadd: group 'aid_inet' already exists
root@localhost:~# groupadd -g 3004 aid_net_raw
groupadd: group 'aid_net_raw' already exists
root@localhost:~# groupadd -g 3005 aid_admin
groupadd: GID '3005' already exists
root@localhost:~# usermod -a -G aid_bt,aid_bt_net,aid_inet,aid_net_raw,aid_admin root
usermod: group 'aid_bt' does not exist
usermod: group 'aid_bt_net' does not exist
usermod: group 'aid_admin' does not exist

its says group already exists but when i try to add a user to group it says group doesn't exist

root@localhost:~# netstat -tulpn |grep -i ftl
tcp 0 0 127.0.0.1:4711 0.0.0.0:* LISTEN 2079/pihole-FTL

root@localhost:~# sudo service lighttpd status
[ ok ] lighttpd is running.
root@localhost:~# sudo service dnsmasq status
[ ok ] Checking DNS forwarder and DHCP server: dnsmasq[....] (running).

If you want me to change kernel. Please let me know which kernel to use.

72s0otd583

It seems that the issue is that PHP is unable to create the socket to communicate with FTL. I'm not sure why that is happening, but it is most likely related to it being run in a container. You may have more luck running the Docker container: Docker Hub

I solved this by adding users

usermod -a -G aid_net_bt_admin,aid_net_bt,aid_inet,aid_net_raw,aid_net_admin root
usermod -a -G aid_net_bt_admin,aid_net_bt,aid_inet,aid_net_raw,aid_net_admin pihole
usermod -a -G aid_net_bt_admin,aid_net_bt,aid_inet,aid_net_raw,aid_net_admin www-data

Thanks to everyone who helped me.

1 Like

Great find!
I altered subject into below if you dont mind:
"FTL offline, Load is red in a Linux Deploy container on Android"

Hey, I have the same exact issue. I am running Jessie on Linux deploy and my FTL ist offline, load button ist red and it says lost connection to API. I tried all the suggestions but nothing worked. My debug token:
aqtcpgchpq

Does the outcome of the many commands run in above postings deviate from yours ?
Like what is outcome for:

sudo systemctl status pihole-FTL -l

stat /sbin/init

/sbin/init --version

sestatus

groups root

groups pihole

groups www-data

sudo /usr/bin/pihole-FTL