Tuesday, February 19, 2013

Unable to run few scripts at one of a app server

Issue: 
While doing the deployment, I was unable to run few scripts at one of a app server and found error as could not locate to http://... site. The event error was "An exception occurred when trying to issue security token: Could not connect to http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc. TCP error code 10061: No connection could be made because the target machine actively refused it ::1:32843." with error ID 8306 and in ULS the similar error was available.
Resolution:
1) We found that the SharePoint Web Services pool was deleted or unavailable at that app server.
2) We created the SharePoint Web Services pool through following command:
$Type = [System.Type]::GetType("Microsoft.SharePoint.Administration.SPIisWebServiceSettings, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")
$Instance = $Type::Default
$Method = $Type.GetMethod("ProvisionLocal", "Instance, NonPublic", $null, @(), $null)
$Method.Invoke($Instance, $null)
$Method = $Type.GetMethod("Provision", "Instance, Public", $null, @(), $null)
$Method.Invoke($Instance, $null)
3)To get the Service Applications registered, execute the following script:
Get-SPServiceApplication | ForEach-Object {$_.Provision()} 
4) Start the SharePoint Web services application pool

No comments:

Post a Comment