HP has a few articles on this issue. KM00368094 and KM899329 are 2 such articles with the same recommend fix of flushing out the DNS cache on the QC/ALM server.
To fix the issue, make sure the networking between QC server and LDAP server is fine, then flush the DNS cache on QC server.
To flush the DNS cache on QC server (please consult System administrator):
If QC server is on Windows, use the ''ipconfig /flushdns'' command and then perform a system restart.
If QC server is on Linux, restart the nscd daemon- type ''/etc/rc.d/init.d/nscd restart'' or ''/etc/init.d/nscd restart''.
An also temporary workaround suggested is a switch from LDAP to QC authentication based on if your LDAP server is having an issue.
Check out this other Eye on Testing article for some info on that: http://eyeontesting.com/questions/5607/getting-an-invalid-context-key-on-ldap-login-for-a.html