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

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

sudo systemctl status pihole-FTL -l
Running in chroot, ignoring request.

stat /sbin/init
File: '/sbin/init' -> '/lib/systemd/systemd'
Size: 20 Blocks: 0 IO Block: 4096 symbolic link
Device: 702h/1794d Inode: 24596 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2017-11-23 21:16:10.029681562 +0100
Modify: 2017-04-08 23:45:22.000000000 +0200
Change: 2017-11-23 20:28:25.912729565 +0100
Birth: -

sestatus
-bash: sestatus: command not found

groups root
root : root android aid_radio aid_bluetooth aid_graphics aid_input aid_audio aid_camera aid_log aid_compass aid_mount aid_wifi aid_adb aid_install aid_media aid_dhcp aid_sdcard_rw aid_vpn aid_keystore aid_usb aid_drm aid_available aid_gps aid_media_rw aid_mtp aid_drmrpc aid_nfc aid_sdcard_r aid_clat aid_loop_radio aid_media_drm aid_package_info aid_sdcard_pics aid_sdcard_av aid_sdcard_all aid_logd aid_shared_relro aid_shell aid_cache aid_diag aid_net_bt_admin aid_net_bt aid_inet aid_net_raw aid_net_admin aid_net_bw_stats aid_net_bw_acct aid_net_bt_stack

groups pihole
pihole : pihole www-data aid_net_bt_admin aid_net_bt aid_inet aid_net_raw aid_net_admin

groups www-data
www-data : www-data pihole

sudo /usr/bin/pihole-FTL
FTL started!

Try the solution offered in this thread:

And run the groups commands again.

Ps. I got reminded by devs that running "/usr/bin/pihole-FTL" as user "root" could unintentionally alter permissions for the pihole-FTL database file.
Better check if permissions for this file is still correct and resembles below:

$ ls -lh /etc/pihole/pihole-FTL.db
-rw-r--r-- 1 pihole pihole 119M Nov 22 20:49 /etc/pihole/pihole-FTL.db

If not owned by user "pihole" with group "pihole", you can fix it by running below one:

sudo chown pihole:pihole /etc/pihole/pihole-FTL.db

I tried the offered solution, but for ´groups root´nothing changed, but ´group www-data´returned www-data : www-data aid_net_bt_admin aid_net_bt aid_inet aid_net_raw aid_net_admin pihole´

I also checked for the permissions, it was user ´root´ and group ´root´´.
I changed it to pihole:pihole and tried sudo /usr/bin/pihole-FTL again,
but FTL is still offline and connection to api is still lost and load is also still red.

The "pihole-FTL" process runs as user "pihole".
What is displayed when you run:

groups pihole

Mind that everytime you run "sudo /usr/bin/pihole-FTL", you'll need to fix permissions again with the "chown" command!
Your not supposed to run this one from shell as its controled by systemd but I just wanted to know if it was able to run at all.

groups pihole
pihole : pihole www-data aid_net_bt_admin aid_net_bt aid_inet aid_net_raw aid_net_admin

Yeah upon reading back, groups was already ok for the pihole user before you did the "usermod -a -G ... pihole" command.

If you browse to the Pi-hole web GUI, are you able to alter settings ?
Like for example try changing "CPU Temperature Unit" from Celsius to Fahrenheit or other way arround.

And you need to figure out how to query systemd about status for the "pihole-FTL" daemon as the "systemctl" command doesnt seem to work (Running in chroot, ignoring request).
I believe the web GUI uses systemctl as well to query status and displays it as red now.
So it could be that pihole-FTL is just running as it should but the web GUI cant see it.
Does below one report any status ?

sudo service pihole-FTL status

Any relevant messages in the pihole-FTL logs ?

less /var/log/pihole-FTL.log

Or in the lighttpd logs ?

sudo less /var/log/lighttpd/error.log

EDIT: I added a bit above ^
And below one should display all processes running in the chroot including the pihole-FTL daemon:

pi@noads:~ $ sudo ps -e
 4354 ?        00:00:29 pihole-FTL