Summary
I worked on a long running RBS case where the customer followed the steps in our TechNet Article , which resulted in SharePoint throwing an the following error while uploading files to a document library, after enabling RBS.
1 2 3 4 5 6 7 8 |
<span style="font-family: Consolas;font-size: 8pt">w3wp.exe (0x0EF0) 0x24E4 SharePoint Foundation Runtime tkau Unexpected</span> <span style="font-family: Consolas;font-size: 8pt">System.Runtime.InteropServices.COMException: <span style="background-color: yellow">The URL 'Shared Documents/document1.docx' is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.</span></span> <span style="font-family: Consolas;font-size: 8pt"> at Microsoft.SharePoint.Library.SPRequestInternalClass.PutFile(String bstrUrl, String bstrWebRelativeUrl, Object punkFile, Int64 cbFile, Object punkSPFileMgr, Object punkFFM, Int64 PutFileOpt, String bstrCreatedBy, String bstrModifiedBy, Int32 iCreatedByID, Int32 iModifiedByID, Object varTimeCreated, Object varTimeLastModified, Object varProperties, String bstrCheckinComment, String bstrLockIdMatch, String bstEtagToMatch, Int32 lockType, String lockId, Int32 minutes, Int32 fRefreshLock, Int32 bValidateReqFields, Guid gNewDocId, SPFileSaveParams sfsp, SPFileInfo& pFileProps, UInt32& pdwVirusCheckStatus, String& pVirusCheckMessage, String& pEtagReturn, Byte& piLevel, Int32& pbIgnoredReqProps)</span> <span style="font-family: Consolas;font-size: 8pt"> at Microsoft.SharePoint.Library.SPRequest.PutFile(String bstrUrl, String bstrWebRelativeUrl, Object punkFile, Int64 cbFile, Object punkSPFileMgr, Object punkFFM, Int64 PutFileOpt, String bstrCreatedBy, String bstrModifiedBy, Int32 iCreatedByID, Int32 iModifiedByID, Object varTimeCreated, Object varTimeLastModified, Object varProperties, String bstrCheckinComment, String bstrLockIdMatch, String bstEtagToMatch, Int32 lockType, String lockId, Int32 minutes, Int32 fRefreshLock, Int32 bValidateReqFields, Guid gNewDocId, SPFileSaveParams sfsp, SPFileInfo& pFileProps, UInt32& pdwVirusCheckStatus, String& pVirusCheckMessage, String& pEtagReturn, Byte& piLevel, Int32& pbIgnoredReqProps) </span> |
While working on this issue, I learned many ways to troubleshoot RBS installation and configuration issues and I wanted to share.
Overview
First, there are many steps to install and configure RBS and the best Microsoft sources are the following articles.
Overview of RBS in SharePoint 2013
https://technet.microsoft.com/en-us/library/ee748649.aspx
Install and configure RBS with FILESTREAM in a SharePoint 2013 farm
https://technet.microsoft.com/en-us/library/ee748631.aspx
Install and configure RBS with SharePoint 2013 and SQL Server 2012
https://blogs.technet.microsoft.com/bogdang/2014/12/04/install-and-configure-rbs-with-sharepoint-2013-and-sql-server-2012
At a high level, the steps are:
- Enable FILESTREAM on the database server
- Provision a BLOB store for each content database
- Install the RBS client library on each Web server < – This is where my customer had problems.
- Enable RBS for each content database
- Assign db_owner permissions to the web application
Sounds easy enough? However, when things don’t go as planned, here are a few tips.
Troubleshooting
1. Installing the correct RBS client is key. Ensure to install the RBS client that matches the SQL server version.
Here is a current list of SQL feature packs:
SQL 2008 R2
RTM: https://www.microsoft.com/en-us/download/details.aspx?id=16978
SP1: https://www.microsoft.com/en-us/download/details.aspx?id=26728
Sp2: https://www.microsoft.com/en-us/download/details.aspx?id=30440
Sp3: https://www.microsoft.com/en-us/download/details.aspx?id=44272
SQL 2012
RTM: https://www.microsoft.com/en-us/download/details.aspx?id=29065
SP1: https://www.microsoft.com/en-us/download/details.aspx?id=35580
SP2: https://www.microsoft.com/en-us/download/details.aspx?id=43339
SP3: https://www.microsoft.com/en-us/download/details.aspx?id=49999
SQL 2014
RTM: https://www.microsoft.com/en-us/download/details.aspx?id=42295
SP1: https://www.microsoft.com/en-us/download/details.aspx?id=46696
SP2: https://www.microsoft.com/en-us/download/details.aspx?id=53164
SQL 2016:
RTM: https://www.microsoft.com/en-us/download/details.aspx?id=52676
SP1: https://www.microsoft.com/en-us/download/details.aspx?id=54279
Note: You only need the RBS.MSI file (x86 | x64) from the feature pack.
2. You must install the RBS client with the command line, as it only installs what is needed and with a pre-defined configuration.
When installing RBS on the first client, this command only needs to be run once.
1 2 |
<span style="font-family: Courier New">msiexec /qn /lvx* rbs_install_log.txt /i RBS.msi TRUSTSERVERCERTIFICATE=true FILEGROUP=PRIMARY DBNAME="WSS_Content" DBINSTANCE="DBInstanceName" FILESTREAMFILEGROUP=RBSFilestreamProvider FILESTREAMSTORENAME=FilestreamProvider_1 </span> |
The remaining servers will use a slightly different command.
1 2 |
<span style="font-family: Courier New">msiexec /qn /lvx* rbs_install_log.txt /i RBS.msi DBNAME="WSS_Content" DBINSTANCE="DBInstanceName" ADDLOCAL=Client,Docs,Maintainer,ServerScript,FilestreamClient,FilestreamServer </span> |
Note: The differences is that on the first server, you are creating the FileStreamFileGroup and FileStreamStore , the remaining WFEs will be clients that connect to the existing configuration.
3. After installing the client with command line, reading the install log is required. If there are any errors during the install, it needs to be addressed before moving on, and reading the log file is the only way to confirm if the install was successful.
The log will be in the same folder as the MSI is located.
Look for the following to indicate success:
1 2 |
<span style="font-family: Courier New">MSI (s) (6C:A4) [15:45:50:262]: Windows Installer installed the product. Product Name: Microsoft SQL Server 2014 Remote BLOB Store. Product Version: 12.2.5000.0. Product Language: 1033. Manufacturer: Microsoft Corporation. <span style="background-color: yellow">Installation success or error status: 0.</span> </span> |
4. When enabling RBS for each content database, you may receive the error “SQL remote blob storage must be installed on each web front end server and on the content database before it may be used.”.
Command to enable:
1 2 3 4 5 6 7 |
<span style="font-family: Lucida Console;font-size: 9pt"><span style="color: orangered">$cdb </span><span style="color: darkgray">= </span><span style="color: blue">Get-SPContentDatabase </span><span style="color: darkgray"><<span style="color: blueviolet">ContentDatabaseName> </span></span></span><span style="font-family: Lucida Console;font-size: 9pt"><span style="color: orangered">$rbss </span><span style="color: darkgray">= </span><span style="color: orangered">$cdb<span style="color: darkgray">.</span>RemoteBlobStorageSettings</span> </span><span style="font-family: Lucida Console;font-size: 9pt"><span style="color: orangered">$rbss<span style="color: darkgray">.</span>Installed()</span> </span><span style="font-family: Lucida Console;font-size: 9pt"><span style="color: orangered">$rbss<span style="color: darkgray">.</span>Enable()</span> </span><span style="color: orangered;font-family: Lucida Console;font-size: 9pt">$rbss<span style="color: darkgray">.</span>SetActiveProviderName($rbss<span style="color: darkgray">.</span>GetProviderNames()<span style="color: darkgray">[<span style="color: purple">0<span style="color: darkgray">]</span>)</span> </span></span><span style="color: orangered;font-family: Lucida Console;font-size: 9pt">$rbss </span> |
Example of error:
1 2 3 4 5 6 7 8 |
Exception calling "Enable" with "0" argument(s): "<span style="color: red">SQL remote blob storage must</span> <span style="color: red">be installed on each web front end server and on the content database before</span> <span style="color: red">it may be used."</span> At line:1 char:1 + $rbss.Enable() + ~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : InvalidOperationException |
If this occurs, there was a problem with the client one or more WFES, or the server(s) needs to be rebooted.
Check the RBS client install log on all WFEs. If they look good, reboot them and try the enable again.
If you see errors in the install log, the client may need to be uninstalled and reinstalled (not updated).
5. Once everything is installed and “should be working” but it’s not, check the “verbose” ULS Logs when attempting to upload a fie. In verbose mode, you will see log entries with the “Files” category detailing why the upload failed.
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<span style="font-family: Consolas;font-size: 8pt">w3wp.exe (0x1518) 0x274C SharePoint Foundation Files aer55 Verbose </span><span style="font-family: Consolas;font-size: 8pt">SPFileStream at ComputeStreamsToWrite: [<span style="background-color: yellow">Url=Shared Documents/Document1.docx</span>] [StreamSize=1049038] [DocId=cc8bbe09-8ca3-481c-9a54-6bca8b061cf1] [Partition=0] [HistVer=0] [Level=Published] [ContentVer=0] [NextBSN=100] [SourceSchema=StreamBlobVirtual] </span><span style="font-family: Consolas;font-size: 8pt">w3wp.exe (0x1518) 0x274C SharePoint Foundation Files 9j7o Medium </span><span style="font-family: Consolas;font-size: 8pt"><span style="background-color: yellow">Exception thrown storing stream in new SqlRemoteBlob: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Data.SqlRemoteBlobs.RemoteBlobConfigurationException</span>: <span style="background-color: lime">No provider of type <Filestream> found</span>. Check the server configuration or install the provider on the client. </span><span style="font-family: Consolas;font-size: 8pt">at Microsoft.Data.SqlRemoteBlobs.<span style="background-color: aqua">ProviderSession.Connect()</span> </span><span style="font-family: Consolas;font-size: 8pt">at Microsoft.Data.SqlRemoteBlobs.RemoteBlobCommand.ExecuteInternal() </span><span style="font-family: Consolas;font-size: 8pt">at Microsoft.Data.SqlRemoteBlobs.RemoteBlobCommand.Execute() </span><span style="font-family: Consolas;font-size: 8pt">at Microsoft.Data.SqlRemoteBlobs.SqlRemoteBlob.WriteFromStream(Stream inStream) </span><span style="font-family: Consolas;font-size: 8pt">--- End of inner exception stack trace --- </span><span style="font-family: Consolas;font-size: 8pt">at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) </span><span style="font-family: Consolas;font-size: 8pt">at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) </span><span style="font-family: Consolas;font-size: 8pt">at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) </span><span style="font-family: Consolas;font-size: 8pt">at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) </span><span style="font-size: 8pt"><span style="font-family: Consolas">at Microsoft.SharePoint.SqlRemoteBlobSession.StoreStreamInBlob(Int32 collectionId, String providerName, Stream stream</span>) </span> |
- This is an RBS client issue or configuration issue.
- The client is not installed correctly
- The files steam was entered incorrectly while installing the first client.
- There are a few things to check to ensure the client in installed properly
6. Ensure the proper version is installed that matches the SQL version and service pack level.
- Ensure that the client assemblies were installed in the GAC properly. Ref: https://blogs.msdn.microsoft.com/sqlrbs/2010/09/23/fixing-rbsprovider-version-mismatch-issues
- Ensure that the proper machine.config has been updated with the following 2 sections for the RBS client.Note: If these entries are not present in the machine.config, the error “No provider of type <Filestream> found” will be present.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<span style="font-family: Courier New;font-size: 8pt"></sectionGroup> </span><span style="font-family: Courier New;font-size: 8pt"><sectionGroup name="RemoteBlobStorage" type="System.Configuration.ConfigurationSectionGroup, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" > </span><span style="font-family: Courier New;font-size: 8pt"><section name="InstalledVersions" type="System.Configuration.AppSettingsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </span><span style="font-family: Courier New;font-size: 8pt"><section name="Logging" type="System.Configuration.AppSettingsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </span><span style="font-family: Courier New;font-size: 8pt"><sectionGroup name="Providers" type="System.Configuration.ConfigurationSectionGroup, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" > </span><span style="font-family: Courier New;font-size: 8pt"><section name="remotefilestream" type="System.Configuration.AppSettingsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /></span> <span style="font-family: Courier New;font-size: 8pt"><section name="filestream" type="System.Configuration.AppSettingsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </span><span style="font-family: Courier New;font-size: 8pt"></sectionGroup> </span><span style="font-family: Courier New;font-size: 8pt"><sectionGroup name="ProviderSpecificConfigKeys" type="System.Configuration.ConfigurationSectionGroup, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" > </span><span style="font-family: Courier New;font-size: 8pt"><section name="remotefilestream" type="System.Configuration.AppSettingsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </span><span style="font-family: Courier New;font-size: 8pt"><section name="filestream" type="System.Configuration.AppSettingsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /></span> <span style="font-family: Courier New;font-size: 8pt"></sectionGroup></span> <span style="font-family: Courier New;font-size: 8pt"></sectionGroup> </span> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
<span style="font-family: Courier New;font-size: 8pt"><RemoteBlobStorage> </span><span style="font-family: Courier New;font-size: 8pt"><Logging> </span><span style="font-family: Courier New;font-size: 8pt"><add key="EventViewerLog" value="4" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="FileLog" value="0" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="ConsoleLog" value="0" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="CircularLog" value="0" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="DatabaseTableLog" value="0" /> </span><span style="font-family: Courier New;font-size: 8pt"></Logging> </span><span style="font-family: Courier New;font-size: 8pt"><InstalledVersions> </span><span style="font-family: Courier New;font-size: 8pt"><add key="Count" value="2" /> </span><span style="font-family: Courier New;font-size: 8pt"></InstalledVersions> </span><span style="font-family: Courier New;font-size: 8pt"><Providers> </span><span style="font-family: Courier New;font-size: 8pt"><remotefilestream> </span><span style="font-family: Courier New;font-size: 8pt"><add key="BlobStoreType" value="RemoteFilestream" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="DllFile" value="C:\Program Files\Microsoft SQL Remote Blob Storage 12.0\Provider Libraries\Filestream Provider\\Microsoft.Data.BlobStores.FilestreamBlobStore.dll" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="ClassName" value="Microsoft.Data.BlobStores.FilestreamBlobStore.RemoteFilestreamStoreLibrary" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="ProviderVersion" value="1.0.0.0" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="MinSupportedBackEndStoreVersion" value="1.0.0.0" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="BlobStoreAbstractClassVersion" value="10.50.0.0" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="EnumerationOptimizationLevelImplemented" value="2" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="ConsistencyCheckLevelImplemented" value="2" /> </span><span style="font-family: Courier New;font-size: 8pt"></remotefilestream> </span><span style="font-family: Courier New;font-size: 8pt"> <filestream> </span><span style="font-family: Courier New;font-size: 8pt"><add key="BlobStoreType" value="Filestream" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="DllFile" value="C:\Program Files\Microsoft SQL Remote Blob Storage 12.0\Provider Libraries\Filestream Provider\\Microsoft.Data.BlobStores.FilestreamBlobStore.dll" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="ClassName" value="Microsoft.Data.BlobStores.FilestreamBlobStore.FilestreamStoreLibrary" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="ProviderVersion" value="1.0.0.0" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="MinSupportedBackEndStoreVersion" value="1.0.0.0" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="BlobStoreAbstractClassVersion" value="11.0.0.0" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="EnumerationOptimizationLevelImplemented" value="2" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="ConsistencyCheckLevelImplemented" value="2" /> </span><span style="font-family: Courier New;font-size: 8pt"></filestream> </span><span style="font-family: Courier New;font-size: 8pt"></Providers> </span><span style="font-family: Courier New;font-size: 8pt"><ProviderSpecificConfigKeys> </span><span style="font-family: Courier New;font-size: 8pt"><remotefilestream> </span><span style="font-family: Courier New;font-size: 8pt"><add key="schema_suffix" value="Name" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="max_size_inband_read" value="Number" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="tran_pool_size" value="Number" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="tran_pool_tran_lifetime" value="Duration" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="async_read_disabled" value="Boolean" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="filegroup_name" value="Name" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="data_filegroup_name" value="Name" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="max_pool_size" value="Number" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="max_size_inband_write" value="Number" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="max_size_inline_blob" value="Number" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="write_allocation_size" value="Number" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="async_write_disabled" value="Boolean" /> </span><span style="font-family: Courier New;font-size: 8pt"></remotefilestream> </span><span style="font-family: Courier New;font-size: 8pt"><filestream> </span><span style="font-family: Courier New;font-size: 8pt"><add key="schema_suffix" value="Name" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="max_size_inband_read" value="Number" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="tran_pool_size" value="Number" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="tran_pool_tran_lifetime" value="Duration" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="async_read_disabled" value="Boolean" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="filegroup_name" value="Name" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="data_filegroup_name" value="Name" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="max_pool_size" value="Number" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="max_size_inband_write" value="Number" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="max_size_inline_blob" value="Number" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="write_allocation_size" value="Number" /> </span><span style="font-family: Courier New;font-size: 8pt"><add key="async_write_disabled" value="Boolean" /> </span><span style="font-family: Courier New;font-size: 8pt"></filestream> </span><span style="font-family: Courier New;font-size: 8pt"></ProviderSpecificConfigKeys> </span><span style="font-family: Courier New;font-size: 8pt"></RemoteBlobStorage> </span> |
7. Lastly, read the Remote Blob Storage whitepaper, its excellent!
Remote Blob Storage
http://download.microsoft.com/download/9/5/2/9521D8DA-5D3C-4817-BB9D-B5B1BD293365/SQL_Server_2008_R2_Remote_Blob_Storage.docx