Error 521 indicates the any one of the following user actions needed
User action:
Examine the request and verify that at least one of the following parameter sets are present.
Username and password
Username, password, and device registration certificate
User certificate
Probably, check the certificate at first and see the certificate is still valid