You are not logged in.

#1 2011-09-01 09:17:06

gphilip
Member
Registered: 2011-09-01
Posts: 7

[SOLVED] NetworkManager does not start dhcpcd

I installed Arch Linux for the first time a couple of days back on my laptop, and am currently in the process of adding various facilities which I need.

I am connected to the internet  by a wired connection (eth0). Today I tried adding dnsmasq for its DNS cache facility (and also to set up internet sharing later). At some point during this process, the nm-applet icon developed a "cross", indicating "No network connection". Further, I lost my internet connection  as well (I noticed both of these when I tried to google something later).

Left-clicking on the nm-applet icon showed : "Wired network : disconnected". Clicking on the name of the wired network resulted in NetworkManager trying to connect ("hourglass"-ish icon) for a long time, but then failing to connect.

I tried restarting (nm-applet, NetworkManager, and then the computer), but that didn't work. After a bit of investigation, I found the following:

1. The eth0 interface was up, but it had no IP address.
2. Running "dhcpcd eth0" worked : eth0 got the correct IP address, and I was able to connect to the internet.
3. Even after eth0 was connected as above, the nm-applet icon said "no network connection".

I am currently browsing in this state : NM thinks eth0 is not connected, but it is connected, and is using an IP address which I got by manually invoking dhcpcd.

I investigated a bit further, and the following seems to be the problem --- NM is not starting dhcpcd by itself:

 
$ ps -aef |grep Net
root      6686     1  0 14:13 ?        00:00:00 /usr/sbin/NetworkManager
user   6887  6777  0 14:35 pts/2    00:00:00 grep Net
$ ps -aef |grep dhc
root      6716     1  0 14:13 ?        00:00:00 dhcpcd eth0
user   6889  6777  0 14:35 pts/2    00:00:00 grep dhc

I seem to remember that NetworkManager was earlier being started with a number of arguments, unlike the first snippet above. Also, googling around for this issue, I found that people usually have the other complaint : that NM starts dhcpcd by itself, and thus goes and overwrites their customized /etc/resolv.conf . This somehow does not seem to happen now for me:

$ cat /etc/resolv.conf 
# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
domain local.lan
nameserver 192.168.1.1
# /etc/resolv.conf.tail can replace this line

To summarize, my problem is that the NetworkManager instance started on system startup does not invoke dhcpcd. As a result, when I log in there is no internet available by my wired connection.

Could you help me with troubleshooting this?

Thanks,
Philip

Last edited by gphilip (2011-09-02 15:52:21)

Offline

#2 2011-09-01 10:09:21

cbowman57
Member
Registered: 2011-08-21
Posts: 77

Re: [SOLVED] NetworkManager does not start dhcpcd

Try adding this to /etc/rc.local

dhcpcd -k eth0 
dhcpcd -nd eth0

Make you you make the appropriate change if you're on something other than eth0

(That's straight from the wiki BTW)

Last edited by cbowman57 (2011-09-01 10:09:56)

Offline

#3 2011-09-01 16:04:28

gphilip
Member
Registered: 2011-09-01
Posts: 7

Re: [SOLVED] NetworkManager does not start dhcpcd

@cbowman57 :

Thank you, that workaround partially fixed my problem : I can now connect to the internet via eth0 after rebooting, without having to manually run dhcpcd eth0.

However, NetworkManager still does not recognize the connection : It says the wired network is disconnected, and does not show eth0 as an option either.

Thanks again for your help.

Offline

#4 2011-09-01 16:12:44

cbowman57
Member
Registered: 2011-08-21
Posts: 77

Re: [SOLVED] NetworkManager does not start dhcpcd

Ok, you're running networkmanager 0.9.0-1?  What networkmanager-dispatcher are you running, and it's version?

Offline

#5 2011-09-01 18:15:04

gphilip
Member
Registered: 2011-09-01
Posts: 7

Re: [SOLVED] NetworkManager does not start dhcpcd

Yes, I am running networkmanager 0.9.0-1 .

I am not running networkmanager-dispatcher :

$ pacman -Q networkmanager 
networkmanager 0.9.0-1
$ pacman -Q networkmanager-dispatcher
error: package "networkmanager-dispatcher" not found

Should I be running this as well?

There does not seem to be a networkmanager-dispatcher available in the repostories which I use. There are some variants, though:

# pacman -S network <TAB><TAB>
networkmanager                      networkmanager-dispatcher-sshd
network-manager-applet              networkmanager-openconnect
networkmanager-dispatcher-netfs     networkmanager-openvpn
networkmanager-dispatcher-ntpd      networkmanager-pptp
networkmanager-dispatcher-openntpd  networkmanager-vpnc
# pacman -S networkmanager-dispatcher
error: target not found: networkmanager-dispatcher

Last edited by gphilip (2011-09-01 18:17:59)

Offline

#6 2011-09-01 18:23:46

cbowman57
Member
Registered: 2011-08-21
Posts: 77

Re: [SOLVED] NetworkManager does not start dhcpcd

Really not certain, I've got networkmanager-dispatcher-ntpd but pretty sure that's just network time protocol.  I don't use wireless so can't verify anything regarding that.  What happens if you execute network-admin or nm-connection-editor from the command line?

Offline

#7 2011-09-01 18:31:03

gphilip
Member
Registered: 2011-09-01
Posts: 7

Re: [SOLVED] NetworkManager does not start dhcpcd

network-admin gives "Command not found".

nm-connection-editor opens the NM connection editor (which I can also open by right-clicking on the NM applet). There are no wired connections listed there, which is a bit weird since I am typing this over eth0.

Offline

#8 2011-09-01 18:36:43

cbowman57
Member
Registered: 2011-08-21
Posts: 77

Re: [SOLVED] NetworkManager does not start dhcpcd

Hmm.. network-admin must be part of another package, it doesn't come up in a query.  Not sure if that's part of the missing link or not.

$ pacman -Qs network
local/glib-networking 2.28.7-4
    Network-related giomodules for glib
local/gnome-nettool 3.0.0-1 (gnome-extra)
    A Collection of GNOME3 Networking Tools.
local/krb5 1.9.1-3
    The Kerberos network authentication system
local/mobile-broadband-provider-info 20110511-1
    Network Management daemon
local/networkmanager 0.9.0-1
    Network Management daemon
local/network-manager-applet 0.9.0-1
    GNOME frontends to NetWorkmanager
local/networkmanager-dispatcher-ntpd 1.0-1
    Dispatcher Script for ntpd
local/nss 3.12.11-3
    Mozilla Network Security Services
local/ntp 4.2.6.p3-3
    NTP (Network Time Protocol) tries to keep servers in sync
local/ppp 2.4.5-2 (base)
    A daemon which implements the Point-to-Point Protocol for dial-up networking
local/syslog-ng 3.2.4-3 (base)
    Next-generation syslogd with advanced networking and filtering capabilities
local/wget 1.13.1-1 (base)
    A network utility to retrieve files from the Web
local/wpa_supplicant 0.7.3-3 (base)
    A utility providing key negotiation for WPA wireless networks

This is everything I have installed with "network" in it & everything seems to work as it should.

Last edited by cbowman57 (2011-09-01 18:43:21)

Offline

#9 2011-09-02 15:51:27

gphilip
Member
Registered: 2011-09-01
Posts: 7

Re: [SOLVED] NetworkManager does not start dhcpcd

In the end the fix turned out to be something quite silly!

Inspired by this post on the Ubuntu help forums, I went and created a new eth0 connection (this was missing during the time when I had this problem), and now everything works fine : NM identifies the connection, starts dhcpcd on eth0 at boot time with all the wierd parameters, and merrily overwrites my /etc/resolv.conf :

ps -aef |grep dhc
root       958   840  0 21:10 ?        00:00:00 /sbin/dhcpcd -B -K -L -G -c /usr/lib/networkmanager/nm-dhcp-client.action eth0
user   1873  1686  0 21:18 pts/0    00:00:00 grep dhc
$ cat /etc/resolv.conf 
# Generated by NetworkManager
domain local.lan
search local.lan
nameserver 192.168.1.1

Thanks for all the help! cool

Offline

#10 2011-09-02 15:53:39

cbowman57
Member
Registered: 2011-08-21
Posts: 77

Re: [SOLVED] NetworkManager does not start dhcpcd

Glad you found the solution and let us know what it was.

Seems like no matter what the solution is we always feel silly after the fact. smile

Offline

#11 2013-06-25 06:40:41

Cadeyrn
Member
Registered: 2013-04-06
Posts: 170

Re: [SOLVED] NetworkManager does not start dhcpcd

Could you explain the process you went through to accomplish that? I have the same problem, and I'm Googling "linux make new network interface". I'm not finding anything about actually making a new interface, and I'm afraid of borking my internet if I try.

At first I thought you meant making a new connection within the NM applet's configuration, but that didn't fix it for me.

Last edited by Cadeyrn (2013-06-25 06:42:23)

Offline

#12 2013-06-25 12:41:28

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [SOLVED] NetworkManager does not start dhcpcd

Cadeyrn, please start a new thread. This thread is old and the situation may have changed. Furthermore, the other participants have not been around in a long time. See also, Forum Etiquette: Old Threads / Necro-Bumping. Good luck.
Closing.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

Board footer

Powered by FluxBB