Unknown job: pihole-FTL on an Upstart init system

I have the same issue. However this is a fresh install:

sudo service lighttpd status
[ ok ] lighttpd is running.
sudo service dnsmasq status
[ ok ] Checking DNS forwarder and DHCP server: dnsmasq[....] (running).
sudo service pihole-FTL status
status: Unknown job: pihole-FTL

  1. What operating system are you using on this machine?
  2. Is the file /etc/init.d/pihole-FTL present?

Raspbian.
Seems like a simple: "sudo service pihole-FTL start" did the trick.
My question is - why was it not enabled on boot-up? I have changed the pi-hole webservice to host on :81 instead of :80. Might that have affected the start of pihole-FTL?

Thanks for your support DL6ER

No, FTL is entirely independent from all the web frontend stuff.

I'm still wondering why you have seen

sudo service pihole-FTL status
status: Unknown job: pihole-FTL

pihole-FTL should be started at system start, but it seems like there is something fishy going on on your system. Do you have seen any indications of why it fails to start automatically (grep through your system's logs)?

I suspect this system uses upstart as the services are referred to as jobs:

xbian@monmc ~ $ /sbin/init --version
init (upstart 1.13.2)

Systemd can be determined by:

pi@noads:~ $ stat /sbin/init
File: ‘/sbin/init’ -> ‘/lib/systemd/systemd’

The function "status" does not exist in the init.d script:

But on upstart systems, the bash command "status" does exist as an equivalent of "service ... status".
The function call "status" in the init.d script is a bit confusing if on an upstart system.
I am sure the pihole-FTL daemon was started as I have Pi-Hole running on upstart as well:

xbian@monmc ~ $ sudo service pihole-FTL status
status: Unknown job: pihole-FTL

xbian@monmc ~ $ ps -e | grep pihole-FTL
21371 ? 00:00:11 pihole-FTL

xbian@monmc ~ $ sudo netstat -nltup | grep pihole-FTL
tcp 0 0 127.0.0.1:4711 0.0.0.0:* LISTEN 21371/pihole-FTL

I did a pihole repair, rebooted the system and ended up with not being able to access port 81 for the pihole admin page. When I then modified the lighttpd conf file and restarted the service I could access it again and pihole-FTL was down.

No pihole-FTL process.

sudo service pihole-FTL status
status: Unknown job: pihole-FTL

and nothing is listening on port 4711, nothing named "pihole" is listening either.

Could you still do that?

Other that that, does the file /etc/init.d/pihole-FTL exist on your system?

@Ammzi1, what is the output for:

/sbin/init --version

and:

stat /sbin/init

If your init system is upstart, the install script doesnt tell upstart to have the pihole-FTL daemon start at boot.
I had to do below one to tell upstart to have this daemon start at boot:

sudo update-rc.d pihole-FTL defaults

After a reboot, you can check if pihole-FTL is running by:

xbian@monmc ~ $ ps -e | grep pihole-FTL
21371 ? 00:00:11 pihole-FTL

It does.
Sorry forgot about the logs. Here's a full dump:

snip

Yup, above log entry means upstart instead of systemd.

You are completely right. It is Upstart.
Doing a reboot now with the new configuration.....

Yup! That did the trick:

ps aux | grep pihole
pihole 1515 4.5 0.2 30712 2100 ? Sl 18:02 0:01 /usr/bin/pihole-FTL
pi 1942 0.0 0.2 4280 1920 pts/0 S+ 18:02 0:00 grep --color=auto pihole

Great stuff. Thanks for the assist :slight_smile:

Cheers!

EDIT:, I adjusted title a bit if you dont mind:
"Unknown job: pihole-FTL on an Upstart init system"

1 Like

Shall we add this to the installer to be done automatically? How to detect if we should do it? Always if update-rc.d exists or some finer detection mechanism?

root@monmc ~ # runlevel
N 2

root@monmc ~ # ls -al /etc/rc2.d/ | grep pihole-FTL
root@monmc ~ #

root@monmc ~ # [ ! -f /etc/rc$(/sbin/runlevel | /usr/bin/awk '{print $2}').d/S*pihole-FTL ] && [[ $(/sbin/init --version | /bin/grep upstart) ]] && /usr/sbin/update-rc.d pihole-FTL defaults
root@monmc ~ #

root@monmc ~ # ls -al /etc/rc2.d/ | grep pihole-FTL
lrwxrwxrwx 1 root root 20 May 19 23:11 S02pihole-FTL -> ../init.d/pihole-FTL