centos7: wlan0 is disconnected once per couple minutes
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Quote:
Originally Posted by miccze
I'm having couple of issues with my network, it's Centos7.
I'm getting something like this in the logs. Any idea what that might be? It's getting me out of the ssh session:
Code:
-- Subject: Unit NetworkManager-dispatcher.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit NetworkManager-dispatcher.service has finished starting up.
--
-- The start-up result is done.
Sep 19 11:59:51 rpicent1 nm-dispatcher[677]: req:1 'up' [wlan0]: new request (3 scripts)
Sep 19 11:59:51 rpicent1 nm-dispatcher[677]: req:1 'up' [wlan0]: start running ordered scripts...
Sep 19 11:59:51 rpicent1 nm-dispatcher[677]: req:2 'connectivity-change': new request (3 scripts)
Sep 19 11:59:51 rpicent1 chronyd[229]: Source 149.156.70.75 online
Sep 19 11:59:51 rpicent1 chronyd[229]: Source 188.165.17.91 online
Sep 19 11:59:51 rpicent1 chronyd[229]: Source 46.175.224.7 online
Sep 19 11:59:51 rpicent1 chronyd[229]: Source 159.253.242.123 online
Sep 19 11:59:51 rpicent1 nm-dispatcher[677]: req:2 'connectivity-change': start running ordered scripts...
Sep 19 11:59:51 rpicent1 chronyd[229]: Selected source 149.156.70.75
Sep 19 11:59:54 rpicent1 NetworkManager[238]: <info> [1537351194.1227] policy: set '3Bredband-4FB2-2.4GHz' (wlan0) as default for IPv6 rout
Sep 19 12:00:23 rpicent1 sshd[541]: pam_unix(sshd:session): session closed for user mcadmin
Sep 19 12:00:26 rpicent1 su[563]: pam_unix(su:session): session closed for user root
Sep 19 12:00:26 rpicent1 systemd-logind[218]: Removed session 2.
-- Subject: Session 2 has been terminated
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
--
-- A session with the ID 2 has been terminated.
Then, there is issue regarding dhcp6. Its getting stopped and my network is getting disconnected and i am thrown out of the ssh session.
Code:
Jan 01 01:00:26 rpicent1 nm-dispatcher[267]: req:3 'connectivity-change': start running ordered scripts...
Jan 01 01:00:27 rpicent1 NetworkManager[238]: <info> [27.2141] dhcp6 (wlan0): activation: beginning transaction (timeout in 45 seconds)
Jan 01 01:00:30 rpicent1 NetworkManager[238]: <info> [30.0010] dhcp6 (wlan0): dhclient started with pid 510
Jan 01 01:00:30 rpicent1 NetworkManager[238]: <info> [30.0119] policy: set '3Bredband-4FB2-2.4GHz' (wlan0) as default for IPv6 routing and
Jan 01 01:00:31 rpicent1 dhclient[510]: XMT: Info-Request on wlan0, interval 970ms.
Jan 01 01:00:31 rpicent1 dhclient[510]: RCV: Reply message on wlan0 from fe80::ba08:d7ff:fed0:4fb1.
Jan 01 01:00:33 rpicent1 NetworkManager[238]: <info> [33.6811] dhcp6 (wlan0): nameserver 'fe80::ba08:d7ff:fed0:4fb1'
Jan 01 01:00:33 rpicent1 NetworkManager[238]: <info> [33.6813] dhcp6 (wlan0): state changed unknown -> bound
Jan 01 01:00:34 rpicent1 chronyd[229]: Selected source 46.175.224.7
Jan 01 01:00:34 rpicent1 chronyd[229]: System clock wrong by 1537349744.555121 seconds, adjustment started
Sep 19 11:36:18 rpicent1 systemd[1]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
Sep 19 11:36:18 rpicent1 chronyd[229]: System clock was stepped by 1537349744.555121 secondsSep 19 11:36:22 rpicent1 NetworkManager[238]: <info> [1537349782.7333] dhcp6 (wlan0): client pid 510 exited with status 0
Sep 19 11:36:22 rpicent1 NetworkManager[238]: <info> [1537349782.7334] dhcp6 (wlan0): state changed bound -> done
Sep 19 11:36:22 rpicent1 rsyslogd[466]: imjournal: journal reloaded... [v8.24.0 try http://www.rsyslog.com/e/0 ]
Sep 19 11:36:25 rpicent1 chronyd[229]: Selected source 159.253.242.123
From your outputs it seems that NetworkManager is connecting a wireless interface, the "mcadmin" user is being disconnected from ssh, the "root" user has been exited from the "su" command - which could be "Session 2".
If you look at what I've highlighted in bold; it seems when the system time is changed, NetworkManager is disconnecting your wireless interface. Why is the system time being changed?
What scripts are you having NetworkManager run?
Quote:
Finally i get those messages, which also confuses me. This is being repeated every couple of minutes:
Probably because NetworkManager is scanning after disconnection for more wireless interfaces to try and connect - it can happen with my CentOS 7.5 system (and does).
If you look at what I've highlighted in bold; it seems when the system time is changed, NetworkManager is disconnecting your wireless interface. Why is the system time being changed?
Regarding the time changing, it's being done automatically. It looks like there is January 1st date for some time, but then it updates itself according to hwclock and timedatectl properties where timezone is set.
Quote:
What scripts are you having NetworkManager run?
Regarding the scripts that shows in the logs, i have no idea what are those. I'm not aware of any scripts running from nmdispatcher. I was thinking that it might be something inside NetworkManager, some scripts and that it might be normal. Is there a way to check that out?
Quote:
Probably because NetworkManager is scanning after disconnection for more wireless interfaces to try and connect - it can happen with my CentOS 7.5 system (and does).
Is there any way to stop NetworkManager from searching other interfaces?
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Quote:
Originally Posted by miccze
...Regarding the time changing, it's being done automatically. It looks like there is January 1st date for some time, but then it updates itself according to hwclock and timedatectl properties where timezone is set.
You need to find out why it's set on January 1st and set it to the correct time. As I said before, your wifi interface is being disconnected after the time is changed. Is the right time/timezone set in the machine's BIOS/UEFI ?
Quote:
Regarding the scripts that shows in the logs, i have no idea what are those. I'm not aware of any scripts running from nmdispatcher. I was thinking that it might be something inside NetworkManager, some scripts and that it might be normal. Is there a way to check that out?
Yes, have a look in the /etc/NetworkManager/dispatcher.d/ folder, that's where the scripts for nmdispatcher are located and run from. On my system there is a script called "20-chrony", if you note your outputs, it seems right after this script is run, is when your wifi interface is disconnected.
Quote:
Is there any way to stop NetworkManager from searching other interfaces?
From my research it seems there is a way to force it to prefer one access point over others. You can run the "nm-connection-editor" command, which is a "mini" GUI for NetworkManager. According to this and this it involves "locking onto" the AP you wish to use, so it always prefers that AP over any other AP. You set the BSSID for the AP you want to use in the same GUI.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.