martes, 20 de marzo de 2018

SharePoint 2013 - Distributed Cache: There is a temporary failure. Please retry later.

Following communication issue occurred in my test environment (two-tier farm) after the initial set up and I was forced to reconfigure the Distributed cache.

Events:

1. ErrorCode ERRCA0017, SubStatus ES0006 (RetryLater / CacheServerUnavailable)
Exception in SPDistributedCachePointerWrapper::InitializeDataCacheFactory for usage 'DistributedLogonTokenCache' - Exception 'Microsoft.ApplicationServer.Caching.DataCacheException: ErrorCode<ERRCA0017>:SubStatus<ES0006>:There is a temporary failure. Please retry later. (One or more specified cache servers are unavailable, which could be caused by busy network or servers. For on-premises cache clusters, also verify the following conditions. Ensure that security permission has been granted for this client account, and check that the AppFabric Caching Service is allowed through the firewall on all cache hosts. Also the MaxBufferSize on the server must be greater than or equal to the serialized object size sent from the client.). Additional Information : The client was trying to communicate with the server : net.tcp://SP2013:22233     at Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ResponseBody respBody, RequestBody reqBody)     at Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCacheProperties(RequestBody request, IClientChannel channel)     at Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCache(String cacheName)     at Microsoft.SharePoint.DistributedCaching.SPDistributedCachePointerWrapper.InitializeDataCacheFactory()'
2. No connection could be made because the target machine actively refused it.
Unexpected Exception in SPDistributedCachePointerWrapper::InitializeDataCacheFactory for usage 'DistributedLogonTokenCache' - Exception 'Microsoft.ApplicationServer.Caching.DataCacheException: ErrorCode<ERRCA0017>:SubStatus<ES0006>:There is a temporary failure. Please retry later. (One or more specified cache servers are unavailable, which could be caused by busy network or servers. For on-premises cache clusters, also verify the following conditions. Ensure that security permission has been granted for this client account, and check that the AppFabric Caching Service is allowed through the firewall on all cache hosts. Also the MaxBufferSize on the server must be greater than or equal to the serialized object size sent from the client.) ---> System.ServiceModel.EndpointNotFoundException: Could not connect to net.tcp://sp2013:22233/. The connection attempt lasted for a time span of 00:00:00. TCP error code 10061: No connection could be made because the target machine actively refused it 10.0.0.20:22233.  ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 10.0.0.20:22233     at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)     at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)     at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)     --- End of inner exception stack trace ---    Server stack trace:      at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)     at System.ServiceModel.Channels.BufferedConnectionInitiator.Connect(Uri uri, TimeSpan timeout)     at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)     at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)     at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)     at Microsoft.ApplicationServer.Caching.CacheResolverChannel.Open(TimeSpan timeout)     at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)     at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)    Exception rethrown at [0]:      at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)     at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)     at Microsoft.ApplicationServer.Caching.CacheResolverChannel.OpenDelegate.EndInvoke(IAsyncResult result)     at Microsoft.ApplicationServer.Caching.ChannelContainer.Opened(IAsyncResult ar)     --- End of inner exception stack trace ---     at Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ResponseBody respBody, RequestBody reqBody)     at Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCacheProperties(RequestBody request, IClientChannel channel)     at Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCache(String cacheName)     at Microsoft.SharePoint.DistributedCaching.SPDistributedCachePointerWrapper.InitializeDataCacheFactory()'

Cause:

The server was not listening on ports 22233-22266. 


Solution:


1. At the SharePoint Management Shell command prompt, run the following Command stop-spdistributedcacheserviceinstance -graceful on all cache hosts.

2. At the SharePoint Management Shell command prompt, run the following command remove-spdistributedcacheserviceinstance on all cache hosts.

3. Execute the SharePoint Products Configuration Wizard on all SharePoint servers.

4. At the SharePoint Management Shell command prompt, run the following Command add-spdistributedcacheserviceinstance on all cache hosts.

SharePoint 2013 and 2010 : The trial period for this product has expired

You cannot extend the trial. You can license the full product by getting a paid-for license key, then in Central Administration > Upgrade and Migration > Convert Farm License Type. Enter the  product key > Upgrade. Now the license and expiration date are held within the Configuration database, the only way to “extend” a trial is to rebuild the farm from scratch.
Or you can follow below unsupported method.
There is a way we can modifying your SQL Server databases. This is an unsupported method so make sure you backup your config database first before continuing.
To do so follow below steps > Open SQL server management studio > connect your SQL instance.

Right click your configuration database (Which by default should be ‘SharePoint_Config’ ) > Select “New Query” on top.


Copy paste below query in the new query window
UPDATE Objects
SET Properties = Replace(Properties, 9223372036854775807, 92233720368547758)
WHERE ClassId = ‘4274DBC4-7D52-474F-961B-58D84F5C28FF’

Execute this query from top.
Now go to Central Administration > Upgrade and Migration > Convert farm license type. You should be able to input your new Product Key now and hit OK.

jueves, 15 de marzo de 2018

NO WINDOWS IDENTITY FOR DOMAIN\USER (IN ULS LOG)


I got this error together with some issues caused by an outdated SSL certificate (SP 2013 farm).
To fix it do this steps on all SharePoint servers:
1. Browse: C:\Program Files\Windows Identity Foundation\v3.5
2. Edit c2wtshost.exe.config
3. Add <add value=”NT AUTHORITY\Authenticated Users” /> to the <allowedCallers>
The modified file will look like this:
You will probably also need to restart the server.