NetworkManager reports disconnect/reconnect many times a day

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

NetworkManager reports disconnect/reconnect many times a day

Paul Smith-2
I am seeing a behavior of NetworkManager where it reports that it is
disconnecting for a few seconds then reconnecting, multiple times a day
(once every few hours).  However, it's not ACTUALLY disconnected.

I'm using Ubuntu 20.04.

I have a WIRED connection; this is not wifi.

My little LAN icon on the control panel goes to a "?" then comes back,
and my Spotify app goes dim then comes back.

I do a lot of remote work, including a VPN and SSH to remote systems,
and at no time do I notice any lag in typing etc. even when the above
happens.  So, in some ways this is not a real problem (and in fact I've
lived with it for quite a while).

But, a bunch of our wireless devices DO lose connection multiple times
a day although I can't say if it's the same times or not.  I don't know
if this is related: it obviously could be completely different things
but I thought I'd start with the simpler-to-debug problem.

I enabled DEBUG logging for NetworkManager and whenever this happens I
get output like this in journalctl:

Dec 05 05:55:01 NetworkManager[968]: <debug> [1607165701.8724] connectivity: (enx106530e29458,IPv4,38386) start request to 'http://connectivity-check.ubuntu.com/' (try resolving 'connectivity-check.ubuntu.com' using systemd-resolved)
Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.7958] connectivity: (enx106530e29458,IPv4,38386) check completed: LIMITED; timeout
Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.7959] device[7d9e8e19a7fc97e0] (enx106530e29458): connectivity state changed from FULL to LIMITED
Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.7963] manager: connectivity checking indicates LIMITED
Dec 05 05:55:21 NetworkManager[968]: <info>  [1607165721.7964] manager: NetworkManager state is now CONNECTED_SITE
Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.7974] dispatcher: (760) dispatching action 'connectivity-change'
Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.7980] device[7d9e8e19a7fc97e0] (enx106530e29458): ip4-config: update (commit=1, new-config=0x55e94d2649c0)

then there's a bunch of debug about state change then I see:

Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.8005] dns-mgr: (device_ip_config_changed): no DNS changes to commit (0)
Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.8006] connectivity: (enx106530e29458,IPv4,38393) start request to 'http://connectivity-check.ubuntu.com/' (try resolving 'connectivity-check.ubuntu.com' using systemd-resolved)
Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.8007] device[7d9e8e19a7fc97e0] (enx106530e29458): ip4-config: update (commit=0, new-config=0x55e94d2649c0)
Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.8294] dispatcher: (760) /etc/NetworkManager/dispatcher.d/01-ifupdown succeeded
Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.8294] dispatcher: (760) /etc/NetworkManager/dispatcher.d/99-disable-wireless-when-wired succeeded
Dec 05 05:55:22 NetworkManager[968]: <debug> [1607165722.7972] connectivity: (enx106530e29458,IPv4,38394) start request to 'http://connectivity-check.ubuntu.com/' (try resolving 'connectivity-check.ubuntu.com' using systemd-resolved)
Dec 05 05:55:23 NetworkManager[968]: <debug> [1607165723.1788] connectivity: (enx106530e29458,IPv4,38394) check completed: FULL; status header found
Dec 05 05:55:23 NetworkManager[968]: <debug> [1607165723.1789] device[7d9e8e19a7fc97e0] (enx106530e29458): connectivity state changed from LIMITED to FULL
Dec 05 05:55:23 NetworkManager[968]: <debug> [1607165723.1791] manager: connectivity checking indicates FULL
Dec 05 05:55:23 NetworkManager[968]: <info>  [1607165723.1791] manager: NetworkManager state is now CONNECTED_GLOBAL
Dec 05 05:55:23 NetworkManager[968]: <debug> [1607165723.1796] dispatcher: (761) dispatching action 'connectivity-change'

and my icon shows connected again.

It looks like checks to connectivity-check.ubuntu.com sometimes fail.
 I don't know if that's because my network is not allowing new
connections or something weird like that (as I said I haven't noticed
any hangs while typing in remote sessions), or if there's a DNS issue,
or if this Ubuntu server is too busy and doesn't always respond, or
what it is.

Has anyone else noticed this?  If you run:

  journalct --unit NetworkManager --since yesterday

do you see the CONNECTED_SITE / CONNECTED_GLOBAL messages (these are
the only ones printed at "INFO" level which is the default log level)
appear randomly / not when you expect your network connection to go
down?  If lots of people are seeing it then it's most likely an Ubuntu
server problem.

Does anyone know if there's a way to get more details from
NetworkManager about exactly what kind of failure it detected?  Does
"timedout" mean a 408 timeout?  A 504 timeout?  Something else?


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Bob
Reply | Threaded
Open this post in threaded view
|

Re: NetworkManager reports disconnect/reconnect many times a day

Bob
** Reply to message from Paul Smith <[hidden email]> on Sat, 05 Dec
2020 13:53:05 -0500

> I am seeing a behavior of NetworkManager where it reports that it is
> disconnecting for a few seconds then reconnecting, multiple times a day
> (once every few hours).  However, it's not ACTUALLY disconnected.
>
> I'm using Ubuntu 20.04.
>
> I have a WIRED connection; this is not wifi.
>
> My little LAN icon on the control panel goes to a "?" then comes back,
> and my Spotify app goes dim then comes back.
>
> I do a lot of remote work, including a VPN and SSH to remote systems,
> and at no time do I notice any lag in typing etc. even when the above
> happens.  So, in some ways this is not a real problem (and in fact I've
> lived with it for quite a while).
>
> But, a bunch of our wireless devices DO lose connection multiple times
> a day although I can't say if it's the same times or not.  I don't know
> if this is related: it obviously could be completely different things
> but I thought I'd start with the simpler-to-debug problem.
>
> I enabled DEBUG logging for NetworkManager and whenever this happens I
> get output like this in journalctl:
>
> Dec 05 05:55:01 NetworkManager[968]: <debug> [1607165701.8724] connectivity:
> (enx106530e29458,IPv4,38386) start request to
> 'http://connectivity-check.ubuntu.com/' (try resolving
> 'connectivity-check.ubuntu.com' using systemd-resolved)
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.7958] connectivity:
> (enx106530e29458,IPv4,38386) check completed: LIMITED; timeout
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.7959]
> device[7d9e8e19a7fc97e0] (enx106530e29458): connectivity state changed from
> FULL to LIMITED
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.7963] manager: connectivity checking indicates LIMITED
> Dec 05 05:55:21 NetworkManager[968]: <info>  [1607165721.7964] manager:
> NetworkManager state is now CONNECTED_SITE
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.7974] dispatcher:
> (760) dispatching action 'connectivity-change'
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.7980]
> device[7d9e8e19a7fc97e0] (enx106530e29458): ip4-config: update (commit=1,
> new-config=0x55e94d2649c0)
>
> then there's a bunch of debug about state change then I see:
>
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.8005] dns-mgr:
> (device_ip_config_changed): no DNS changes to commit (0)
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.8006] connectivity:
> (enx106530e29458,IPv4,38393) start request to
> 'http://connectivity-check.ubuntu.com/' (try resolving
> 'connectivity-check.ubuntu.com' using systemd-resolved)
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.8007]
> device[7d9e8e19a7fc97e0] (enx106530e29458): ip4-config: update (commit=0,
> new-config=0x55e94d2649c0)
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.8294] dispatcher:
> (760) /etc/NetworkManager/dispatcher.d/01-ifupdown succeeded
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.8294] dispatcher:
> (760) /etc/NetworkManager/dispatcher.d/99-disable-wireless-when-wired succeeded
> Dec 05 05:55:22 NetworkManager[968]: <debug> [1607165722.7972] connectivity:
> (enx106530e29458,IPv4,38394) start request to
> 'http://connectivity-check.ubuntu.com/' (try resolving
> 'connectivity-check.ubuntu.com' using systemd-resolved)
> Dec 05 05:55:23 NetworkManager[968]: <debug> [1607165723.1788] connectivity:
> (enx106530e29458,IPv4,38394) check completed: FULL; status header found
> Dec 05 05:55:23 NetworkManager[968]: <debug> [1607165723.1789]
> device[7d9e8e19a7fc97e0] (enx106530e29458): connectivity state changed from
> LIMITED to FULL
> Dec 05 05:55:23 NetworkManager[968]: <debug> [1607165723.1791] manager: connectivity checking indicates FULL
> Dec 05 05:55:23 NetworkManager[968]: <info>  [1607165723.1791] manager:
> NetworkManager state is now CONNECTED_GLOBAL
> Dec 05 05:55:23 NetworkManager[968]: <debug> [1607165723.1796] dispatcher:
> (761) dispatching action 'connectivity-change'
>
> and my icon shows connected again.
>
> It looks like checks to connectivity-check.ubuntu.com sometimes fail.
>  I don't know if that's because my network is not allowing new
> connections or something weird like that (as I said I haven't noticed
> any hangs while typing in remote sessions), or if there's a DNS issue,
> or if this Ubuntu server is too busy and doesn't always respond, or
> what it is.
>
> Has anyone else noticed this?  If you run:
>
>   journalct --unit NetworkManager --since yesterday
>
> do you see the CONNECTED_SITE / CONNECTED_GLOBAL messages (these are
> the only ones printed at "INFO" level which is the default log level)
> appear randomly / not when you expect your network connection to go
> down?  If lots of people are seeing it then it's most likely an Ubuntu
> server problem.
>
> Does anyone know if there's a way to get more details from
> NetworkManager about exactly what kind of failure it detected?  Does
> "timedout" mean a 408 timeout?  A 504 timeout?  Something else?
>


The only network problem I have seen is my email application retrieves email
every 5 minutes and very occassionally it fails to retrieve the email, 5
minutes later it does retrieve the email.

Here is what I see in my journal, shortly followed by the CONNECTED_GLOBAL.
(the computer is powered down at night)

robert@MARS:~$ journalctl --unit NetworkManager --since yesterday | grep
CONNECTED_SITE
Dec 04 08:29:43 MARS NetworkManager[1019]: <info>  [1607099383.1578] manager:
NetworkManager state is now CONNECTED_SITE
Dec 04 08:45:02 MARS NetworkManager[1019]: <info>  [1607100302.9002] manager:
NetworkManager state is now CONNECTED_SITE
Dec 04 08:50:23 MARS NetworkManager[1019]: <info>  [1607100623.9001] manager:
NetworkManager state is now CONNECTED_SITE
Dec 04 09:05:44 MARS NetworkManager[1019]: <info>  [1607101544.9001] manager:
NetworkManager state is now CONNECTED_SITE
Dec 04 18:56:04 MARS NetworkManager[1019]: <info>  [1607136964.8995] manager:
NetworkManager state is now CONNECTED_SITE
Dec 04 21:21:25 MARS NetworkManager[1019]: <info>  [1607145685.9024] manager:
NetworkManager state is now CONNECTED_SITE
Dec 04 23:01:45 MARS NetworkManager[1019]: <info>  [1607151705.8997] manager:
NetworkManager state is now CONNECTED_SITE
Dec 05 07:42:25 MARS NetworkManager[1007]: <info>  [1607182945.6846] manager:
NetworkManager state is now CONNECTED_SITE
Dec 05 09:22:46 MARS NetworkManager[1007]: <info>  [1607188966.6567] manager:
NetworkManager state is now CONNECTED_SITE
Dec 05 09:38:06 MARS NetworkManager[1007]: <info>  [1607189886.6569] manager:
NetworkManager state is now CONNECTED_SITE
Dec 05 10:38:41 MARS NetworkManager[974]: <info>  [1607193521.7140] manager:
NetworkManager state is now CONNECTED_SITE
Dec 05 11:29:02 MARS NetworkManager[974]: <info>  [1607196542.6839] manager:
NetworkManager state is now CONNECTED_SITE

--
Robert Blair


My choices in life were either to be a piano player in a whore house or a politician. And to tell the truth, there's hardly any difference!  -- Harry Truman

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: NetworkManager reports disconnect/reconnect many times a day

Peter Flynn
In reply to this post by Paul Smith-2
On 05/12/2020 18:53, Paul Smith wrote:
> I am seeing a behavior of NetworkManager where it reports that it is
> disconnecting for a few seconds then reconnecting, multiple times a day
> (once every few hours).  However, it's not ACTUALLY disconnected.

I'd be inclined to suspect your modem or router firmware.

I had a very similar problem with my old Virgin hub and when they
replaced it, the problem went away.

It came back when we got a second connection for an additional TV.
Turned out the installer had used a splitter instead of a second sting
in the supply cable.

Peter

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: NetworkManager reports disconnect/reconnect many times a day

ubuntu-users mailing list
In reply to this post by Paul Smith-2
On 12/5/20 12:53 PM, Paul Smith wrote:

> I am seeing a behavior of NetworkManager where it reports that it is
> disconnecting for a few seconds then reconnecting, multiple times a day
> (once every few hours).  However, it's not ACTUALLY disconnected.
>
> I'm using Ubuntu 20.04.
>
> I have a WIRED connection; this is not wifi.
>
> My little LAN icon on the control panel goes to a "?" then comes back,
> and my Spotify app goes dim then comes back.
>
> I do a lot of remote work, including a VPN and SSH to remote systems,
> and at no time do I notice any lag in typing etc. even when the above
> happens.  So, in some ways this is not a real problem (and in fact I've
> lived with it for quite a while).
>
> But, a bunch of our wireless devices DO lose connection multiple times
> a day although I can't say if it's the same times or not.  I don't know
> if this is related: it obviously could be completely different things
> but I thought I'd start with the simpler-to-debug problem.
>
> I enabled DEBUG logging for NetworkManager and whenever this happens I
> get output like this in journalctl:
>
> Dec 05 05:55:01 NetworkManager[968]: <debug> [1607165701.8724] connectivity: (enx106530e29458,IPv4,38386) start request to 'http://connectivity-check.ubuntu.com/' (try resolving 'connectivity-check.ubuntu.com' using systemd-resolved)
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.7958] connectivity: (enx106530e29458,IPv4,38386) check completed: LIMITED; timeout
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.7959] device[7d9e8e19a7fc97e0] (enx106530e29458): connectivity state changed from FULL to LIMITED
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.7963] manager: connectivity checking indicates LIMITED
> Dec 05 05:55:21 NetworkManager[968]: <info>  [1607165721.7964] manager: NetworkManager state is now CONNECTED_SITE
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.7974] dispatcher: (760) dispatching action 'connectivity-change'
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.7980] device[7d9e8e19a7fc97e0] (enx106530e29458): ip4-config: update (commit=1, new-config=0x55e94d2649c0)
>
> then there's a bunch of debug about state change then I see:
>
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.8005] dns-mgr: (device_ip_config_changed): no DNS changes to commit (0)
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.8006] connectivity: (enx106530e29458,IPv4,38393) start request to 'http://connectivity-check.ubuntu.com/' (try resolving 'connectivity-check.ubuntu.com' using systemd-resolved)
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.8007] device[7d9e8e19a7fc97e0] (enx106530e29458): ip4-config: update (commit=0, new-config=0x55e94d2649c0)
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.8294] dispatcher: (760) /etc/NetworkManager/dispatcher.d/01-ifupdown succeeded
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.8294] dispatcher: (760) /etc/NetworkManager/dispatcher.d/99-disable-wireless-when-wired succeeded
> Dec 05 05:55:22 NetworkManager[968]: <debug> [1607165722.7972] connectivity: (enx106530e29458,IPv4,38394) start request to 'http://connectivity-check.ubuntu.com/' (try resolving 'connectivity-check.ubuntu.com' using systemd-resolved)
> Dec 05 05:55:23 NetworkManager[968]: <debug> [1607165723.1788] connectivity: (enx106530e29458,IPv4,38394) check completed: FULL; status header found
> Dec 05 05:55:23 NetworkManager[968]: <debug> [1607165723.1789] device[7d9e8e19a7fc97e0] (enx106530e29458): connectivity state changed from LIMITED to FULL
> Dec 05 05:55:23 NetworkManager[968]: <debug> [1607165723.1791] manager: connectivity checking indicates FULL
> Dec 05 05:55:23 NetworkManager[968]: <info>  [1607165723.1791] manager: NetworkManager state is now CONNECTED_GLOBAL
> Dec 05 05:55:23 NetworkManager[968]: <debug> [1607165723.1796] dispatcher: (761) dispatching action 'connectivity-change'
>
> and my icon shows connected again.
>
> It looks like checks to connectivity-check.ubuntu.com sometimes fail.
>   I don't know if that's because my network is not allowing new
> connections or something weird like that (as I said I haven't noticed
> any hangs while typing in remote sessions), or if there's a DNS issue,
> or if this Ubuntu server is too busy and doesn't always respond, or
> what it is.
>
> Has anyone else noticed this?  If you run:
>
>    journalct --unit NetworkManager --since yesterday
>
> do you see the CONNECTED_SITE / CONNECTED_GLOBAL messages (these are
> the only ones printed at "INFO" level which is the default log level)
> appear randomly / not when you expect your network connection to go
> down?  If lots of people are seeing it then it's most likely an Ubuntu
> server problem.
>
> Does anyone know if there's a way to get more details from
> NetworkManager about exactly what kind of failure it detected?  Does
> "timedout" mean a 408 timeout?  A 504 timeout?  Something else?
>
>
This StackExchange question from a couple of years ago seems relevant:
https://unix.stackexchange.com/questions/459814/limited-connectivity

It may having something to do with your VPN service and DNS.

You could disable connectivity checking to see if stops the problem. I
use WiFi and have disabled the checking service, but still get
notifications if I have an actual loss of connectivity. I really don't
know that many applications that rely on the service as many do their
own connection checking -  certainly browsers and gui email clients do.

You can disable connection checking here
Settings->Privacy->Connectivity->Connectivity Checking.


Alex


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: NetworkManager reports disconnect/reconnect many times a day

Colin Law
On Sat, 5 Dec 2020 at 21:17, Alex via ubuntu-users
<[hidden email]> wrote:
>
> It may having something to do with your VPN service and DNS.

I think if it had been DNS that there would have been a different
error shown in the log, but I may be wrong.

Colin

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: NetworkManager reports disconnect/reconnect many times a day

Paul Smith-2
In reply to this post by Paul Smith-2
On Sat, 2020-12-05 at 13:53 -0500, Paul Smith wrote:
> Has anyone else noticed this?  If you run:
>
>   journalct --unit NetworkManager --since yesterday
>
> do you see the CONNECTED_SITE / CONNECTED_GLOBAL messages (these are
> the only ones printed at "INFO" level which is the default log level)
> appear randomly / not when you expect your network connection to go
> down?  If lots of people are seeing it then it's most likely an
> Ubuntu server problem.

So yesterday about 4pm I configured NetworkManager to use a different
server (not connectivity-check.ubuntu.com) for connectivity checking
and so far I've not had a single instance of CONNECTED_SITE /
CONNECTED_GLOBAL appear in my logs.

Of course it could just be that it's the weekend or something so I'll
have to wait longer to be sure, but at the moment it seems to me more
likely to be an issue with the Ubuntu connectivity server being
overloaded than an issue with my local connection.

Of course that means this won't help me figure out what's happening
with my IoT wifi connections being wonky: I bought a pretty heavy-duty
wireless router a couple of years ago and I'd hate to think it was
having problems already.  I don't have many close neighbors so it
shouldn't be interference and my levels seem pretty strong.  Hrm. Well,
it's not a problem with my Ubuntu system, apparently...


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: NetworkManager reports disconnect/reconnect many times a day

Colin Law
On Sun, 6 Dec 2020 at 14:40, Paul Smith <[hidden email]> wrote:

>
> On Sat, 2020-12-05 at 13:53 -0500, Paul Smith wrote:
> > Has anyone else noticed this?  If you run:
> >
> >   journalct --unit NetworkManager --since yesterday
> >
> > do you see the CONNECTED_SITE / CONNECTED_GLOBAL messages (these are
> > the only ones printed at "INFO" level which is the default log level)
> > appear randomly / not when you expect your network connection to go
> > down?  If lots of people are seeing it then it's most likely an
> > Ubuntu server problem.

As a matter of interest I am seeing this today, though I have not
noticed it before.  I suspect it is an issue with the connectivity
server.  It is only access to that server that is affected as far as I
can see.

Colin

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: NetworkManager reports disconnect/reconnect many times a day

Paul Smith-2
On Wed, 2020-12-09 at 15:30 +0000, Colin Law wrote:
> As a matter of interest I am seeing this today, though I have not
> noticed it before.  I suspect it is an issue with the
> connectivity server.  It is only access to that server that is
> affected as far as I can see.

Yes, I've been seeing it for weeks/months (if I look back through my
journalctl) but since I changed my connectivity server to use a
different one (not the ubuntu.com server) I haven't seen a single
instance.

Maybe someone should report to Ubuntu that they need to do something
about enhancing this facility to avoid users thinking their networks
are flaky.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: NetworkManager reports disconnect/reconnect many times a day

Tom H-4
In reply to this post by Paul Smith-2
On Sat, Dec 5, 2020 at 7:54 PM Paul Smith <[hidden email]> wrote:

>
> I am seeing a behavior of NetworkManager where it reports that it is
> disconnecting for a few seconds then reconnecting, multiple times a day
> (once every few hours). However, it's not ACTUALLY disconnected.
>
> I'm using Ubuntu 20.04.
>
> I have a WIRED connection; this is not wifi.
>
> My little LAN icon on the control panel goes to a "?" then comes back,
> and my Spotify app goes dim then comes back.
>
> I do a lot of remote work, including a VPN and SSH to remote systems,
> and at no time do I notice any lag in typing etc. even when the above
> happens. So, in some ways this is not a real problem (and in fact I've
> lived with it for quite a while).
>
> But, a bunch of our wireless devices DO lose connection multiple times
> a day although I can't say if it's the same times or not. I don't know
> if this is related: it obviously could be completely different things
> but I thought I'd start with the simpler-to-debug problem.
>
> I enabled DEBUG logging for NetworkManager and whenever this happens I
> get output like this in journalctl:
>
> Dec 05 05:55:01 NetworkManager[968]: <debug> [1607165701.8724] connectivity: (enx106530e29458,IPv4,38386) start request to 'http://connectivity-check.ubuntu.com/' (try resolving 'connectivity-check.ubuntu.com' using systemd-resolved)
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.7958] connectivity: (enx106530e29458,IPv4,38386) check completed: LIMITED; timeout
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.7959] device[7d9e8e19a7fc97e0] (enx106530e29458): connectivity state changed from FULL to LIMITED
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.7963] manager: connectivity checking indicates LIMITED
> Dec 05 05:55:21 NetworkManager[968]: <info> [1607165721.7964] manager: NetworkManager state is now CONNECTED_SITE
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.7974] dispatcher: (760) dispatching action 'connectivity-change'
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.7980] device[7d9e8e19a7fc97e0] (enx106530e29458): ip4-config: update (commit=1, new-config=0x55e94d2649c0)
>
> then there's a bunch of debug about state change then I see:
>
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.8005] dns-mgr: (device_ip_config_changed): no DNS changes to commit (0)
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.8006] connectivity: (enx106530e29458,IPv4,38393) start request to 'http://connectivity-check.ubuntu.com/' (try resolving 'connectivity-check.ubuntu.com' using systemd-resolved)
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.8007] device[7d9e8e19a7fc97e0] (enx106530e29458): ip4-config: update (commit=0, new-config=0x55e94d2649c0)
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.8294] dispatcher: (760) /etc/NetworkManager/dispatcher.d/01-ifupdown succeeded
> Dec 05 05:55:21 NetworkManager[968]: <debug> [1607165721.8294] dispatcher: (760) /etc/NetworkManager/dispatcher.d/99-disable-wireless-when-wired succeeded
> Dec 05 05:55:22 NetworkManager[968]: <debug> [1607165722.7972] connectivity: (enx106530e29458,IPv4,38394) start request to 'http://connectivity-check.ubuntu.com/' (try resolving 'connectivity-check.ubuntu.com' using systemd-resolved)
> Dec 05 05:55:23 NetworkManager[968]: <debug> [1607165723.1788] connectivity: (enx106530e29458,IPv4,38394) check completed: FULL; status header found
> Dec 05 05:55:23 NetworkManager[968]: <debug> [1607165723.1789] device[7d9e8e19a7fc97e0] (enx106530e29458): connectivity state changed from LIMITED to FULL
> Dec 05 05:55:23 NetworkManager[968]: <debug> [1607165723.1791] manager: connectivity checking indicates FULL
> Dec 05 05:55:23 NetworkManager[968]: <info> [1607165723.1791] manager: NetworkManager state is now CONNECTED_GLOBAL
> Dec 05 05:55:23 NetworkManager[968]: <debug> [1607165723.1796] dispatcher: (761) dispatching action 'connectivity-change'
>
> and my icon shows connected again.
>
> It looks like checks to connectivity-check.ubuntu.com sometimes fail.
> I don't know if that's because my network is not allowing new
> connections or something weird like that (as I said I haven't noticed
> any hangs while typing in remote sessions), or if there's a DNS issue,
> or if this Ubuntu server is too busy and doesn't always respond, or
> what it is.
>
> Has anyone else noticed this? If you run:
>
> journalct --unit NetworkManager --since yesterday
>
> do you see the CONNECTED_SITE / CONNECTED_GLOBAL messages (these are
> the only ones printed at "INFO" level which is the default log level)
> appear randomly / not when you expect your network connection to go
> down? If lots of people are seeing it then it's most likely an Ubuntu
> server problem.
>
> Does anyone know if there's a way to get more details from
> NetworkManager about exactly what kind of failure it detected? Does
> "timedout" mean a 408 timeout? A 504 timeout? Something else?

AFAIK, there's no disconnection. There's simply a connectivity test
configured by "/lib/NetworkManager/conf.d/20-connectivity-ubuntu.conf".

You can disable it with an empty
"/etc/NetworkManager/conf.d/20-connectivity-ubuntu.conf".

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: NetworkManager reports disconnect/reconnect many times a day

Colin Law
On Wed, 9 Dec 2020 at 16:10, Tom H <[hidden email]> wrote:
>
> AFAIK, there's no disconnection. There's simply a connectivity test

There is a disconnection (or failure to connect at least) with the
default connectivity server.

Colin

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users