Bug 1262934 - WiFi takes 2 attempts to connect to Red Hat Wi-Fi.
WiFi takes 2 attempts to connect to Red Hat Wi-Fi.
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: NetworkManager (Show other bugs)
22
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Lubomir Rintel
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-14 12:29 EDT by Jim Scarborough
Modified: 2016-07-19 15:56 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-19 15:56:48 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
log file of not connecting, most recent statement first (6.55 KB, text/plain)
2015-09-14 12:29 EDT, Jim Scarborough
no flags Details
journalctl -b 0 -u wpa_supplicant (250 bytes, text/x-vhdl)
2015-09-25 09:14 EDT, Jim Scarborough
no flags Details
journalctl -b 0 -u NetworkManager (1.36 MB, text/x-vhdl)
2015-09-25 09:14 EDT, Jim Scarborough
no flags Details
nmcli device wifi (2.42 KB, text/plain)
2015-09-25 09:17 EDT, Jim Scarborough
no flags Details
ask for a new password every time (30.97 KB, image/png)
2015-09-28 14:49 EDT, Jim Scarborough
no flags Details
journalctl -b 0 -u NetworkManager (142.07 KB, text/x-vhdl)
2015-09-28 16:12 EDT, Jim Scarborough
no flags Details
journalctl -b 0 -u NetworkManager after successful connection first-try (324.51 KB, text/x-vhdl)
2015-09-30 11:03 EDT, Jim Scarborough
no flags Details

  None (edit)
Description Jim Scarborough 2015-09-14 12:29:54 EDT
Created attachment 1073340 [details]
log file of not connecting, most recent statement first

Description of problem:
WiFi takes 2 attempts to connect to Red Hat Wi-Fi.

How reproducible:
Leave the computer alone for 16 hours.  This will timeout a previous network connection.  Alternately, suspend/hibernate to break the wifi connection.  Mouse over to the top right corner.  Select "Wi-Fi", select the SSID "Red Hat" (from within a Red Hat office), enter the appropriate credentials, and wait.  The first time it will fail.  The second time, with exactly the same credentials, it will succeed. 

Additional info:
See the log attached (most recent statement first) for a time when the net didn't connect.
Comment 1 Jirka Klimes 2015-09-22 09:55:32 EDT
I tried with RHEL 7.2 now (but it should be basically the same code as Fedora 22) and I can't reproduce the issue.

There is this piece in the log
Sep 10 09:31:45 localhost.localdomain NetworkManager[10139]: <info>  (wlp4s0): device state change: config -> failed (reason 'ssid-not-found') [50 120 53]
Sep 10 09:31:45 localhost.localdomain NetworkManager[10139]: <warn>  (wlp4s0): Activation: (wifi) association took too long, failing activation

which might indicate that the "Red Hat" network is not visible (it may take a few seconds to scan the networks after resume).

Can you run 
$ nmcli device wifi
before connection attempt to see if "Red Hat" is visible.

And include new logs of NetworkManager and wpa_siupplicant:
# journalctl -b 0 -u NetworkManager
# journalctl -b 0 -u wpa_supplicant
Comment 2 Jim Scarborough 2015-09-25 09:14 EDT
Created attachment 1077098 [details]
journalctl -b 0 -u wpa_supplicant
Comment 3 Jim Scarborough 2015-09-25 09:14 EDT
Created attachment 1077099 [details]
journalctl -b 0 -u NetworkManager
Comment 4 Jim Scarborough 2015-09-25 09:17 EDT
Created attachment 1077100 [details]
nmcli device wifi

I've attached the requested logs.  It did see the Red Hat networks before I tried connecting.
Comment 5 Jim Scarborough 2015-09-25 09:56:22 EDT
I should add that I executed all of these commands before attempting to connect, and after these commands, it required 2 attempts to connect as initially described.
Comment 6 Dan Williams 2015-09-25 13:06:44 EDT
So in your latest NM logs, we see:

Sep 22 16:48:56 localhost.localdomain NetworkManager[17484]: <info>  NetworkManager state is now ASLEEP
* Ok, you put the machine to sleep.  Good place to start debugging...

Sep 24 09:30:10 localhost.localdomain NetworkManager[17484]: <info>  Auto-activating connection 'Red Hat'.
* Starting autoconnect

Sep 24 09:30:10 localhost.localdomain NetworkManager[17484]: <info>  (wlp4s0): device state change: need-auth -> failed (reason 'no-secrets') [60 120 7]
* The user canceled the password request

Sep 24 09:30:10 localhost.localdomain NetworkManager[17484]: <info>  Auto-activating connection 'Red Hat Guest'.
* Falls back to Red Hat Guest

Sep 24 09:30:15 localhost.localdomain NetworkManager[17484]: <info>  (wlp4s0): Activation: (wifi) disconnected during association, asking for new key
* It seems the Red Hat Guest stored PSK isn't correct, so NM asks for a new one

Sep 24 09:30:32 localhost.localdomain NetworkManager[17484]: <info>  (wlp4s0): deactivating device (reason 'new-activation') [60]
Sep 24 09:30:32 localhost.localdomain NetworkManager[17484]: <info>  (wlp4s0): Activation: starting connection 'Red Hat'
* The user requested a different connection, to Red hat

Sep 24 09:31:43 localhost.localdomain NetworkManager[17484]: <info>  (wlp4s0): Activation: (wifi) connection 'Red Hat' has security, and secrets exist.  No new secrets needed.
* Hmm, NM thinks the secrets already exist.  Can you double-check that you have "Ask for this password every time" selected in nm-connection-editor?

So it appears that with 1.0.2-1.fc22 at least, if you can verify that you *do* have "Ask for this password every time" checked, then NM is not properly clearing the secrets for the connection so that it asks again.  If that box is checked, you should be asked every time you connect to "Red Hat" for a new PIN + token code.
Comment 7 Jim Scarborough 2015-09-28 14:49 EDT
Created attachment 1078029 [details]
ask for a new password every time

I had the wrong password for Red Hat Guest.  I fixed it just now.

I already had "Ask for this password every time" checked
Comment 8 Jim Scarborough 2015-09-28 16:12 EDT
Created attachment 1078049 [details]
journalctl -b 0 -u NetworkManager

Interesting finding: The computer went to sleep this afternoon, and when I revived it, it immediately connected to "Red Hat Guest".  Then the first time I tried to connect to "Red Hat", it did!  Perhaps the failed attempt to connect to Red Hat Guest was putting the system into a bad state.  Attaching the latest NetworkManager log.
Comment 9 Jim Scarborough 2015-09-30 11:03 EDT
Created attachment 1078702 [details]
journalctl -b 0 -u NetworkManager after successful connection first-try

I suspended overnight and connected today on the first try.  I think something about the bad password for Red Hat Guest was revealing a problem connecting to Red Hat.
Comment 10 Fedora End Of Life 2016-07-19 15:56:48 EDT
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.