Tuesday, July 18, 2017

SPEndPointAddressNotFoundException: There are no addresses available for this application

From time to time, I would receive support requests where some backend services was stopped for whatever reason. From an end user point of view, they only see that something is no longer working. However, looking at ULS, it becomes very obvious as you would see this kind of exception:

SPEndPointAddressNotFoundException: There are no addresses available for this application.

Typically, this is either a matter of restarting the service instances and / or running the Application Address Refresh Job

Here is also some powershell to see what the SharePoint Round Robin Load Balancer sees:

$proxyName = 'proxy name'
$saName = 'service application name'

$proxy = Get-SPServiceApplicationProxy | Where-Object {$_.TypeName -eq $proxyName}
$loadBalancer = $proxy.LoadBalancer
$loadBalancerContext = $loadBalancer.BeginOperation()

$loadBalancerContext.EndpointAddress

$sa = Get-SPServiceApplication -Name $saName
$sa.EndPoints | Format-List


One other common thing is to be specific about the SharePoint Round Robin Load Balancer. I often have to clarify that this is for backend services as often SharePoint admins get this mixed up with a WFE load balancer.

Also, here is a link to a very useful description about the SharePoint Topology Service:
https://blogs.msdn.microsoft.com/besidethepoint/2011/02/19/how-i-learned-to-stop-worrying-and-love-the-sharepoint-topology-service/

Thursday, July 6, 2017

Add-Type : Could not load file or assembly 'Microsoft.SqlServer.Smo, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.

I am new to SQL Server Management Objects (SMO)

I tried

Add-Type -AssemblyName "Microsoft.SqlSever.Smo"

but got this error:

Add-Type : Could not load file or assembly 'Microsoft.SqlServer.Smo, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.

Knowing that my machine has had multiple versions of SQL and Visual Studio installed at some point, I decided to opt for the latest and provide the FullName of the assembly instead:

Add-Type -AssemblyName 'Microsoft.SqlServer.Smo, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'

That seemed to work. Yes, I did get the assembly first to verify that all the referenced assemblies are there. Not sure why the loader would default to 9.0.242.0, but that is not my problem right now.