SharePoint Crawler error – Warning in Index component, Cannot plan query for index system. Index fragment ‘0’ has no available cells #sharepoint #crawler #searchservice

Search can return this error due to various reasons “Search has encountered a problem that prevents results from being returned. If the issue persists, please contact your administrator” but this will be certainly come if there is an error in one of the search components.

If you check in ULS log you will see this error ” Cannot plan query for index system. Index fragment ‘0’ has no available cells.”

This error indicates that there is an error in index partition and you should see a yellow warning exclamation in Central Admin as shown below

SearchError

If your error meets all these criteria then you have the same issue. If you look at other articles regarding then 90% of articles will mention to do an index reset and do a full crawl which will definitely fix the issue but this should be your last option and not the first one in a production environment.

To fix the issue we should look at clearing configuration cache on the server where index partition is being stored.

The steps to clear configuration cache is very well documented and can be found below

Steps to clear configuration cache

But doing these steps might not fix the issue so follow below instructions

  1. Try first clearing configuration cache and check if error gets fixed
  2. If not then again do the same steps but this time also restart SharePoint Search Service before you restart the SharePoint Timer Service
  3. If this also does not work then try to restart the server after step 1, restarting server in Production environment is not advisable during office hours so do it in planned manner
  4. If this also does not work then we are left with no other option but do an index reset and do a full crawl, use steps documented on Microsoft site Perform index reset

Also note that during these operations if any incremental or full crawl was going on you need to let it finish to make a call if above has fixed the issue. We observed that issue goes away only when crawl has finished.

Above strategy should work in most cases if not then reach out to us and we can help.

Please contact us via our Contact Us page or via our Facebook page or via Twitter

Like us on Facebook and follow us on Twitter

 

 

Impact of Active Directory Migration or domain change on SharePoint – Part 1

There can be situations when your organizations decides to change name due to mergers, acquisitions or splits. In this case quite often users are migrated from one active directory to other. This will definetely have impact on SharePoint users, servers and configurations.

Generally active directory migrations are done in two steps

  1. Migrate users and computers
  2. Migrate servers and service accounts

This post will cover the first point, second one will be covered in second post.

Generally when users are migrated in active directory you would expect that Microsoft products will be handled automatically but strangely that is not the case with SharePoint due to the reason User Profile service works in SharePoint. Reason is that User Profile Service does not work with Secuirty Identifier (SID history).

Before you migrate the users another thing which needs to be taken care is that all the Web Applications needs to allow new domain to do that please refer to below TechNet article

https://technet.microsoft.com/en-us/library/gg602075.aspx

When users are migrated in Active Directory, SharePoint has provided a command to migrate the users in SharePoint as well.

To migrate user in the whole farm use below command

$farm = Get-SPFarm

$farm.MigrateUserAccount( $_.oldlogin, $_.newlogin, $false )

Note that old login  and login should be read like below

olddoamain\user1

newdomain\user1

Reference article

https://blogs.msdn.microsoft.com/sowmyancs/2012/01/06/migrate-users-groups-powershell-script/

In case you need more help on this or other SharePoint issues please contact us via our Contact Us page or via our Facebook page or via Twitter

Like us on Facebook and follow us on Twitter

 

 

 

SharePoint issue resolution – PortalSiteMapProvider was unable to fetch children for node or Unexpected System.Web.HttpException: Request timed out #SharePoint

Request time out is a very generic issue and can happen due to numerous reasons but error PortalSiteMapProvider was unable to fetch children for node can occur only if site navigation nodes cannot be fetched that is Top Navigation or Left Navigation.

Issue Symptoms: SharePoint sites does not load at all and give error after more than a minute. If you look for error message via correlation ID you will see Request time out message and below error messages

  • PortalSiteMapProvider was unable to fetch children for node
  • Caught a thread abort exception in TemplateRedirectionPage.ProcessRequest, the exception may be expected
  • Unexpected System.Web.HttpException: Request timed out

Issue Analysis: The first error is the key here as it mentions that it has experienced issue while fetching Navigation from site. This issue can be triggered if you duplicate nodes in site collection or between multiple site collections in the same content database. It’s important to understand that this can happen in the same content database site collections. You can consider this is as a kind of bug in SharePoint because this scenario is valid to have duplicate nodes. To identify and confirm that you have this issue you need to fire below SQL query on the content database you have the issue. I know I know we should fire any queries in SharePoint database but in this case you have to and got in confirmed from Microsoft, also they mention that it is prohibited to update data.

SELECT TOP(20) Count(nav.Eid) AS ‘DuplicateCount’, nav.DocId, ad.Dirname, ad.Leafname FROM NavNodes AS nav with(nolock) INNER JOIN AllDocs AS ad with(nolock) ON nav.Docid = ad.Id WHERE (nav.EidParent = 1025 OR nav.Eidparent = 1002) AND DocID IS NOT NULL GROUP BY nav.DocId, ad.DirName, ad.LeafName ORDER BY ‘DuplicateCount’ DESC

If it has data then it means you have duplicate nodes issue. A lot of users in some other articles have mentioned that they somehow were able to find numerous nodes and they fixed it by deleting the nodes which were basically junk nodes not added by them. But in our case we did not have any junk nodes but it occurred due to real nodes.

Once above is confirmed we need to find out which stored procedure failed as that it will re-confirm above and also what fix we need to do. To do that we need to change verbose level of logging and capture more detailed log. To change verbose use below commands to start and stop it. Between them you need to perform the issue that is load the page

set-sploglevel -traceseverity verboseex

Clear-SPLogLevel

Based on correlation ID you should see that this stored procedure “sp_recompile proc_getwebnavstruct” is the culprit. If this is also confirmed then we can go for the fix

Issue fix: To fix the issue you will have to do things, first is it to update statistics table and second free cache of stored procedure. Note that statistics update is only needed if it has not been updated to check that fire below query on content database

USE WSS_Content_name

GO

SELECT name AS index_name,

STATS_DATE(OBJECT_ID, index_id) AS StatsUpdated FROM sys.indexes order by’index_name’ ASC

GO

If the row Nav_Nodes does not have dates same as today then please update it using below command

EXEC sp_MSforeachtable ‘UPDATE STATISTICS ? WITH FULLSCAN’

Once done we should also run below command to update query plan cache

DBCC FREEPROCCACHE

Once done site should load normally now as it use to do before.

Note that the fix is all about running SQL queries on SharePoint content database, it has to be done carefully and also only if needed.

Refer to below support link for details

https://support.microsoft.com/en-us/help/3103194/outdated-database-statistics-decrease-sharepoint-server-performance,-cause-time-outs,-and-generate-run-time-errors

In case you need more help on this or other SharePoint issues please contact us via our Contact Us page or via our Facebook page or via Twitter

Like us on Facebook and follow us on Twitter

 

 

 

 

Redirect SharePoint site from HTTP to HTTPS- Issues and Resolutions #SharePoint #SharePoint2013

When we start with SharePoint infrastructure lot of time SSL is not taken into consideration but at later point of time and surely in Production you should have SSL for encryption.

Since your users are used to HTTP URL you cannot ask every one of them to go to HTTPS from now on. The best is to redirect users automatically from HTTP to HTTPS. This article is not about how do this automatic redirection you can get to know the steps from here

Redirect HTTP to HTTPS

We also did steps same as above but we faced some issues after which you might also get which depends on how your infrastructure has been set up

  1. Issues with OneNote : If your end users have stored OneNote in document library all of them will have HTTP URL as their source so after redirecting to HTTPS you cannot save it to HTTP anymore. If one of users save it with new URL then it will be saved as new OneNote file. This is a tricky situation as you cannot get the old file and all will have local copies. Best strategy is to have the latest OneNote saved before you do redirection and upload it as new one after redirection.
  2. Issues with embedded links in files : If you have embedded links of MS Office documents in other documents then you will still be able to open documents but all of them will open in read only mode but usually you will have option to edit directly from them. Solution to this to update the links after redirection, there is no alternative to this. Good part is still you can open the file.
  3. Search issues : If you have HTTP URL as default URL in AAM or have used HTTP URL in search configuration then your search might break, you will not see any results but no error as well. To fix this you just use HTTPS URL at all places.

So these are things you need to consider if you plan for HTTP to HTTPS redirection.

Some other reference

http://support.microsoft.com/kb/2818415

In case you need more help on this or other SharePoint issues please contact us via our Contact Us page or via our Facebook page or via Twitter

Like us on Facebook and follow us on Twitter

 

2nd Microsoft Flow Template – Send Push Notification & Slack Message for a WordPress post #MicrsoftFlow #SharePoint #Office365

I was able to get my second Microsoft Template published in Microsoft Flow

Template can be used from here

Send Push Notification & Slack Message for a WordPress post

Functionality in this template is quite simple, when a WordPress post is made a push notification is made and also a Slack Message is posted in a particular group

To learn how to publish a template you can read my below blog about it

How to submit a Flow in template Gallery ?

To learn more about Microsoft Flow you can read below blogs

My tryst with Microsoft Flow!

Microsoft Flow – Create from blank

Microsoft Flow – Advanced mode options #SharePoint #MicrosoftFlow

SharePoint 2013 Search Error : object reference not set to an instance of an object – Fix #SharePoint #SharePointSearch

This a common error message which you can see if you have search issues “Object reference not to set an instance of an object”. This error message does not tell much and you will have to look SharePoint log and find the correlation ID.

If you search on the internet for this error you will hit numerous reasons and fix for it. Problem is that error message is very generic and can be seen for various kind of issues. I have encountered this in two scenarios which I am gonna list down.

First thing you need to check SharePoint health, if there is an error in that best resolution is to recreate the index

You must have some error message in SharePoint search status like below

search-topology-monitoring

Reset search index

If that is the not the case the other reason can be you have orphaned items in your farm / content database. Generally you will get error message in SharePoint Health Analyzer for this but in our case we did not get it strangely. So basically you cannot trust it so best is to look for correlation ID in SharePoint Log.

What I observed is that when you search in SharePoint it will enumerate all site collections and it might fail doing so if you have orphaned items. You should look carefully and find out which content database it was enumerating.

If you have find out you should use below command to Refresh Sites for the content database. This method synchronizes information between content and config databases.

$db = Get-SPDatabase | where {$_.Name -eq “DatabaseName”}

$db.RefreshSitesInConfigurationDatabase()

If this also does not work you can use below as well but this needs to be done out of office hours.

Dismount-SPContentDatabase “<ContentdBName>”

Mount-SPContentDatabase “” -DatabaseServer “” -WebApplication http://SiteName

Hopefully this well help someone and I just added one more solution in list of solution available.

In case you need more help on this or other SharePoint issues please contact us via our Contact Us page or via our Facebook page or via Twitter

Like us on Facebook and follow us on Twitter

Microsoft Flow template published #MicrosoftFlow #SharePoint #Office365

So finally my first Microsoft Flow template has been published, I am quite excited about it! It took sometime for Microsoft to add in the list of templates but better late than never.

Template can be used from here

Send email and add item in SharePoint List when WordPress Post is created

Functionality in this template is quite simple, when a WordPress post is made, you can get an email and same information can be added in SharePoint List.

To learn how to publish a template you can read my below blog about it

How to submit a Flow in template Gallery ?

To learn more about Microsoft Flow you can read below blogs

My tryst with Microsoft Flow!

Microsoft Flow – Create from blank

Microsoft Flow – Advanced mode options #SharePoint #MicrosoftFlow

Sideloading of Apps in #SharePoint online #Office365

If you are getting this error ” Error occurred in deployment step ‘Install SharePoint Add-in’: Sideloading of apps is not enabled on this site ” when debugging a SharePoint Add-in it means site you are using is a Production site. Sideloading of Apps is not enabled on any site by default as specially Production sites since it allow developers to load Apps which are still under development and not published.

If you are going to do some tests then enable it using PowerShell for SharePoint Online.

PowerShell code can be downloaded from MSDN code repository from Here

To disable Sideloading you can download code from here

 

 

Hybrid Architecture Office 365 (SharePoint Online) and SharePoint 2016 On premise #SharePoint2016 #SharePoint #Office365

Best thing which has happened during the introduction of SharePoint 2016 is that Microsoft is convinced that Hybrid Architecture is the way forward for bigger organizations and all the data cannot be moved to cloud. At least this is the current reality with lot of companies but such fast changing technologies you never know what’s the future

In this post we will review architecture of SharePoint 2016 on-premise and Office 365 (SharePoint Online). Here we are assuming that you already have a SharePoint On-premise set up and you will add SharePoint Online.

Basic architecture looks like below

hybridarchitecture

Image source Download

To start with you need an Office 365 license and Azure subscription as well. To start with we need to set up server to server trust and certificates like STS.

We need Active Directory Federation Services (AD FS) which is used to share information securely and seamlessly. SSO (Single Sign on) is also facilitated via this and also makes sure that there no duplication of accounts.

Azure active directory tenant is used to authenticate to Office 365. It’s quiet powerful with variety of features like identity management, multifactor authentication etc. Since authentication occurs via Azure active directory we will have copy of all user account of organization in this as well but we will use Azure Active Directory connect  for directory synchronization so that for end-user it looks like only one account.

More about Azure Active Directory Connect can be read here Azure Active Directory Connect

Azure Access control services is used to provide users authentication and authorization to web application and services. You can read more here Azure Access Control Service

There are multiple steps to do the complete set up, if you need very detailed steps I will recommend below online books from Microsoft press store

Planning and Preparing for SharePoint Hybrid

Configuring SharePoint Hybrid capabilities

Once the set up is done your users will experience various benefits, but you need to be sure what you are getting into and be clear about it

  • Integrated search: You get integrated search so you can search in both SharePoint Online and SharePoint 2016 on-premise. Everything will be indexed in SharePoint online. Note that since index is stored in SharePoint some customers need to be wary of it they might not want part of secret data also in cloud. How to do set up can read here Configure Cloud Hybrid Search
  • Unified user profile where users can see both on-premise and SharePoint online followed sites together
  • Other services like Delve, Video and App launched will now be available on SharePoint on-premise as well
  • You can redirect users to SharePoint Online OneDrive for Business from SharePoint 2016 on-premise OneDrive. Before you do this make sure that all documents are migrated as it’s only a redirect. Steps to redirect are very simple and can be used read here How to redirect users to Office 365 for OneDrive for Business . Best way to migrate data is to write a tool for migration, there are various way to implement this but best is that you can access OneDrive for Business using SharePoint APIs which you might be familiar with else you have to register an App for OneDrive for Business to access data / folders programatically. I am assuming you already know how to access OneDrive in SharePoint on-premise programatically.

To access OneDrive for business SharePoint online via REST API you can below url

https://O365DomainHere-my.sharepoint.com/personal/     UserName_O365DomainHere_onmicrosoft_com/_api/web/GetFolderByServerRelativeUrl(‘/personal/UserName_O365DomainHere_onmicrosoft_com/Documents’)/folders/

You can read about data operations here REST API Data Operations SharePoint

So this is a basic overview of Hybrid architecture and also my take on the things you need to consider, if you have further questions just leave  a comment

In case you need more help on this or other SharePoint issues please contact us via our Contact Us page or via our Facebook page or via Twitter

Like us on Facebook and follow us on Twitter

 

SharePoint 2013 migration to Office 365 step by step – Data Migration #SharePoint #Office365

After building the strategy and planning for it, next step is Data Migration from SharePoint 2013 to Office 365. We are going to look into native import / data migration service provided in Office 365, you need to be an Office 365 Administrator or at least have someone to help with initial set up.

Before we start actual migration we need to do some set up. Login to Office 365 and go to menu Users –> Migration.

datamigration

Once there scroll to see Onboarding and migration guidance, click on SharePoint and new window will open.

onboardingmeny

This will guide to Onboard you and create migration jobs, I am just capturing relevant steps here

onboardingsteos

Step 1 is just some text about SharePoint online

Step 2 is very important as you need to define what kind of deployment you will have, in our case we will select on premise to cloud.

oboarding-step-2

Step 3 explains PowerShell option we have selected On-premise to cloud migration

Step 4 is to prepare for PowerShell, first it download and install SharePoint Online Management Shell, download it from here SharePoint Online Management Shell.

Second is to create Azure Storage account if you don’t have already one.

Go to https://portal.azure.com and create a storage account

storageaccount

Also get your location and details

step-4

sponlinepowershell

Step 5 is creation of Content package, we need to use classic Export Web command in SharePoint onpremise server to create an export package

Export-SPWeb [-Identity] -Path [-ItemUrl ] [-NoFileCompression ]

Step 6 is coversion of package so that it can be imported

ConvertTo-SPOMigrationTargetedPackage -SourceFilesPath $sourceFiles -SourcePackagePath $sourcePackage -OutputPackagePath $targetPackage -TargetWebUrl $targetWeb -TargetDocumentLibraryPath $targetDocLib -Credentials $creds

To read more about ConvetTo-SPOMigrationTargetedPackage you can read here Click here

Step 7 is creating Azure Containers and uploading content package

$al = Set-SPOMigrationPackageAzureSource -SourceFilesPath $sourceFiles -SourcePackagePath $targetPackage -AzureQueueName $azureQueueName -AccountName $azureAccountName -AccountKey $azureAccountKey

$al|$al|fl

Step 8 is submitting a migration job, sample code is here

Submit-SPOMigrationJob -TargetWebUrl $targetWeb -MigrationPackageAzureLocations $al -Credentials $creds

Note that some parameters variables were created in earlier steps and needs to be used here

Step 9 is to check Migration Job Status which can be done Azure account storage queue

Sample source code

# Example file share packaging, conversion, upload and job submission script
# Queue is only container specified as new containers are automatically generated
# All container URIs get populated into $al variable output from Set-SPOMigrationPackageAzureSource cmdlet
$creds = (Get-Credential admin@contoso.com)
$sourceFiles = ‘\\fileshare\users\charles’
$sourcePackage = ‘C:\migration\CharlesDocumentsPackage_source’
$targetPackage = ‘C:\migration\CharlesDocumentsPackage_target’
$targetWeb = ‘https://contoso-my.sharepoint.com/personal/charles_contoso_com&#8217;
$targetDocLib = ‘Documents’
$azureAccountName = ‘contosomigration’
$azureAccountKey = ‘Insert Azure Account Key string Here’
$azureQueueName = ‘migrationqueue’
# Create new package from file share without security (faster)
New-SPOMigrationPackage -SourceFilesPath $sourceFiles -OutputPackagePath $sourcePackage
# Convert package to a targeted one by looking up data in target site collection
ConvertTo-SPOMigrationTargetedPackage -SourceFilesPath $sourceFiles -SourcePackagePath $sourcePackage -OutputPackagePath $targetPackage -TargetWebUrl $targetWeb -TargetDocumentLibraryPath $targetDocLib -Credentials $creds
# Create azure containers and upload package into them, finally snapshotting all files
$al = Set-SPOMigrationPackageAzureSource -SourceFilesPath $sourceFiles -SourcePackagePath $targetPackage -AzureQueueName $azureQueueName -AccountName $azureAccountName -AccountKey $azureAccountKey
# This displays the return Azure location
$al|$al|Format-List
# Submit package data to site collection to create new migration job
Submit-SPOMigrationJob -TargetWebUrl $targetWeb -MigrationPackageAzureLocations $al -Credentials $creds

So this completes all steps for data migration. Next we will look into Hybrid scenarios which will come in next post

To check earlier two posts click below

SharePoint 2013 migration to Office 365 step by step – Planning #SharePoint #Office365

SharePoint 2013 migration to Office 365 step by step – Strategy #SharePoint #Office365