ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Restarting networking service fails - Ubuntu 16.04

    IT Discussion
    linux ubuntu ubuntu 16.04
    5
    22
    22.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Markferron
      last edited by scottalanmiller

      I have a fresh installation of Ubuntu 16.04 and I'm having issues setting up multiple static IPs. The first interface 'ens3' I was able to setup without any issues. On the rest of the interfaces, ens4-ens9, I keep getting an error message when trying to restart the networking service after setting the interface to static.

      itdept@IT-DHCP:~$ sudo /etc/init.d/networking restart
      [sudo] password for itdept:
      [....] 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!
      
      

      Here's what my /etc/network/interfaces file looks like...

      
      # The loopback network interface
      auto lo
      iface lo inet loopback
      
      # The primary network interface
      # DMZ
      auto ens3
      iface ens3 inet static
              address 10.0.0.36
              netmask 255.255.224.0
              gateway 10.0.1.1
              dns-nameserver 10.0.0.21 10.0.0.22
      # ADMIN_LAN
      auto ens4
      iface ens4 inet static
              address 10.0.33.110
              netmask 255.255.224.0
              gateway 10.0.32.2
              dns-nameserers 10.0.0.21 10.0.0.22
      
      

      I have ens5-ens9 still set to dhcp till I figure out what's going on.

      The interesting thing is that the static IP will work just fine after I reboot. I can ping 10.0.33.110 from my laptop just fine, but restarting the service will always fail. I feel like this is going to be an issue later on and would like to fix it, even if it's technically working.

      1 Reply Last reply Reply Quote 0
      • M
        Markferron
        last edited by

        Oh and the error hah...

        itdept@IT-DHCP:~$ 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 Tue 2018-10-23 14:33:55 EDT; 8min ago
             Docs: man:interfaces(5)
          Process: 2227 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
          Process: 2221 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=exited
         Main PID: 2227 (code=exited, status=1/FAILURE)
        
        Oct 23 14:33:55 IT-DHCP systemd[1]: Starting Raise network interfaces...
        Oct 23 14:33:55 IT-DHCP ifup[2227]: RTNETLINK answers: File exists
        Oct 23 14:33:55 IT-DHCP ifup[2227]: Failed to bring up ens4.
        Oct 23 14:33:55 IT-DHCP systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
        Oct 23 14:33:55 IT-DHCP systemd[1]: Failed to start Raise network interfaces.
        Oct 23 14:33:55 IT-DHCP systemd[1]: networking.service: Unit entered failed state.
        Oct 23 14:33:55 IT-DHCP systemd[1]: networking.service: Failed with result 'exit-code'.
        lines 1-17/17 (END)
        
        
        1 Reply Last reply Reply Quote 0
        • scottalanmillerS
          scottalanmiller
          last edited by

          What does ...

          sudo ifup -v ens4
          

          ... produce as output?

          M 1 Reply Last reply Reply Quote 0
          • M
            Markferron @scottalanmiller
            last edited by

            @scottalanmiller

            itdept@IT-DHCP:~$ sudo ifup -v ens4
            Configuring interface ens4=ens4 (inet)
            /bin/run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
            run-parts: executing /etc/network/if-pre-up.d/ethtool
            run-parts: executing /etc/network/if-pre-up.d/ifenslave
            + [ inet = meta ]
            + IF_BOND_SLAVES=
            + [  ]
            + [  ]
            + [ -z  ]
            + exit
            run-parts: executing /etc/network/if-pre-up.d/vlan
            /bin/ip addr add 10.0.33.110/255.255.224.0 broadcast 10.0.63.255          dev en
            RTNETLINK answers: File exists
            Failed to bring up ens4.
            itdept@IT-DHCP:~$
            
            
            1 Reply Last reply Reply Quote 0
            • scottalanmillerS
              scottalanmiller
              last edited by

              @Markferron said in Restarting networking service fails - Ubuntu 16.04:

              RTNETLINK answers: File exists

              Are you perhaps running Network Manager on there?

              1 Reply Last reply Reply Quote 0
              • scottalanmillerS
                scottalanmiller
                last edited by

                Try...

                sudo ifdown ens4
                sudo ifup -v ens4
                
                M 1 Reply Last reply Reply Quote 0
                • black3dynamiteB
                  black3dynamite
                  last edited by

                  sudo systemctl restart NetworkManager.service

                  1 Reply Last reply Reply Quote 0
                  • black3dynamiteB
                    black3dynamite
                    last edited by black3dynamite

                    You misspelled dns-nameserver

                    M 1 Reply Last reply Reply Quote 1
                    • M
                      Markferron @scottalanmiller
                      last edited by

                      @scottalanmiller
                      I think it worked...at least I don't see angry red text or the word fail anywhere...

                      itdept@IT-DHCP:~$ sudo ifdown ens4
                      itdept@IT-DHCP:~$ sudo ifup -v ens4
                      Configuring interface ens4=ens4 (inet)
                      /bin/run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
                      run-parts: executing /etc/network/if-pre-up.d/ethtool
                      run-parts: executing /etc/network/if-pre-up.d/ifenslave
                      + [ inet = meta ]
                      + IF_BOND_SLAVES=
                      + [  ]
                      + [  ]
                      + [ -z  ]
                      + exit
                      run-parts: executing /etc/network/if-pre-up.d/vlan
                      /bin/ip addr add 10.0.33.110/255.255.224.0 broadcast 10.0.63.255          dev en                                                                                        s4 label ens4
                      /bin/ip link set dev ens4   up
                       /bin/ip route add default via 10.0.32.2  dev ens4 onlink
                      /bin/run-parts --exit-on-error --verbose /etc/network/if-up.d
                      run-parts: executing /etc/network/if-up.d/000resolvconf
                      run-parts: executing /etc/network/if-up.d/ethtool
                      run-parts: executing /etc/network/if-up.d/ifenslave
                      + [ inet = meta ]
                      + [  ]
                      run-parts: executing /etc/network/if-up.d/ip
                      run-parts: executing /etc/network/if-up.d/openssh-server
                      run-parts: executing /etc/network/if-up.d/upstart
                      run-parts: executing /e
                      
                      1 Reply Last reply Reply Quote 0
                      • M
                        Markferron @black3dynamite
                        last edited by

                        @black3dynamite Yikes that's embarrassing...thank you.

                        1 Reply Last reply Reply Quote 1
                        • dafyreD
                          dafyre
                          last edited by

                          @Markferron -- the little things that will come back and bite you.

                          M 1 Reply Last reply Reply Quote 1
                          • M
                            Markferron @dafyre
                            last edited by

                            @dafyre said in Restarting networking service fails - Ubuntu 16.04:

                            @Markferron -- the little things that will come back and bite you.

                            You've dealt with me too much. It's too easy for you.

                            dafyreD 1 Reply Last reply Reply Quote 0
                            • dafyreD
                              dafyre @Markferron
                              last edited by

                              @Markferron said in Restarting networking service fails - Ubuntu 16.04:

                              @dafyre said in Restarting networking service fails - Ubuntu 16.04:

                              @Markferron -- the little things that will come back and bite you.

                              You've dealt with me too much. It's too easy for you.

                              Not so much that, as I've been bitten in my (*@)&#$ more times than I care to count.

                              scottalanmillerS 1 Reply Last reply Reply Quote 2
                              • scottalanmillerS
                                scottalanmiller @dafyre
                                last edited by

                                @dafyre said in Restarting networking service fails - Ubuntu 16.04:

                                @Markferron said in Restarting networking service fails - Ubuntu 16.04:

                                @dafyre said in Restarting networking service fails - Ubuntu 16.04:

                                @Markferron -- the little things that will come back and bite you.

                                You've dealt with me too much. It's too easy for you.

                                Not so much that, as I've been bitten in my (*@)&#$ more times than I care to count.

                                Mark, stop biting him!

                                1 Reply Last reply Reply Quote 2
                                • DustinB3403D
                                  DustinB3403
                                  last edited by

                                  Okay I'll bite, why the hell are you deploying 16.04?!

                                  M 1 Reply Last reply Reply Quote 0
                                  • M
                                    Markferron @DustinB3403
                                    last edited by

                                    @DustinB3403 said in Restarting networking service fails - Ubuntu 16.04:

                                    Okay I'll bite, why the hell are you deploying 16.04?!

                                    I'm having issues with 18, and I need to get something up and running quickly. Do plan on moving it to 18 though.

                                    DustinB3403D black3dynamiteB scottalanmillerS 3 Replies Last reply Reply Quote 0
                                    • DustinB3403D
                                      DustinB3403 @Markferron
                                      last edited by

                                      @markferron wouldn't the fix here be to fix the issue in 18?

                                      M 1 Reply Last reply Reply Quote 0
                                      • M
                                        Markferron @DustinB3403
                                        last edited by

                                        @DustinB3403
                                        Hah, probably. Figured this would be the quicker route.

                                        scottalanmillerS 1 Reply Last reply Reply Quote 0
                                        • black3dynamiteB
                                          black3dynamite @Markferron
                                          last edited by black3dynamite

                                          @Markferron said in Restarting networking service fails - Ubuntu 16.04:

                                          @DustinB3403 said in Restarting networking service fails - Ubuntu 16.04:

                                          Okay I'll bite, why the hell are you deploying 16.04?!

                                          I'm having issues with 18, and I need to get something up and running quickly. Do plan on moving it to 18 though.

                                          Network works a little different with 18.04 and up. Netplan is how you manage your network configuration.
                                          https://netplan.io/

                                          1 Reply Last reply Reply Quote 0
                                          • scottalanmillerS
                                            scottalanmiller @Markferron
                                            last edited by

                                            @Markferron said in Restarting networking service fails - Ubuntu 16.04:

                                            @DustinB3403 said in Restarting networking service fails - Ubuntu 16.04:

                                            Okay I'll bite, why the hell are you deploying 16.04?!

                                            I'm having issues with 18, and I need to get something up and running quickly. Do plan on moving it to 18 though.

                                            You had issues on 16.04, too.

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post