NetworkManager signals global connectivity even when DNS is not yet ready
- From: Marcel Dopita <m rcel cz>
- To: networkmanager-list gnome org
- Subject: NetworkManager signals global connectivity even when DNS is not yet ready
- Date: Wed, 04 Jun 2014 01:27:59 +0200
Hello,
When trying to setup my desktop environment (Arch Linux & XFCE) I also
enabled Pidgin (IM client) to launch in XFCE session. I noticed that
Pidgin doesn't connect immediately after boot but it works either by
manually forcing it to reconnect or waiting 30-45 seconds for next
reconnect.
I started debugging the issue and found that Pidgin is starting
connection attempts based on event from NetworkManager:
(00:09:44) network: Got StateChange from NetworkManager: 70.
I understand that 70 is state "NM_STATE_CONNECTED_GLOBAL" - the global
network connectivity. I'm no C developer but I added some addition debug
info to find out that it fails when calling function getaddrinfo() (and
maybe some other) which returns -2 (meaning "NAME or SERVICE is
unknown.")
When I put there quick and dirty calls to 'dig' (making A/SRV or any
other requests), it just fails as well after few seconds with
"connection timed out; no servers could be reached". However if I
specify nameserver in the dig call (@x.x.y.y) it works just fine.
As my last test I tried to cat the /etc/resolv.conf file - and indeed,
nameservers were not there yet.
$ cat /etc/resolv.conf
# Generated by NetworkManager
$ stat /etc/resolv.conf
File: '/etc/resolv.conf'
Size: 30 Blocks: 8 IO Block: 4096 regular file
Device: 802h/2050d Inode: 3285669 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/
root)
Access: 2014-06-04 00:09:42.243614494 +0200
Modify: 2014-06-04 00:09:18.811462566 +0200
Change: 2014-06-04 00:09:18.811462566 +0200
*I rebooted system at 00:09:19
Nameservers do appears after a short while (I did not test if it's
couple of ms or s) and point to my router (192.168.1.1). I'm using DHCP,
IPv4 (and also IPv6 but I enabled it just recently and doesn't seem to
be the cause). I also switched between two routers and this probably
isn't the cause.
I use NetworkManager 0.9.8.10-1 on Arch Linux. My desktop pc is still
quite fast (CPU i7 3770k, SSD, 32 GB RAM, UEFI) so could that be some
bug influenced by this? That reminds me that I could attempt to
duplicate on my way slower laptop.
Is this something NetworkManager should take care of? Is there anything
else I could try? (I will report it to the bug tracker if it's a bug.)
PS: I just see it in the log - "NetworkManager state is now
CONNECTED_GLOBAL" is before "Writing DNS information".
Best regards,
Marcel
LOG:
čen 04 00:09:42 p8z77 NetworkManager[321]: <info> (eno1): DHCPv4 state
changed preinit -> (null)
čen 04 00:09:43 p8z77 dhcpcd[462]: eno1: leased 192.168.1.100 for 86400
seconds
čen 04 00:09:43 p8z77 dhcpcd[462]: eno1: adding route to 192.168.1.0/24
čen 04 00:09:43 p8z77 NetworkManager[321]: <info> (eno1): DHCPv4 state
changed (null) -> bound
čen 04 00:09:43 p8z77 NetworkManager[321]: <info> address
192.168.1.100
čen 04 00:09:43 p8z77 NetworkManager[321]: <info> prefix 24
(255.255.255.0)
čen 04 00:09:43 p8z77 NetworkManager[321]: <info> gateway 192.168.1.1
čen 04 00:09:43 p8z77 NetworkManager[321]: <info> hostname 'p8z77'
čen 04 00:09:43 p8z77 NetworkManager[321]: <info> nameserver
'192.168.1.1'
čen 04 00:09:43 p8z77 NetworkManager[321]: <info> Activation (eno1)
Stage 5 of 5 (IPv4 Configure Commit) scheduled...
čen 04 00:09:43 p8z77 NetworkManager[321]: <info> Activation (eno1)
Stage 5 of 5 (IPv4 Commit) started...
čen 04 00:09:44 p8z77 dhcpcd[462]: eno1: removing route to
192.168.1.0/24
čen 04 00:09:44 p8z77 NetworkManager[321]: <info> (eno1): device state
change: ip-config -> secondaries (reason 'none') [70 90 0]
čen 04 00:09:44 p8z77 NetworkManager[321]: <info> Activation (eno1)
Stage 5 of 5 (IPv4 Commit) complete.
čen 04 00:09:44 p8z77 NetworkManager[321]: <info> (eno1): device state
change: secondaries -> activated (reason 'none') [90 100 0]
čen 04 00:09:44 p8z77 NetworkManager[321]: <info> NetworkManager state
is now CONNECTED_GLOBAL
čen 04 00:09:44 p8z77 NetworkManager[321]: <info> Policy set 'Wired
connection 1' (eno1) as default for IPv4 routing and DNS.
čen 04 00:09:44 p8z77 NetworkManager[321]: <info> Policy set 'Wired
connection 1' (eno1) as default for IPv6 routing and DNS.
čen 04 00:09:44 p8z77 NetworkManager[321]: <info> Writing DNS
information to /usr/bin/resolvconf
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]