Question
Problem with network interfaces after private network upgrade on 16.04 droplet
I enabled private networking for my droplet and configured everything via the guide:
https://www.digitalocean.com/docs/networking/private-networking/how-to/enable/
Unfortunately, I cannot ping the private IP from another droplet and I get an error when I try to restart networking:
> service networking restart
Job for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details.
The error:
> systemctl status networking.service
● networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Drop-In: /run/systemd/generator/networking.service.d
└─50-insserv.conf-$network.conf
Active: failed (Result: exit-code) since Fri 2019-01-11 08:10:49 CST; 21s ago
Docs: man:interfaces(5)
Process: 2174 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
Process: 2168 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=exited, status=0/SUC
Main PID: 2174 (code=exited, status=1/FAILURE)
Jan 11 08:10:49 mywebsite ifup[2174]: Failed to bring up lo.
Jan 11 08:10:49 mywebsite ifup[2174]: RTNETLINK answers: File exists
Jan 11 08:10:49 mywebsite ifup[2174]: Failed to bring up eth1.
Jan 11 08:10:49 mywebsite ifup[2174]: /etc/network/if-up.d/sendmail: 44: .: Can't open /usr/share/sendmail/dynamic
Jan 11 08:10:49 mywebsite ifup[2174]: run-parts: /etc/network/if-up.d/sendmail exited with return code 2
Jan 11 08:10:49 mywebsite ifup[2174]: /sbin/ifup: post-up script failed.
Jan 11 08:10:49 mywebsite systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Jan 11 08:10:49 mywebsite systemd[1]: Failed to start Raise network interfaces.
Jan 11 08:10:49 mywebsite systemd[1]: networking.service: Unit entered failed state.
Jan 11 08:10:49 mywebsite systemd[1]: networking.service: Failed with result 'exit-code'.
My interfaces file is:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
source /etc/network/interfaces.d/*
and /etc/network/interfaces.d/50-cloud-init.cfg
:
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
auto lo
iface lo inet loopback
dns-nameservers 67.207.67.3 67.207.67.2
#auto eth0
iface eth0 inet static
address 104.236.230.182/18
gateway 104.236.192.1
# control-alias eth0
iface eth0 inet static
address 10.17.0.7/16
auto eth1
iface eth1 inet static
address 10.132.136.184/16
Output from ifconfig
:
> ifconfig
eth0 Link encap:Ethernet HWaddr 0e:91:7a:63:c6:e1
inet addr:104.236.230.182 Bcast:104.236.255.255 Mask:255.255.192.0
inet6 addr: fe80::c91:7aff:fe63:c6e1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1352 errors:0 dropped:0 overruns:0 frame:0
TX packets:1096 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:582069 (582.0 KB) TX bytes:307106 (307.1 KB)
eth1 Link encap:Ethernet HWaddr 12:91:f5:bb:25:1a
inet addr:10.132.136.184 Bcast:10.132.255.255 Mask:255.255.0.0
inet6 addr: fe80::1091:f5ff:febb:251a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:280 (280.0 B) TX bytes:578 (578.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:160 errors:0 dropped:0 overruns:0 frame:0
TX packets:160 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:11840 (11.8 KB) TX bytes:11840 (11.8 KB)
and ip route
:
> ip route
default via 104.236.192.1 dev eth0 onlink
10.132.0.0/16 dev eth1 proto kernel scope link src 10.132.136.184
104.236.192.0/18 dev eth0 proto kernel scope link src 104.236.230.182
makes everything look like it’s configured, but I cannot use ifup
or ifdown
either.
I’ve searched for the error “RTNETLINK answers: File exists” but nothing has really helped.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×