Falha ao iniciar o aumento da interface de rede no Ubuntu 16.04

1

De repente estou recebendo failed to start raise network interface mensagens de erro no Ubuntu. Qualquer feedback será de grande ajuda.

Eu tentei as etapas a seguir, mas o problema continua:

root@storage:~# systemctl stop network
Failed to stop network.service: Unit network.service not loaded.

root@storage:~# systemctl disable network
Failed to execute operation: No such file or directory

root@storage:~# /etc/init.d/networking restart
[....] Restarting networking (via systemctl): networking.serviceJob for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details.
 failed!

root@storage:~# ping 192.168.0.227
PING 192.168.0.227 (192.168.0.227) 56(84) bytes of data.
64 bytes from 192.168.0.227: icmp_seq=1 ttl=64 time=0.022 ms
64 bytes from 192.168.0.227: icmp_seq=2 ttl=64 time=0.059 ms
64 bytes from 192.168.0.227: icmp_seq=3 ttl=64 time=0.054 ms
^C
--- 192.168.0.227 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.022/0.045/0.059/0.016 ms
root@storage:~# 

root@storage:/home/bsaitechnosales# 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 Thu 2018-01-11 12:50:20 +0545; 10min ago
Docs: man:interfaces(5)
Process: 15534 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
Process: 15529 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm
Main PID: 15534 (code=exited, status=1/FAILURE)

Jan 11 12:50:20 storage ifup[15534]: Failed to bring up lo.
Jan 11 12:50:20 storage ifup[15534]: RTNETLINK answers: File exists
**Jan 11 12:50:20 storage ifup[15534]: Failed to bring up enp1s0.**
Jan 11 12:50:20 storage ifup[15534]: run-parts: failed to exec /etc/network/if-up.d/iptables: Exec format error
Jan 11 12:50:20 storage ifup[15534]: run-parts: /etc/network/if-up.d/iptables exited with return code 1
Jan 11 12:50:20 storage systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Jan 11 12:50:20 storage ifup[15534]: /sbin/ifup: post-up script failed.
Jan 11 12:50:20 storage systemd[1]: Failed to start Raise network interfaces.
Jan 11 12:50:20 storage systemd[1]: networking.service: Unit entered failed state.
Jan 11 12:50:20 storage systemd[1]: networking.service: Failed with result 'exit-code'.

    
por BSAI Techno Sales 10.01.2018 / 12:49

2 respostas

1

Talvez um pouco atrasado, mas tive o mesmo problema, mas com o ip6tables que deu um erro:

$ sudo ifup ens160
run-parts: failed to exec /etc/network/if-pre-up.d/ip6tables: Exec format error
run-parts: /etc/network/if-pre-up.d/ip6tables exited with return code 1
Failed to bring up ens160.

Meu /etc/network/if-pre-up.d/ip6tables ficou assim:

ip6tables-restore < /etc/ip6tables.conf

Eu resolvi o problema adicionando um shebang no topo do script para torná-lo assim:

#!/bin/sh
ip6tables-restore < /etc/ip6tables.conf

Agora minha interface está disposta a aparecer. Espero que esta solução possa ajudá-lo (e outros que tropeçam neste post).

    
por 2Wheels 28.05.2018 / 09:12
0

No meu caso, isso é causado por mais de um gateway em um sistema. Basta remover o gateway em uma das suas interfaces e tentar reiniciar o serviço de rede. Eu trabalho em mim

    
por cuwid 30.07.2018 / 07:59