There may be many reasons why PAM would be unable to communicate with the RSA server, but for one recent case it was because the port being used, 5000, was closed. As soon as the firewall was configured to allow PAM to use this port RSA worked. Check that the port you are using is open, if you have a problem with RSA.