Troubleshoot – install SSRS 2016 Integrated Mode with SharePoint 2016

This week, I’ve been assigned a task/challenge to try and install and configure the SSRS 2016 for our new SharePoint 2016 environment. We are migrating from SharePoint 2013 to SharePoint 2016, and upgrading the SSRS becomes part of the migration.

The installation process is pretty simple and straightforward IF you didn’t have these many issues like what I have experienced.

Convert SharePoint server to Custom Role
Install the SSRS
Troubleshoot – Error 1603
– Fix exception – missing feature
– Fix exception – database schema
References

Convert SharePoint server to Custom Role

SSRS must be installed on a SharePoint 2016 server that’s configured in a Custom Role. For us, we want to install it on the APP server where the central admin was installed. The server role was configured as ‘Application with Search’. Apparently, these roles can be converted from one to another as long as it meets the requirements for the services running on the server.

So the very first step before you installing the SSRS is to make sure the server role is changed to Custom. This is done via Central Administration, under System Settings (click the title to go to its page), and you will find Convert server role in this farm as the last link under Servers.

On this Role Conversion page, it lists the SharePoint servers you have in the farm, and their roles, use the drop-down box to change the role and click Apply.

Install the SSRS

In theory, you are good to go with the installation after changing the SharePoint server role to Custom. Very standard steps:

  1. Mount the SQL Server 2016 media on a SharePoint server
  2. Run the standard installer
  3. Keep pressing Next, until the Feature Selection screen
    installssrs
  4. a. Select both Reporting Services – SharePoint and Reporting Services Add-in for SharePoint Products under Shared Features, for the application servers in your farm.
    b. Select only Reporting Services Add-in for SharePoint Products, for the rest of SharePoint servers.
    Explanation: 
    The Reporting Services – SharePoint is the actual SSRS Service application. This should be installed on any SharePoint servers allocated to doing the heavy lifting of rendering reports – the application servers.
    The Reporting Services Add-in for SharePoint Products is used to connect a SharePoint server to an instance of the SSRS Service application. The minimum is to install it on any front-end servers.
  5. Keep clicking next until its final window.
  6. It will tell you if one or two features have been installed successfully or failed. Normally (or in my case) the Reporting Services itself would install alright, and the problematic one is the Add-in. So if it’s the case, read on.

Troubleshoot – Error 1603

I got the error 1603 when installing Reporting Services Add-in for SharePoint Products on any servers. After reading a few articles, I realised that I need to run Windows Update on all servers and SharePoint 2016 Products Configuration Wizard just to make sure everything is brought up to the same level.

Steps are simple:

  1. Run Windows Update on all servers, make sure they’re all on the latest
  2. Run SharePoint 2016 Products Configuration Wizard from the ‘app’ server
  3. Keep clicking next until the Wizard tells you that’s all good
  4. Run SQL Server 2016 installer again

However, I stuck on the very final steps in the SharePoint 2016 Products Configuration Wizard. The complaints are:

  1. Missing feature
  2. The upgraded database schema doesn’t match the TargetSchema

Fix exception – missing feature

The error message looks like below:

Feature (Name = [Report Server File Sync], Id = [c769801e-2387-47ef-a810-2d292d4cb05d], Description = [Synchronizes Report Server files (.rdl, .rsds, .smdl, .rsd, .rsc, .rdlx) from a SharePoint document library to the report server when files are added or updated in the document library.], Install Location = [ReportServerItemSync]) is referenced in database [SP16_DEV_Content_Portal], but isn't installed on the current farm. The missing feature might cause upgrade to fail. If necessary, please install any solution that contains the feature and restart upgrade. (EventID:ajxkh)Feature (Name = [Report Server File Sync], Id = [c769801e-2387-47ef-a810-2d292d4cb05d], Description = [Synchronizes Report Server files (.rdl, .rsds, .smdl, .rsd, .rsc, .rdlx) from a SharePoint document library to the report server when files are added or updated in the document library.], Install Location = [ReportServerItemSync]) is referenced in database [SP16_DEV_Content_Portal], but isn't installed on the current farm. The missing feature might cause upgrade to fail. If necessary, please install any solution that contains the feature and restart upgrade. (EventID:ajxkh)
Feature (Name = [Power View Integration Feature], Id = [bf8b58f5-ebae-4a70-9848-622beaaf2043], Description = [Enables interactive data exploration and visual presentation against PowerPivot workbooks and Analysis Services tabular databases.], Install Location = [PowerView]) is referenced in database [SP16_DEV_Content_Portal], but isn't installed on the current farm. The missing feature might cause upgrade to fail. If necessary, please install any solution that contains the feature and restart upgrade. (EventID:ajxkh)
Feature (Id = [54668547-c03f-4bb5-aaab-d9568ebaf9c9]) is referenced in database [SP16_DEV_Content_Portal], but isn't installed on the current farm. The missing feature might cause upgrade to fail. If necessary, please install any solution that contains the feature and restart upgrade. (EventID:ajxkh)

To my limited understanding, the missing features are like orphan sites in SharePoint that are not being used or no longer exist. There are smart people like Phil Childs out there and kindly shared his scripts to remove these missing features.

Note: Your Central Admin may become unavailable after running the Products Configuration Wizard, start the service before you do the following.

Steps to do on your ‘app’ server:

  1. Copy the following scripts into a Notepad
    function Remove-SPFeatureFromContentDB($ContentDb, $FeatureId, [switch]$ReportOnly)
    {
    $db = Get-SPDatabase | where { $_.Name -eq $ContentDb }
    [bool]$report = $false
    if ($ReportOnly) { $report = $true }
     
    $db.Sites | ForEach-Object {
     
    Remove-SPFeature -obj $_ -objName "site collection" -featId $FeatureId -report $report
     
    $_ | Get-SPWeb -Limit all | ForEach-Object {
     
    Remove-SPFeature -obj $_ -objName "site" -featId $FeatureId -report $report
    }
    }
    }
    
    function Remove-SPFeature($obj, $objName, $featId, [bool]$report)
    {
    $feature = $obj.Features[$featId]
     
    if ($feature -ne $null) {
    if ($report) {
    write-host "Feature found in" $objName ":" $obj.Url -foregroundcolor Red
    }
    else
    {
    try {
    $obj.Features.Remove($feature.DefinitionId, $true)
    write-host "Feature successfully removed from" $objName ":" $obj.Url -foregroundcolor Red
    }
    catch {
    write-host "There has been an error trying to remove the feature:" $_
    }
    }
    }
    else {
    #write-host "Feature ID specified does not exist in" $objName ":" $obj.Url
    }
    }
  2. Save it as rmf.ps1 to your local drive (eg. C:\)
    (I know there are certain naming conversions out there, but this is short and simple so I won’t having trouble spelling it correctly when I call this script in PowerShell)
  3. Open the SharePoint 2016 Management Shell
  4. a. Use the following scripts to view the list of sites and site collections that have the missing feature:
    . "C:\rmf.ps1"
    Remove-SPFeatureFromContentDB -ContentDB "YOUR_CONTENT_PORTAL_NAME" -FeatureId "MISSING FEATURE ID" –ReportOnly

    You will get something like:

    Feature found in site collection: https://sharepoint.com

    b. Use the following scripts to remove a feature:

    . "C:\rmf.ps1"
    Remove-SPFeatureFromContentDB -ContentDB "YOUR_CONTENT_PORTAL_NAME" -FeatureId "MISSING FEATURE ID"

    You will get something like:

    Feature successfully removed from site collection: https://sharepoint.com:

Note: If you are getting the following error, it’s very likely that the W3SVC service is stopped during running the Products Configuration Wizard. Start it from Server Manager and you are good to go.

An error occurred while enumerating through a collection: There was no endpoint listening at
http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc that could accept the message.

Fix exception – database schema

The error message looks like below:

Upgrade [SPContentDatabase Name=SP16_DEV_Content_Portal] failed. (EventID:an59t)Upgrade [SPContentDatabase Name=SP16_DEV_Content_Portal] failed. (EventID:an59t)
Exception: The upgraded database schema doesn't match the TargetSchema (EventID:an59t)
      (EventID:an59t)
Upgrade Timer job is exiting due to exception: Microsoft.SharePoint.Upgrade.SPUpgradeException: The upgraded database schema doesn't match the TargetSchema

This one is very simple to fix by following the steps below:

  1. On the ‘app’ server, run SharePoint 2016 Management Shell
  2. Use the following PowerShell cmdlet
    Get-SPContentDatabase | Upgrade-SPContentDatabase
  3. You will be asked to confirm
    Confirm
    Are you sure you want to perform this action?
    Performing the operation "Upgrade-SPContentDatabase" on target "SP16_DEV_Content_Portal".
    [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):
  4. a. Type in Y and press Enter if you want to confirm before upgrade every single content databases. This also gives you a chance to find out the content databases you have on the farm if you didn’t know already.
    b. Type in A and press Enter, to upgrade all content databases.
    I recommend you do upgrade all as when I chose to only upgrade the portal and ran into the same error with another content database.
    You will see a message when the upgrade is complete.

Now, after fixing the issues, we can rerun the SharePoint 2016 Products Configuration Wizard to see if it let us pass this time.

Note: I removed some missing features and upgraded content databases, however, the SharePoint 2016 Products Configuration Wizard is still complaining about a missing feature (Power View Integration Feature). I ignored it and tried to install SSRS again and succeed. I guess the missing features are not so critical in this install then.

References

A big Thank You to a lot of smart and caring people who shared their findings on the web! My reference articles are as below:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s