Error creating Master Key

May 30, 2012 at 12:04 PM

Whenever the script attempts to create the Master Key on my system I get the message:

Update-SPSecureStoreMasterKey : The request channel timed out while waiting for a reply after 00:00:58.0782234.  Increase the timeout value passed to the call to Request or increase the SendTimeout value to the binding.  The time allocated to this operation may have been a portion of a longer timeout.

At \\dogfood\AutoSPInstaller\AutoSPInstaller\AutoSPInstallerFunctions.ps1:2500 char:34

After reading the discussion at http://autospinstaller.codeplex.com/discussions/262348 I tried increasing the Start-Sleep statements from 5 to 10, but that made no difference.

Jun 1, 2012 at 9:37 AM

I'm still struggling with this issue.

Tried running the commands manually, so in Powershell ran

$secureStore = Get-SPServiceApplicationProxy | Where {$_.GetType().Equals([Microsoft.Office.SecureStoreService.Server.SecureStoreServiceApplicationProxy])}

Confirmed it returned the correct proxy. Then

Update-SPSecureStoreMasterKey -ServiceApplicationProxy $secureStore.Id -Passphrase <farmpassword>

And that ran without error.

So, figuring it might be a timing issue, I increased the Start-Sleeps further up to 120, but the error still occurs.

Jun 5, 2012 at 1:51 AM

I had this error as well but in a multi-server farm, and only one of the servers was doing this. You're right, regardless of the sleep time, the error would come up. I tried a lot of things to resolve it. I think this is related to concurrency issues though. So, you can delete all the cache files and re-run it. This blog post (on a different topic) shows you how (see step 4 in the post): http://blog.henryong.com/2011/08/18/sharepoint-2010-converting-from-classic-to-claims-authentication-lessons-learned/

The other thing I did (not sure it helped) was to delete all the SharePoint-created certificates from the store.

Hope that helps.

Coordinator
Jun 7, 2012 at 2:47 AM

I also implemented a new function recently (WaitForHelpInstallToFinish) to suspend the script until the Help Collection timer job had finished running. This job would take several minutes, and the contributor of the idea (jwthompson98) suspected it to be the cause of some of the concurrency errors. Not entirely confirmed though yet, as we still saw some concurrency errors with language pack installs afterwards.

Brian


Jun 11, 2012 at 11:52 AM

Creating the Master Key... is still generating an error, though it's a slightly different one since I tried the latest version of the script:

Update-SPSecureStoreMasterKey : Could not connect to http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas.  TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:32843.

AutoSPInstallerFunctions.ps1:2664 char:34

Any ideas?

Jun 11, 2012 at 1:53 PM

I get a similar problem later in the script.

In the Excel Services Application, when the script runs Get-SPSecureStoreApplication it fails to get one, so tries to create one

- Creating Secure Store Application...

New-SPSecureStoreApplication : Could not connect to http://localhost:32843/SecurityTokenServiceApplication/securityroken.svc/actas. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:32843

Update-SPSecureStoreGroupCredentialMapping then fails as $secureStoreapp is still null and the script terminates.