The other day I went to deploy a solution to our SharePoint farm and was getting an error in the Solution Management in Central Administration.  Some important background info is that this solution first created a Web Application.

We had a 4 server farm and the solution wasn’t deploying to any of the servers.  Looking at the event log, we had several different errors all containing the text (the event ID for all of them was 6398):

Error during encryption or decryption. System error code 997. Error during encryption or decryption. System error code 0. Error during encryption or decryption. System error code 122.

All of these were based on a time job provisioning something, either the web application or the solution, or come to find out, some of our search services were having errors starting.  The web application for this solution was being created on one of our servers, but failing on the other three (this was what was actually holding up the solution from being deployed).

After doing some searching everyone gave two options:

1. Recreate your SharePoint Configuration database…yeah right, this is going to be our VERY LAST attempt.

2. Run stsadm –o updatefarmcredentials (if you want to stop reading here, run this command first and it should fix the errors listed above…ONLY if this doesn’t work consider recreating your SharePoint Configuration database)

Neither one of these really seemed to make sense, we created all 4 servers in the farm from scratch, install SharePoint on all of them at the same time, created about 8 web applications that had all provisioned fine already, and never made any changes to user credentials (as some posts suggested).  Since the web application was being created fine on Server 1, we started looking at servers 2-4 as to what happened that would block a web application from being provisioned.  We couldn’t find anything.

Finally, we looked at Server 1.  This server had a timer job running with a different credentials than Servers 2 – 4.  Come to find out, when the install had been done, for some reason SharePoint was installed on Server 1 with one set of credentials and on Servers 2 – 4 with a complete different set of credentials.  After realizing this, we conceded to the fact that yes, user credentials are probably all messed up in our SharePoint Configuration database.  We ran the stsadm –o updatefarmcredentials command this morning and all of a sudden the web application could be created, search services started and solutions were able to be deployed.

I’m still baffled as to how our original 8 web applications were created and how solutions were properly deployed previously, but hey, at least everything is fixed now and set up properly.