Pihole install stops with RTNETLINK answers: File exists error

As per title I tried installing pihole by running

curl -sSL https://install.pi-hole.net | bash

and it ended with this error : RTNETLINK answers: File exists error

Run the installer again.
If it still doesn't work, perhaps these links will help:
https://github.com/pi-hole/pi-hole/issues/1110#issuecomment-285349933
https://www.reddit.com/r/pihole/comments/6o4llg/problems_installing_pihole_on_orange_pi_zero/

I just ate a few hours tonight when trying to install on a Centos 7 VPS on OpenVZ that comes with a static public IP already configured. I think this should be considered a supported use case as setting up pi-hole with openvpn or strongswan on a cheap VPS is pretty common and logical.

The overall problem is that the code to get IPv4 info is not robust and pulls bad values. This messes up the network config files and results in the "RTNETLINK answers: File exists error" error. I spent some time trying to just fix the problem, but just kept running into more and more issues. Since I was already setup with correct static IPv4 configuration, the solution for me was:

  1. Manually download install script
  2. Comment out setStaticIPv4 after the getStaticIPv4Settings check.
  3. Manually run script

Install proceeded successfully after this.

Corrective action suggested to developers:

  1. Fix the network information grepping code for Centos 7 on openvz. There's several errors.
  2. Fix issue handling interfaces with aliases. ie, venet0 was 127.0.0.1 and venet0:0 was my public IP. The script can't handle venet0:0, as the colons don't work.
  3. Improve the static IPv4 configuration detection as it should have already detected they were set and skipped breaking my ifcfg-venet0 file which it shouldn't have touched.
  4. Add option to script to skip setting IPv4. (This should be implemented anyways)

Regards

1 Like

So the problem has been around for a bit I see as this is an old thread. It sounds like a reasonable solution. Pull requests are always welcome. :smile: Or at least recreating this issue on GitHub since it relates more closely to the code.