Operating System : Ubuntu Linux Xenial Xerus (16.04)
Cannot Automatically Start NetworkManager
Problem :
After shutting down a workstation installed with Ubuntu 16.04 and starting it up again, there is an important feature which cannot be started. It is shown in the following image :
The Network Manager is not automatically started or enabled so the workstation cannot be used to connect to any network especially internet.
Solution :
To be able to connect to any network especially internet using this workstation there are some steps which is needed to be executed :
- Start the Network Manager service using the following command. Just type the command in the command prompt :
service NetworkManager start
It can be viewed in the real situation as shown below :
root@hostname:~# service NetworkManager start root@hostname:~#
- Check the service’s status by typing the following command :
service NetworkManager status
This is the output of the real situation by executing the above command :
root@hostname:~# service NetworkManager status ◠NetworkManager.service - Network Manager Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2016-08-17 09:20:33 WIB; 3s ago Main PID: 4760 (NetworkManager) Tasks: 24 Memory: 14.0M CPU: 2.398s CGroup: /system.slice/NetworkManager.service ├─4760 /usr/sbin/NetworkManager --no-daemon ├─4864 /sbin/dhclient -d -q -sf /usr/lib/NetworkManager/nm-dhcp-helper -pf /var/run/dhclient-eth0.pid -lf /var/lib/NetworkMan ├─5028 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/var/run/NetworkManager/dns ├─5030 sh -c /sbin/resolvconf -a NetworkManager ├─5034 run-parts --arg=-a --arg=NetworkManager /etc/resolvconf/update.d ├─5066 run-parts /etc/resolvconf/update-libc.d ├─5209 /bin/sh -e /etc/resolvconf/update-libc.d/postfix ├─5210 /bin/sh -e /etc/init.d/postfix status └─5220 /bin/systemctl --no-pager status postfix.service Aug 17 09:20:36 hostname NetworkManager[4760]: <info> [1471400436.3457] manager: NetworkManager state is now CONNECTED_GLOBAL Aug 17 09:20:36 hostname NetworkManager[4760]: <info> [1471400436.3459] policy: set 'Wired connection 1' (eth0) as default for IPv4 r Aug 17 09:20:36 hostname NetworkManager[4760]: <info> [1471400436.3460] DNS: starting dnsmasq... Aug 17 09:20:36 hostname dhclient[4864]: bound to 192.168.1.135 -- renewal in 35549 seconds. Aug 17 09:20:36 hostname NetworkManager[4760]: <warn> [1471400436.3487] dnsmasq[0xd2a840]: dnsmasq not found on the bus. The nameserv Aug 17 09:20:36 hostname NetworkManager[4760]: <info> [1471400436.3488] dns-mgr: Writing DNS information to /sbin/resolvconf Aug 17 09:20:36 hostname dnsmasq[5028]: started, version 2.75 cache disabled Aug 17 09:20:36 hostname dnsmasq[5028]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset au Aug 17 09:20:36 hostname dnsmasq[5028]: DBus support enabled: connected to system bus Aug 17 09:20:36 hostname dnsmasq[5028]: warning: no upstream servers configured lines 1-28...skipping... ◠NetworkManager.service - Network Manager Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2016-08-17 09:20:33 WIB; 3s ago Main PID: 4760 (NetworkManager) Tasks: 24 Memory: 14.0M CPU: 2.398s CGroup: /system.slice/NetworkManager.service ├─4760 /usr/sbin/NetworkManager --no-daemon ├─4864 /sbin/dhclient -d -q -sf /usr/lib/NetworkManager/nm-dhcp-helper -pf /var/run/dhclient-eth0.pid -lf /var/lib/NetworkManager/dhclient-52c3e82e-b642-468f-a5b1-d52715e65004-eth0.lease -cf / ├─5028 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/var/run/NetworkManager/dnsmasq.pid --listen-address=127.0.1.1 --cache-size=0 --proxy-dnssec - ├─5030 sh -c /sbin/resolvconf -a NetworkManager ├─5034 run-parts --arg=-a --arg=NetworkManager /etc/resolvconf/update.d ├─5066 run-parts /etc/resolvconf/update-libc.d ├─5209 /bin/sh -e /etc/resolvconf/update-libc.d/postfix ├─5210 /bin/sh -e /etc/init.d/postfix status └─5220 /bin/systemctl --no-pager status postfix.service Aug 17 09:20:36 hostname NetworkManager[4760]: <info> [1471400436.3457] manager: NetworkManager state is now CONNECTED_GLOBAL Aug 17 09:20:36 hostname NetworkManager[4760]: <info> [1471400436.3459] policy: set 'Wired connection 1' (eth0) as default for IPv4 routing and DNS Aug 17 09:20:36 hostname NetworkManager[4760]: <info> [1471400436.3460] DNS: starting dnsmasq... Aug 17 09:20:36 hostname dhclient[4864]: bound to 192.168.1.135 -- renewal in 35549 seconds. Aug 17 09:20:36 hostname NetworkManager[4760]: <warn> [1471400436.3487] dnsmasq[0xd2a840]: dnsmasq not found on the bus. The nameserver update will be sent when dnsmasq appears Aug 17 09:20:36 hostname NetworkManager[4760]: <info> [1471400436.3488] dns-mgr: Writing DNS information to /sbin/resolvconf Aug 17 09:20:36 hostname dnsmasq[5028]: started, version 2.75 cache disabled Aug 17 09:20:36 hostname dnsmasq[5028]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify Aug 17 09:20:36 hostname dnsmasq[5028]: DBus support enabled: connected to system bus Aug 17 09:20:36 hostname dnsmasq[5028]: warning: no upstream servers configured
- The last step is to make sure that whenever the workstation reboot or powered down, the NetworkManager service is automatically enabled or started when booting up. It is being done with the following command :
update-rc.d network-manager defaults
It is displayed as shown below :
root@hostname:~# update-rc.d NetworkManager defaults update-rc.d: error: initscript does not exist: /etc/init.d/NetworkManager
We cannot use the NetworkManager as the service name but we just have to type the init script which is associated with the NetworkManager service :
root@hostname:~# update-rc.d network-manager defaults insserv: warning: script 'K01alfresco' missing LSB tags and overrides insserv: warning: script 'alfresco' missing LSB tags and overrides insserv: Script nagios is broken: incomplete LSB comment. insserv: missing `Default-Start:' entry: please add even if empty. insserv: missing `Default-Stop:' entry: please add even if empty. insserv: Default-Start undefined, assuming empty start runlevel(s) for script `nagios' insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `nagios' root@hostname:~#
- Try to power off and boot up your workstation again. See if the problem exists. In my case, it is perfectly solved. The NetworkManager service is automatically enabled and started.
One thought on “Cannot Automatically start NetworkManager in Ubuntu 16.04”