Error on binding on port

On my PIhole setup I seem to have an issue.
After a PI reboot somehow its not loading FTL anymore... See log:
It used to run wel.

Any tips / hints ?

########## FTL started! ##########
FTL branch: (no branch)
FTL hash: v2.9.4
FTL date: 2017-06-22 23:33:48 +0200
FTL user: pihole
Notice: Found no readable FTL config file
Using default settings
Starting config file parsing
SOCKET_LISTENING: only local
TIMEFRAME: Rolling 24h
QUERY_DISPLAY: Show queries
AAAA_QUERY_ANALYSIS: Show AAAA queries
MAXDBDAYS: max age for stored queries is 365 days
Finished config file parsing
Found no other running pihole-FTL process
PID of FTL process: 20771
Gravity list entries: 112631
Blacklist entries: 2
Notice: Increasing wildcards struct size from 0 to 1 (100.00 B)
Wildcard blocking list entries: 1
Database initialized
Starting initial log file parsing
Reading from /var/log/pihole.log.1 (rw-r--r--)
Notice: Increasing forwarded struct size from 0 to 4 (184.00 B)
New forward server: 192.168.1.104 (0/4)
Notice: Increasing overTime struct size from 0 to 100 (3.40 KB)
Notice: Increasing queries struct size from 0 to 10000 (323.41 KB)
Notice: Increasing domains struct size from 0 to 1000 (343.41 KB)
Notice: Increasing clients struct size from 0 to 10 (343.59 KB)
New client: 192.168.1.130 --.------.-- (0/10)
New client: 192.168.1.162 -------.-- (1/10)
New client: 192.168.1.121 (2/10)
New forward server: 133.51.193.21 --.----------.--- (1/4)
New client: 192.168.1.164 -----------.-- (3/10)
New client: 192.168.1.140 (4/10)
New client: 192.168.1.141 (5/10)
New client: 192.168.1.163 ----------.-- (6/10)
Notice: Increasing domains struct size from 1000 to 2000 (387.66 KB)
New client: 192.168.1.143 (7/10)
Reading from /var/log/pihole.log (rw-r--r--)
Finished initial log file parsing
-> Total DNS queries: 6234
-> Cached DNS queries: 1674
-> Blocked DNS queries: 516
-> Unknown DNS queries: 0
-> Unique domains: 1418
-> Unique clients: 8
Successfully accessed setupVars.conf
Error on binding on port 4711
Error on binding on port 4712
Error on binding on port 4713
Error on binding on port 4714
Error on binding on port 4715
Error on binding on port 4716
Error on binding on port 4717
Error on binding on port 4718
Error on binding on port 4719
Error on binding on port 4720
Error on binding on port 4721
Error on binding on port 4722
Error on binding on port 4723
Error on binding on port 4724
Error on binding on port 4725
Error on binding on port 4726
Error on binding on port 4727
Error on binding on port 4728
Error on binding on port 4729
Error on binding on port 4730
Error on binding on port 4731
Error listening on any port

Token : i42knkxwqy

Rgds P.

What's the output of

lsof -i -P -n

Hai,

Thats :

lsof -i -P -n
COMMAND   PID     USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
dnsmasq  2349  dnsmasq    4u  IPv4    7279      0t0  UDP *:53 
dnsmasq  2349  dnsmasq    5u  IPv4    7280      0t0  TCP *:53 (LISTEN)
sshd     2490     root    3u  IPv4 1344666      0t0  TCP 192.168.1.130:322->192.168.1.228:2289 (ESTABLISHED)
sshd     2521   userme    3u  IPv4 1344666      0t0  TCP 192.168.1.130:322->192.168.1.228:2289 (ESTABLISHED)
lighttpd 2706 www-data    4u  IPv4    9752      0t0  TCP *:80 (LISTEN)
lighttpd 2706 www-data    5u  IPv4    9753      0t0  TCP *:443 (LISTEN)
mysqld   3238    mysql   10u  IPv4   11168      0t0  TCP 127.0.0.1:3306 (LISTEN)
snmpd    4570     snmp    9u  IPv4   20848      0t0  UDP 127.0.0.1:161 
snmpd    4570     snmp   10u  IPv4   20846      0t0  UDP *:51788 
sshd     4599     root    3u  IPv4   20898      0t0  TCP *:322 (LISTEN)
dhcpcd5  4825     root    8u  IPv4   23419      0t0  UDP *:68

OK, so it doesn't look like port 4711 (FTL's default) is in use. I'll have to ping @DL6ER about this one.

P.S. I edited your posts just for formatting the code as it was difficult to read as it was.

Oops, wait. I forgot to direct you to the FTL debug instructions. Please follow those so we can help diagnose the issue further.

No indeed as it tries all ports but can not find one that can be used someway..
Not sure why as before it worked well.... although had to restart the service a few times.

I noticed if I reboot the PI it runs the first time but conneting to the dashboard gives me a spinning arrow and not showing data.... already reloaded the whole setup maybe I should remove it all and start from scratch to see if it then works ? (did not do that yet)

You can try that first if you want, but it would be more helpful for us to go through those debugging instructions so we can fix the issue if we need to; that way others won't run into it.

Just saw this :
created the config file for pihole-ftl and if I add all I see it binds to 0.0.0.0 if I do SOCKET_LISTENING=localonly it dos not bind..... However if it binds to 0.0.0.0 I still get the spinning erro at the dashbord ....

With debug:
[New Thread 0xb6d77470 (LWP 11708)]
[New Thread 0xb6577470 (LWP 11709)]
[2017-07-15 15:43:38.506] Error on binding on port 4711
[2017-07-15 15:43:38.511] Error on binding on port 4712
[2017-07-15 15:43:38.514] Error on binding on port 4713
[2017-07-15 15:43:38.515] Error on binding on port 4714
[2017-07-15 15:43:38.519] Error on binding on port 4715
[2017-07-15 15:43:38.521] Error on binding on port 4716
[2017-07-15 15:43:38.525] Error on binding on port 4717
[2017-07-15 15:43:38.527] Error on binding on port 4718
[2017-07-15 15:43:38.529] Error on binding on port 4719
[2017-07-15 15:43:38.532] Error on binding on port 4720
[2017-07-15 15:43:38.534] Error on binding on port 4721
[2017-07-15 15:43:38.537] Error on binding on port 4722
[2017-07-15 15:43:38.539] Error on binding on port 4723
[2017-07-15 15:43:38.542] Error on binding on port 4724
[2017-07-15 15:43:38.544] Error on binding on port 4725
[2017-07-15 15:43:38.546] Error on binding on port 4726
[2017-07-15 15:43:38.552] Error on binding on port 4727
[2017-07-15 15:43:38.556] Error on binding on port 4728
[2017-07-15 15:43:38.558] Error on binding on port 4729
[2017-07-15 15:43:38.560] Error on binding on port 4730
[2017-07-15 15:43:38.564] Error on binding on port 4731
[2017-07-15 15:43:38.565] Error listening on any port
[Thread 0xb6d77470 (LWP 11708) exited]
[Thread 0xb6ffa340 (LWP 11655) exited]
[Inferior 1 (process 11655) exited with code 01]

Afer I type run debug....

I think I found the issue but not being abe to resolve it yet. Looks its not pihole related. Somehow my pi is not assigning a localloop address anymore since my last reboot ???? Although I have a hosts file entry it keeps being empty. If I assign one 'ip addr add 127.0.0.1 dev lo' I get pihole-ftl to start (it than binds to a port) however I can not ping my localhost (and found out also not my eth0) on the local device !!!!!!!

Weird as I have internet and from extenal I can connect to my PI... Anyone an idea what might cause that? And even more how to get that fixed ?
There is no firewall running on the device.

iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Tried a couple of reboots but nogo....
I found also that if a setup a static IP address (/etc/network/interfaces) its also not accepting that (I normaly use DHCPCD to get one but in te past used statics also and than it used to work)

Inserted also an old image on the RPI and with that old image the static works and also and the
loopback also works with that... Hence no harware issue so must be software..

Would be great if I can get some pointers to get it fixed...

Chrs P.

Found the issue as it seems ifup & ifdown where corrupted.... noticed it as /run/network was missing...
Cleaned it all up and did :

apt-get install ifupdown

And after that my interfaces came up as it should and now pihole-FTL was able to bind a port...
All worked now as expected...

Thanks..

1 Like

Great, glad it is working now...sorry for the lack of response.

No worries it was a good exercise hi...

Hai.... sorry to say but I just noticed that its pihole killing my iproute2 ...... just did an update (as I saw there was a new package). And during that update that I saw an update of iproute2 ..... why as it was already there in working order... Hence waited until it was ready and tested iproute2

root@pi:~# ip a
Segmentation fault

IEKS........

Removed the by pihole installed iproute2 and did:
apt-get install ifupdown

And eureka ..... all back working......

So found the reason here....

ip -V
ip utility, iproute2-ss120521

Setting up iproute (20120521-3) ...
Installing new version of config file /etc/iproute2/ematch_map ...
Setting up ifupdown (0.7.8) ...

Is the working versions... on my PI 4.4.50+ #970

Chrs...

@DanSchaper please take a look at this when you find the time

Can you run a new pihole -d please? We just use the distributions repository for packages, and we require iproute2 for the ip utility that has superseded ifup and ifdown.

Done : kgikgtrinb

(oeps lighttp with some rrd error hi..)

Looks like you're running Raspbian Wheezy, which has been End Of Life for quite a while now. (It's Raspbian version 7, and Raspbian version 8 (Jessie) is just about the be replaced with Raspbian 9 (Stretch).) So you have an obsoleted version of the Operating System. Is there a reason you aren't running Jessie (Version 8)?

I run quite some sensors for fun : http://pi.gids.nl:81 and all has been running fine for quite some time. (read years)
Is there a way to update to a new image safely or is that start from scratch ?
or is that like this : https://www.howtoforge.com/tutorial/how-to-upgrade-debian-wheezy-to-jessie-stable-release/ whats the risk....
Anyways there was never a need to upgare yet as in If it ain't broke, don't fix it !

Here (LTS - Debian Wiki) it reads:
Debian 7 “Wheezy”
i386, amd64, armel and armhf
from 26th April 2016 to 31st May 2018

On the Raspberry Pi you don't run Debian, you run Raspbian, which is a deriviative of Debian, with some extra tweaks and changes for the RPi. (Example, in Debian networking is handled by /etc/network/interfaces but in Raspbian it's all done through dhcpcd5.)

Upgrading in place really will end up with a lot of confusion and headache, the best way is to start out fresh. Wheezy uses an initialization system called sysvinit, while Jessie moved to a new system called systemd. This is the software that controls all aspects of starting, running and stopping any software on the RPi.

Because of all the major changes that happened between Wheezy and Jessie, we really don't fully support Wheezy. The debug script runs commands that are specific to systemd and we can't get a full view of exactly what is going in with a Wheezy install, and things like the networking configuration changes come up like you have seen. Old practices like using ifup and ifdown go out and new practices of ip link set dev eth0 up replace if up. It's a change in the approach, iproute2 has a lot of functionality and I'm not sure why you had a seg fault on ip address, it seems to be a bad download or software package update.

It also looks like you're on an older kernel, as Raspbian is on the 4.9 series, but I don't know if that update has been ported back to Wheezy, it just may not be getting any new features, and only getting security updates, so you will be operating with software that is older than what is being released with Jessie.

If things are working, you may want to hold off on changing for a few months and skip Jessie, and go directly to Stretch (9), that should be making an appearance soon, and it would be easier just to make the changes once, and go from Wheezy to Stretch, instead of having to do the process of setting things up for Jessie, only having to do that all over again in a month or two when Stretch is released and is the OS release that is suggested by the Raspberry Pi Towers.

1 Like