2014-04-09 1:21 GMT+02:00 Kyle Terrien <kyleterrien@xxxxxxxxx>: > On 04/08/2014 04:31 AM, Maykel Franco wrote: >> Hi, I change for example dns in networkmanager, when restart >> NetworkManager , "systemctl restart NetworkManager" the network not >> works... >> >> ... >> >> I have reboot my computer for network on again. >> >> Is a bug networkmanager? >> >> The version is: >> >> maykel-arch /home/maykel # NetworkManager --version >> 0.9.8.8 >> >> Thanks in advanced. >> > > Network goes down because NetworkManager leaves dhcpcd running. In fact > my network remains up after running "systemctl stop > NetworkManager.service" because dhcpcd is left managing enp0s25. > > If NetworkManager sees dhcpcd managing an interface when NetworkManager > starts up, NetworkManager does funny things. > > So, why does "systemctl stop NetworkManager.service" leave dhcpcd > running? > > The workaround: > > sudo systemctl stop NetworkManager.service > sudo killall dhcpcd > sudo systemctl start NetworkManager.service > > Here is a shell session where I (effectively) do the above: > > kyle@landru ~ $ sudo systemctl stop NetworkManager.service > [sudo] password for kyle: > kyle@landru ~ $ systemctl status NetworkManager.service > ● NetworkManager.service - Network Manager > Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled) > Active: inactive (dead) since Tue 2014-04-08 15:41:08 PDT; 8s ago > Process: 2792 ExecStart=/usr/bin/NetworkManager --no-daemon (code=exited, > status=0/SUCCESS) > Main PID: 2792 (code=exited, status=0/SUCCESS) > > Apr 08 15:14:14 landru NetworkManager[2792]: <info> Activation (enp0s25) suc.... > Apr 08 15:14:21 landru dhcpcd[2822]: enp0s25: no IPv6 Routers available > Apr 08 15:14:29 landru NetworkManager[2792]: <info> (enp0s25): IP6 addrconf .... > Apr 08 15:14:29 landru NetworkManager[2792]: <info> Activation (enp0s25) Sta.... > Apr 08 15:14:29 landru NetworkManager[2792]: <info> Activation (enp0s25) Sta.... > Apr 08 15:14:29 landru NetworkManager[2792]: <info> Activation (enp0s25) Sta.... > Apr 08 15:41:08 landru systemd[1]: Stopping Network Manager... > Apr 08 15:41:08 landru NetworkManager[2792]: <info> caught signal 15, shutti.... > Apr 08 15:41:08 landru NetworkManager[2792]: <info> Writing DNS information ...f > Apr 08 15:41:08 landru systemd[1]: Stopped Network Manager. > Hint: Some lines were ellipsized, use -l to show in full. > kyle@landru ~ $ systemctl status | grep -A 1 NetworkManager.service > │ │ └─3623 grep --color=auto -A 1 NetworkManager.service > │ └─user@2290.service > -- > ├─NetworkManager.service > │ └─2822 /usr/bin/dhcpcd -B -K -L -G -c > /usr/lib/networkmanager/nm-dhcp-client.action enp0s25 > kyle@landru ~ $ sudo kill 2822 > kyle@landru ~ $ systemctl status | grep -A 1 NetworkManager.service > │ │ └─3631 grep --color=auto -A 1 NetworkManager.service > │ └─user@2290.service > kyle@landru ~ $ systemctl status NetworkManager.service > ● NetworkManager.service - Network Manager > Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled) > Active: inactive (dead) since Tue 2014-04-08 15:41:08 PDT; 4min 25s ago > Process: 2792 ExecStart=/usr/bin/NetworkManager --no-daemon (code=exited, > status=0/SUCCESS) > Main PID: 2792 (code=exited, status=0/SUCCESS) > > Apr 08 15:14:29 landru NetworkManager[2792]: <info> (enp0s25): IP6 addrconf .... > Apr 08 15:14:29 landru NetworkManager[2792]: <info> Activation (enp0s25) Sta.... > Apr 08 15:14:29 landru NetworkManager[2792]: <info> Activation (enp0s25) Sta.... > Apr 08 15:14:29 landru NetworkManager[2792]: <info> Activation (enp0s25) Sta.... > Apr 08 15:41:08 landru systemd[1]: Stopping Network Manager... > Apr 08 15:41:08 landru NetworkManager[2792]: <info> caught signal 15, shutti.... > Apr 08 15:41:08 landru NetworkManager[2792]: <info> Writing DNS information ...f > Apr 08 15:41:08 landru systemd[1]: Stopped Network Manager. > Apr 08 15:43:59 landru dhcpcd[2822]: received signal TERM from PID 3626, st...ng > Apr 08 15:43:59 landru dhcpcd[2822]: enp0s25: removing interface > Hint: Some lines were ellipsized, use -l to show in full. > kyle@landru ~ $ sudo systemctl start NetworkManager.service > kyle@landru ~ $ > > --Kyle > Thanks for all. You're right. When stop NetworkManager, leave dhcpcd running: maykel-arch /home/maykel/ :( # systemctl stop NetworkManager maykel-arch /home/maykel/ # ps aux | grep dhcpcd root 8465 0.0 0.0 8648 1012 ? S 10:14 0:00 /usr/bin/dhcpcd -B -K -L -G -c /usr/lib/networkmanager/nm-dhcp-client.action enp4s0f2 root 8562 0.0 0.0 10924 1100 pts/1 S+ 10:17 0:00 grep --color=auto dhcpcd All ok and it works but...Why in Debian, Ubuntu, Opensuse, for example, when restart the networkma nager, I do not need to kill the process networkmanager. Smooth network is well restart. Thanks for all.