Thursday, 14 March 2013

How to check memory allocation for distributed cache on SharePoint 2013?



Couple of weeks back, I built a proof of concept environment for SharePoint 2013 which is a 3 tier architecture on Windows 2012 and SQL Server 2012 servers. In this article I will try to check the memory allocation for Distributed Cache.

Server
Role
Memory
VCPU
Ls-sppr13wf-01
Web Front End
8 GB
4
Ls-sppr13si-01
App Server
8 GB
4
Ls-sppr13sql-01
SQL Server
12 GB
4

During the installation 5% of the server memory is automatically allocated to the Distributed Cache Service’s cache size. If you don’t want Distributed Cache to run on all the servers after the installation you can use PSConfig with skipregisterAsDistributedCacheHost flag on all servers that are not cache host.

In my case we didn’t do this we left what is configured by default for Distributed Cache during the installation.

Anyways, to identify how much of memory is allocated by default to Distributed Cache, it’s 5 % of the memory. The web front end has 8 GB i.e. 8*1024 = 8192 MB. So 5% of this shall be around 409.5 MB

Run the following Powershell to check what's been allocated by default.

Use-CacheCluster
Get-AFCacheHostConfiguration -ComputerName ls-sppr13wf-01 -CachePort "22233"


 And it allocated 5% of the memory i.e. 410 MB

Note:  All Servers running the Distributed Cache service must match exactly in terms of total memory specifications on all Servers in the cache cluster  

There is an excellent article and planning and using the distributed cache service must read before thinking of implementing the Distributed Cache.

I have just started working on with Distributed Cache, will continue my learning curve .

Wednesday, 13 March 2013

SharePoint 2010 October 2012 Cumulative Update a nightmare



 Got this error while running the Configuration Wizard on a Test environment which constitutes of a App and WFE server after installing the October 2012 Cumulative Update.

An exception of type Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException was thrown.  Additional exception information: The upgrade command is invalid or a failure has been encountered.
Failed to upgrade SharePoint Products.
Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException: Exception of type 'Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException' was thrown.
   at Microsoft.SharePoint.PostSetupConfiguration.UpgradeTask.Run()
 Resource id to be retrieved is PostSetupConfigurationFailedEventLog for language English (United States)
Resource retrieved id PostSetupConfigurationFailedEventLog is Configuration of SharePoint Products failed.  Configuration must be performed in order for this product to operate properly.  To diagnose the problem, review the extended error information located at {0}, fix the problem, and run this configuration wizard again.
Leaving function StringResourceManager.GetResourceString
Configuration of SharePoint Products failed.  Configuration must be performed in order for this product to operate properly.  To diagnose the problem, review the extended error information located at fix the problem, and run this configuration wizard again.
Entering function StringResourceManager.GetResourceString
Upgrade Timer job is exiting due to exception: System.Data.SqlClient.SqlException: Cannot open database "Search_Service_Application_1_CrawlStoreDB  " requested by the login. The login failed.
Login failed for user


Steps performed to reach towards resolution:

Installed October 2012 Cumulative Update on WFE and APP Server
Ran Product Configuration Wizard and it failed
Tried PSConfig.exe -cmd upgrade -inplace b2b –wait  - This too failed at the last step
Tried psconfig -cmd upgrade -inplace b2b –force – this too failed at the last step
IISRESET to both SharePoint Servers
Restarted SharePoint Timer Service
Restarted SharePoint Search Service
Ran PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures – this one failed at the last step

Failed why: There was an issue with the culture it was finding the culture as United States rather than United Kingdom

Note: The cumulative updates are bundled into one package from October 2012 onwards i.e. contains the foundation, server , language packs in the same package

Ran psconfig -cmd installcheck –noinstallcheck  - this worked fine but failed again at the last step

Failed why: the error was due to the crawl and admin databases of search

Cleared the SharePoint Cache on btoh WFE and APP Servers

Ran Get-SPProduct -local
PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures

This solved the issue phew. This was one nasty thing to install the October 2012 CU.

I don't know what I would have done without the ULS Log my good friend.

Tuesday, 12 March 2013

Using Wildcard Certificate for SharePoint 2010 or 2013



Well I had my share of fun to figure out how to use a wildcard certificate for SharePoint. 

The SSL’s were expiring which we had from VeriSign. We had  a wildcard *.domain.com from digicerts.com.
*.domain.com means you can generate a certificate for any sub-domain with in it.

This works fine (for scsm.contoso.com i.e. subdomain.domain.com ) but if you’re generating a cert for second level sub domain i.e.

sp.portal.contoso.com (secondleveldomain.subdomain.domain.com )

For this you will need to generate something called as SAN ( Subject Alternative Name) by creating a duplicate cert and give a fully qualified name i.e. sp.portal.contoso.com . This step may change depending upon who is your provider.

We tried to Complete the Domain Certificate but it wasn’t able complete the cert request got some error. Here is how we were able to use the certificate eventually.

You need to install the certificate on the corresponding server via MMC (Certificates > Computer Account > Tasks > Import the Certificate which your provider has generated)

Now when the certificate is installed, you would need to Export the Certificate  ( right click  on the cert and click on Tasks > Export or Export ) and  Complete a Domain Certificate in IIS via Server Certificates

Bind the same for HTTPS in IIS for the corresponding website and IISReset

Using this we were able to use wild card certificates for SharePoint environment.

You would need to check with your certificates provider if they support SAN (Subject Alternative Name) second level domain certificate. Digicerts does that and we’re happy to be using the same.

Note: This article is just to illustrate the wild card certificate does work for SharePoint subject to your certificates provider and how you do it.

Monday, 4 March 2013

My Site is not available for Public users by default


I recently created couple of environments on SharePoint 2013 as Dev and Proof of Concept. After provisioning a dedicated web app and My Site Host as the root site collection, configuring User Profile Service App I couldn’t find my site options available.



On a further look at the settings of My Site found that it’s private by default and you will have to select the option Make My Site Public i.e.
 
Navigate to User Profile Service App
Under My Site Settings, Click on My Site Setup
Scroll down to the end of the page; Select the Make My Site Public
Click Ok

Now open a new instance of the Browser, navigate to your site and you will be able to see My Site options available i.e. Sites, News feed, Sky Drive