[16.04_x64 server] Restarting networking (via systemctl) - failed

Instalacja i konfiguracja oprogramowania sieciowego.
Grandalf_
Serdeczny Borsuk
Serdeczny Borsuk
Posty: 130
Rejestracja: 06 gru 2008, 23:26
Płeć: Mężczyzna
Wersja Ubuntu: 16.04
Środowisko graficzne: Brak
Architektura: x86_64

[16.04_x64 server] Restarting networking (via systemctl) - failed

Post autor: Grandalf_ »

Mam zainstalowany Ubuntu Server 16.04.1 na Hyper-V. Komunikacja działa, pingi idą, logowanie z zewnątrz, squid itd lecz mam problem z dodatkową konfiguracją interfejsów:

Kod: Zaznacz cały

cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enp0s10f0
iface enp0s10f0 inet static
address 10.203.0.195
netmask 255.255.128.0
# network 10.203.0.0
gateway 10.203.0.254
dns-nameservers 8.8.8.8
post-up ip route add 172.16.0.0/24 gw 10.203.0.251
post-up ip route add 172.20.0.0/24 gw 10.203.0.251
post-down ip route del 172.16.0.0/24 gw 10.203.0.251
post-down ip route del 172.20.0.0/24 gw 10.203.0.251
Przed wprowadzeniem reguł post-up i post-down restart przechodził bez problemu natomiast po ich wpisaniu mam takie coś:

Kod: Zaznacz cały

/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!

Kod: Zaznacz cały

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 Wed 2016-09-07 07:22:48 CEST; 1min 15s ago
     Docs: man:interfaces(5)
  Process: 3337 ExecStop=/sbin/ifdown -a --read-environment (code=exited, status=0/SUCCESS)
  Process: 3735 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
  Process: 3728 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=exite
 Main PID: 3735 (code=exited, status=1/FAILURE)

Sep 07 07:22:48 proxy systemd[1]: Stopped Raise network interfaces.
Sep 07 07:22:48 proxy systemd[1]: Starting Raise network interfaces...
Sep 07 07:22:48 proxy ifup[3735]: RTNETLINK answers: File exists
Sep 07 07:22:48 proxy ifup[3735]: Failed to bring up enp0s10f0.
Sep 07 07:22:48 proxy systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Sep 07 07:22:48 proxy systemd[1]: Failed to start Raise network interfaces.
Sep 07 07:22:48 proxy systemd[1]: networking.service: Unit entered failed state.
Sep 07 07:22:48 proxy systemd[1]: networking.service: Failed with result 'exit-code'.

Kod: Zaznacz cały

 journalctl -xe
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit networking.service has finished shutting down.
Sep 07 07:22:48 proxy systemd[1]: Starting Raise network interfaces...
-- Subject: Unit networking.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit networking.service has begun starting up.
Sep 07 07:22:48 proxy ifup[3735]: RTNETLINK answers: File exists
Sep 07 07:22:48 proxy ifup[3735]: Failed to bring up enp0s10f0.
Sep 07 07:22:48 proxy systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Sep 07 07:22:48 proxy systemd[1]: Failed to start Raise network interfaces.
-- Subject: Unit networking.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit networking.service has failed.
--
-- The result is failed.
Sep 07 07:22:48 proxy systemd[1]: networking.service: Unit entered failed state.
Sep 07 07:22:48 proxy systemd[1]: networking.service: Failed with result 'exit-code'.

Zakomentowanie tych reguł nic nie daje bo błąd i tak dalej występuje. System wykrywa kartę:

Kod: Zaznacz cały

lspci
00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (AGP disabled) (rev 03)
00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 01)
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 02)
00:08.0 VGA compatible controller: Microsoft Corporation Hyper-V virtual VGA
00:0a.0 Ethernet controller: Digital Equipment Corporation DECchip 21140 [FasterNet] (rev 20)
Dodatkowo, chciałbym zmienić nazwę karty na bardziej "ludzką" jak np eth0 lecz nie mam żadnych plików w:

Kod: Zaznacz cały

 ls -l /etc/udev/rules.d/
total 0
namok
Przebojowy Jelonek
Przebojowy Jelonek
Posty: 1703
Rejestracja: 01 mar 2008, 12:21
Płeć: Mężczyzna
Wersja Ubuntu: 16.04
Środowisko graficzne: Unity
Architektura: x86_64
Kontakt:

Re: [16.04_x64 server] Restarting networking (via systemctl) - failed

Post autor: namok »

Grandalf_ pisze: Dodatkowo, chciałbym zmienić nazwę karty na bardziej "ludzką" jak np eth0 lecz nie mam żadnych plików w:

Kod: Zaznacz cały

 ls -l /etc/udev/rules.d/
total 0
A co stoi na przeszkodzie aby utworzyć odpowiedni plik?
Grandalf_
Serdeczny Borsuk
Serdeczny Borsuk
Posty: 130
Rejestracja: 06 gru 2008, 23:26
Płeć: Mężczyzna
Wersja Ubuntu: 16.04
Środowisko graficzne: Brak
Architektura: x86_64

Re: [16.04_x64 server] Restarting networking (via systemctl) - failed

Post autor: Grandalf_ »

Teoretycznie nic, lecz czytałem, że ta pliki są generowane automatycznie przez system. Więc pojawia się pytanie czemu u mnie ich nie ma?
Awatar użytkownika
mario_7
Administrator
Administrator
Posty: 8659
Rejestracja: 30 sie 2006, 13:11
Płeć: Mężczyzna
Wersja Ubuntu: 20.04
Środowisko graficzne: GNOME
Architektura: x86_64

Re: [16.04_x64 server] Restarting networking (via systemctl) - failed

Post autor: mario_7 »

Czy polecenia które wprowadziłeś wykonywały się prawidłowo gdy uruchamiałeś je ręcznie?
ODPOWIEDZ

Wróć do „Sieci, serwery, Internet”

Kto jest online

Użytkownicy przeglądający to forum: Obecnie na forum nie ma żadnego zarejestrowanego użytkownika i 6 gości