(code 2) Failed in association procedure means "Previous authentication no longer valid".
Make sure you are using the right credentials for connecting the SSID.
Is this the first time you are connecting the client to this SSID?
Is this a normal SSID or Guest/Hotspot SSID?
Can you try creating a new WPA2 SSID and see if it works?