Pi-hole: SSH broken pipe when installing

Created on 23 Oct 2018  路  5Comments  路  Source: pi-hole/pi-hole

In raising this issue, I confirm the following: {please fill the checkboxes, e.g: [X]}

How familiar are you with the the source code relevant to this issue?:

1


Expected behaviour:

A successful installation of Pi-hole.

Actual behaviour:

The basic-install.sh script always fails at the same spot.

+ runGravity
+ /opt/pihole/gravity.sh --force
  [鉁揮 Deleting existing list cache
  [i] Neutrino emissions detected...
  [鉁揮 Pulling blocklist source list into range

  [i] Target: raw.githubusercontent.com (hosts)
  [鉁揮 Status: Retrieval successful

  [i] Target: mirror1.malwaredomains.com (justdomains)
  [鉁揮 Status: Retrieval successful

  [i] Target: sysctl.org (hosts)
  [鉁揮 Status: Retrieval successful

  [i] Target: zeustracker.abuse.ch (blocklist.php?download=domainblocklist)
  [鉁揮 Status: Retrieval successful

  [i] Target: s3.amazonaws.com (simple_tracking.txt)
  [鉁揮 Status: Retrieval successful

  [i] Target: s3.amazonaws.com (simple_ad.txt)
  [鉁揮 Status: Retrieval successful

  [i] Target: hosts-file.net (ad_servers.txt)
  [鉁揮 Status: Retrieval successful

  [鉁揮 Consolidating blocklists
  [i] Extracting domains from blocklists...packet_write_wait: Connection to fdc6:8938:3334::249 port 22: Broken pipe

SSH cuts out with a broken pipe while trying to handle the blocklists. This happens consistently at this step for me.

Steps to reproduce:

sudo bash -x basic-install.sh or sudo pihole -r after an initial unsuccessful run.

Other useful information for reproducing:

$ cat /etc/os-release 
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Brand new Raspberry Pi model 3 B+.

Debug token provided by uploading pihole -d log:

4ih2kuwbuh

Troubleshooting undertaken, and/or other relevant information:

When trying to run the command that failed I get the following:

pi@pihole:~ $ pihole -g
  No IP addresses found! Please run 'pihole -r' to reconfigure
pi@pihole:~ $ /opt/pihole/gravity.sh 
  No IP addresses found! Please run 'pihole -r' to reconfigure

And after a little digging it's apparent why there's an issue there:

pi@pihole:~ $ cat /etc/pihole/setupVars.conf
pi@pihole:~ $ 

setupVars.conf is empty. This is about as far as I got before digging into the code. I also spent many hours Googling around and, while some of the symptoms look similar to issues others have faced, I couldn't find any information that fixed this issue.

Most helpful comment

are-you-wizard

@dschaper that totally worked! Switching from a 5V, 1.0A power supply -> 5.2V 2.0A power supply did the trick!

All 5 comments

What's the IP of your pi-hole? Are you strictly using ipv6 on your network? Who is this guy: fdc6:8938:3334::249 and if you are using IPV4, what happens if you set a static IP on your raspberry PRIOR to installing pihole, and allow pihole to attached to your static IP?

What's the IP of your pi-hole?

Looks like my router is assigning both IPv4 and IPv6 IP addresses:

$ ifconfig
...
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.249  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 2601:282:803:714f::249  prefixlen 128  scopeid 0x0<global>
        inet6 fdc6:8938:3334::249  prefixlen 128  scopeid 0x0<global>
        inet6 fdc6:8938:3334:0:7025:16af:7998:fcdc  prefixlen 64  scopeid 0x0<global>
        inet6 2601:282:803:714f:e987:1def:9a8f:1ffb  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::cc6c:5b3a:d710:6476  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:87:33:27  txqueuelen 1000  (Ethernet)
        RX packets 118  bytes 56364 (55.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 164  bytes 29656 (28.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Are you strictly using ipv6 on your network?

Nope, should be both IPv4 and IPv6 from the looks of it.

Who is this guy: fdc6:8938:3334::249 and if you are using IPV4, what happens if you set a static IP on your raspberry PRIOR to installing pihole, and allow pihole to attached to your static IP?

fdc6:8938:3334::249 is the IPv6 address of the pihole. My router is set up to give the pihole a static address (192.168.1.249). I've also set up the pihole hostname to resolve to the correct address so I can run ssh pi@pihole. I suspect the network is defaulting to resolving pihole to its IPv6 address. For example, if I ssh [email protected] and attempt to run pihole -r I get the following:

...
  [鉁揮 Consolidating blocklists
  [i] Extracting domains from blocklists...packet_write_wait: Connection to 192.168.1.249 port 22: Broken pipe

Seems like something immediately after "Extracting domains from blocklists" is causing the connection to drop. If I manually set setupVars.conf and run gravity.sh I get:

pi@pihole:~ $ sudo /opt/pihole/gravity.sh 
  [i] Neutrino emissions detected...
  [鉁揮 Pulling blocklist source list into range

  [i] Target: raw.githubusercontent.com (hosts)
  [鉁揮 Status: Retrieval successful

  [i] Target: mirror1.malwaredomains.com (justdomains)
  [鉁揮 Status: No changes detected

  [i] Target: sysctl.org (hosts)
  [鉁揮 Status: No changes detected

  [i] Target: zeustracker.abuse.ch (blocklist.php?download=domainblocklist)
  [鉁揮 Status: No changes detected

  [i] Target: s3.amazonaws.com (simple_tracking.txt)
  [鉁揮 Status: No changes detected

  [i] Target: s3.amazonaws.com (simple_ad.txt)
  [鉁揮 Status: No changes detected

  [i] Target: hosts-file.net (ad_servers.txt)
  [鉁揮 Status: Retrieval successful

  [鉁揮 Consolidating blocklists
  [i] Extracting domains from blocklists...packet_write_wait: Connection to 192.168.1.249 port 22: Broken pipe

Ah, the section that Pi-hole is running when the connection fails is a computationally intensive section of code. What power supply are you using with the 3 B+? And do you have any others that you can check with?

are-you-wizard

@dschaper that totally worked! Switching from a 5V, 1.0A power supply -> 5.2V 2.0A power supply did the trick!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JamborJan picture JamborJan  路  3Comments

josvliet picture josvliet  路  5Comments

phzang picture phzang  路  5Comments

davidreverett picture davidreverett  路  4Comments

FallenKN picture FallenKN  路  4Comments