Category Archives: SharePoint 2013

microsoft word web app can't open this document

microsoft word web app can’t open this document

Advertisements
Advertisements

There was an issue in microsoft word web app can't open this document "Sorry,we can't open this document because there was a problem talking to the service"

Farm Information:

  • Web Application published internally and externally (so make sure both URLs added to Alternate Access Mapping)
  • Office Web Apps 2013 (Published externally via TMG 2010 and internally)

I have a farm which connected to Office Web Apps 2013 and It's working fine internally so then we decided to enable it to open Office Web Apps externally by the following steps :

1- In Office Web Apps Server , Open Power Shell and run this command to add the External URL to existing Farm:

Set-OfficeWebAppsFarm -ExternalURL http://test.com/

OfficeWebApp2013

2-In SharePoint Server , Open SharePoint 2013 Management Shell and run the following commands:

Remove-SPWOPIBinding –All:$true

New-SPWOPIBinding -ServerName OfficeWebAppServer.com -AllowHTTP
Set-SPWopiZone internal-http
$c = Get-SPSecurityTokenServiceConfig
$c.AllowOAuthOverHttp = $true
$c.Update()

then when I tried to access the Office documents from External URL I got the following error :

"Sorry,we can't open this document because there was a problem talking to the service"

microsoft word web app can't open this document

  • This issue related to TMG publishing rule so to fix it :
  • Open TMG Management Console
  • Go to Publish rule for Office Web Apps
  • Right click on the rule and choose Configure HTTP
  • Uncheck  Verify Normalization
  • Click ok
  •  Click Apply
  •  Wait the sync process

OfficeWebApp2013_2

Ref:

http://technet.microsoft.com/en-us/library/jj204665.aspx

http://blogs.technet.com/b/dodeitte/archive/2013/11/10/issue-with-office-web-apps-server-2013-published-externally-using-tmg-2010.aspx

Advertisements
Advertisements
Advertisements
Patching SharePoint Server 2013

Patching SharePoint Server 2013 step by step

Patching SharePoint Server 2013 step by step

Patching SharePoint server 2013 is one of the most difficult task that everyone want to know how to implement step by step. Watching this video, you will feel like its very easy to implement, but truly its equally risky. So careful while implementing the steps. Watch the below video for details. SharePoint 2013 patching best practices is followed here also how to run psconfig (sharepoint configuration wizard steps) after patching is shown in the video.

  • Download the KB   (sharepoint 2013 cumulative update/Patch download link)from the URL as shown in the video.
Patching SharePoint
  • Extract files after download and you will find 3 files of extension “.exe , .cab, .cab”.
Patch 1321x705
Advertisements
Advertisements
  • Copy this below code to notepad and save as in “.ps 1”
########################### 
##Ensure Patch is Present## 
########################### 
$patchfile = Get-ChildItem | where{$_.Extension -eq ".exe"}
if($patchfile -eq $null)
{
  Write-Host "Unable to retrieve the file.  Exiting Script" -ForegroundColor Red
  Return
}

######################## 
##Stop Search Services## 
######################## 
##Checking Search services##
$srchctr = 1
$srch4srvctr = 1
$srch5srvctr = 1
$srv4 = get-service "OSearch15"
$srv5 = get-service "SPSearchHostController"

If(($srv4.status -eq "Running") -or ($srv5.status-eq "Running"))
  {
    Write-Host "Choose 1 to Pause Search Service Application" -ForegroundColor Cyan
    Write-Host "Choose 2 to leave Search Service Application running" -ForegroundColor Cyan
    $searchappresult = Read-Host "Press 1 or 2 and hit enter"
    Write-Host
   
   if($searchappresult -eq 1)
    {
        $srchctr = 2
        Write-Host "Pausing the Search Service Application" -foregroundcolor yellow
        Write-Host "This could take a few minutes" -ForegroundColor Yellow
        $ssa = get-spenterprisesearchserviceapplication
        $ssa.pause()
    }

    elseif($searchappresult -eq 2)
    {
        Write-Host "Continuing without pausing the Search Service Application"
    }
    else
    {
        Write-Host "Run the script again and choose option 1 or 2" -ForegroundColor Red
        Write-Host "Exiting Script" -ForegroundColor Red
        Return
    }
  }

Write-Host "Stopping Search Services if they are running" -foregroundcolor yellow
if($srv4.status -eq "Running")
  {
    $srch4srvctr = 2
    set-service -Name "OSearch15" -startuptype Disabled
    $srv4.stop()
  }

if($srv5.status -eq "Running")
  {
    $srch5srvctr = 2
    Set-service "SPSearchHostController" -startuptype Disabled
    $srv5.stop()
  }

do
  {
    $srv6 = get-service "SPSearchHostController"
    if($srv6.status -eq "Stopped")
    {
        $yes = 1
    }
    Start-Sleep -seconds 10
  }
  until ($yes -eq 1)

Write-Host "Search Services are stopped" -foregroundcolor Green
Write-Host 

####################### 
##Stop Other Services## 
####################### 
Set-Service -Name "IISADMIN" -startuptype Disabled
Set-Service -Name "SPTimerV4" -startuptype Disabled
Write-Host "Gracefully stopping IIS W3WP Processes" -foregroundcolor yellow
Write-Host
iisreset -stop -noforce
Write-Host "Stopping Services" -foregroundcolor yellow
Write-Host
$srv2 = get-service "SPTimerV4"
  if($srv2.status -eq "Running")
  {$srv2.stop()}

Write-Host "Services are Stopped" -ForegroundColor Green
Write-Host
Write-Host 

################## 
##Start patching## 
################## 
Write-Host "Patching now keep this PowerShell window open" -ForegroundColor Magenta
Write-Host
$starttime = Get-Date
$filename = $patchfile.basename
Start-Process $filename
Start-Sleep -seconds 20 
$proc = get-process $filename
$proc.WaitForExit()
$finishtime = get-date
Write-Host
Write-Host "Patch installation complete" -foregroundcolor green
Write-Host 

################## 
##Start Services## 
################## 
Write-Host "Starting Services Backup" -foregroundcolor yellow
Set-Service -Name "SPTimerV4" -startuptype Automatic
Set-Service -Name "IISADMIN" -startuptype Automatic

##Grabbing local server and starting services##
$servername = hostname
$server = get-spserver $servername

$srv2 = get-service "SPTimerV4"
$srv2.start()
$srv3 = get-service "IISADMIN"
$srv3.start()
$srv4 = get-service "OSearch15"
$srv5 = get-service "SPSearchHostController"

###Ensuring Search Services were stopped by script before Starting"
if($srch4srvctr -eq 2)
{
    set-service -Name "OSearch15" -startuptype Automatic
    $srv4.start()
}
if($srch5srvctr -eq 2)
{
    Set-service "SPSearchHostController" -startuptype Automatic
    $srv5.start()
}

###Resuming Search Service Application if paused### 
if($srchctr -eq 2)
{
    Write-Host "Resuming the Search Service Application" -foregroundcolor yellow
    $ssa = get-spenterprisesearchserviceapplication
    $ssa.resume()
}

Write-Host "Services are Started" -foregroundcolor green
Write-Host
Write-Host
Write-Host "Script Duration" -foregroundcolor yellow
Write-Host "Started: " $starttime -foregroundcolor yellow
Write-Host "Finished: " $finishtime -foregroundcolor yellow
Write-Host "Script Complete"
  • Save all files that is of extensions “.exe , .cab, .cab, .ps 1” in one folder.
Patching SharePoint Server
  • Open “SharePoint Management Shell”.
  • Navigate to the folder in which all files are stored and run the Powershell script.
  • Next step is to run the config wizard. Please find the video in detail step by step further.

how to run sharepoint configuration wizard steps (psconfig)

Advertisements
Advertisements
Start Service Application Proxy 1920x1080

Start Service Application Proxy using powershell

Advertisements
Advertisements

Start Service Application Proxy using powershell

If your Usage and Health Data Collection Proxy is in a stopped state here is a quick bit of PowerShell to to Start Service Application Proxy :

$sap = Get-SPServiceApplicationProxy | where-object {$_.TypeName -eq “Usage and Health Data Collection Proxy”}
$sap.Provision()

The above can easily be adapted to allow you to start any Service Application Proxy

Patching SharePoint Server 2013

Patching SharePoint Server 2013 step by step

Advertisements

Advertisements

Patching SharePoint Server 2013

Patching SharePoint server 2013 is one of the most difficult task that everyone want to know how to implement step by step. Watching this video, you will feel like its very easy to implement, but truly its equally risky. So careful while implementing the steps. Watch the below video for details.

      1. Download the KB from the URL as shown in the video.Patching SharePoint
      2. Extract files after download and you will find 3 files of extension ".exe , .cab, .cab".Patch 1321x705
      3. Copy this below code to notepad and save as ".ps 1" ###########################
        ##Ensure Patch is Present##
        ###########################
        $patchfile = Get-ChildItem | where{$_.Extension -eq ".exe"}
        if($patchfile -eq $null)
        {
        Write-Host "Unable to retrieve the file. Exiting Script" -ForegroundColor Red
        Return
        }########################
        ##Stop Search Services##
        ########################
        ##Checking Search services##
        $srchctr = 1
        $srch4srvctr = 1
        $srch5srvctr = 1$srv4 = get-service "OSearch15"
        $srv5 = get-service "SPSearchHostController"If(($srv4.status -eq "Running") -or ($srv5.status-eq "Running"))
        {
        Write-Host "Choose 1 to Pause Search Service Application" -ForegroundColor Cyan
        Write-Host "Choose 2 to leave Search Service Application running" -ForegroundColor Cyan
        $searchappresult = Read-Host "Press 1 or 2 and hit enter"
        Write-Hostif($searchappresult -eq 1)
        {
        $srchctr = 2
        Write-Host "Pausing the Search Service Application" -foregroundcolor yellow
        Write-Host "This could take a few minutes" -ForegroundColor Yellow
        $ssa = get-spenterprisesearchserviceapplication
        $ssa.pause()
        }elseif($searchappresult -eq 2)
        {
        Write-Host "Continuing without pausing the Search Service Application"
        }
        else
        {
        Write-Host "Run the script again and choose option 1 or 2" -ForegroundColor Red
        Write-Host "Exiting Script" -ForegroundColor Red
        Return
        }
        }

        Write-Host "Stopping Search Services if they are running" -foregroundcolor yellow
        if($srv4.status -eq "Running")
        {
        $srch4srvctr = 2
        set-service -Name "OSearch15" -startuptype Disabled
        $srv4.stop()
        }

        if($srv5.status -eq "Running")
        {
        $srch5srvctr = 2
        Set-service "SPSearchHostController" -startuptype Disabled
        $srv5.stop()
        }

        do
        {
        $srv6 = get-service "SPSearchHostController"
        if($srv6.status -eq "Stopped")
        {
        $yes = 1
        }
        Start-Sleep -seconds 10
        }
        until ($yes -eq 1)

        Write-Host "Search Services are stopped" -foregroundcolor Green
        Write-Host

        #######################
        ##Stop Other Services##
        #######################
        Set-Service -Name "IISADMIN" -startuptype Disabled
        Set-Service -Name "SPTimerV4" -startuptype Disabled
        Write-Host "Gracefully stopping IIS W3WP Processes" -foregroundcolor yellow
        Write-Host
        iisreset -stop -noforce
        Write-Host "Stopping Services" -foregroundcolor yellow
        Write-Host

        $srv2 = get-service "SPTimerV4"
        if($srv2.status -eq "Running")
        {$srv2.stop()}

        Write-Host "Services are Stopped" -ForegroundColor Green
        Write-Host
        Write-Host

        ##################
        ##Start patching##
        ##################
        Write-Host "Patching now keep this PowerShell window open" -ForegroundColor Magenta
        Write-Host
        $starttime = Get-Date

        $filename = $patchfile.basename

        Start-Process $filename

        Start-Sleep -seconds 20
        $proc = get-process $filename
        $proc.WaitForExit()

        $finishtime = get-date
        Write-Host
        Write-Host "Patch installation complete" -foregroundcolor green
        Write-Host

        ##################
        ##Start Services##
        ##################
        Write-Host "Starting Services Backup" -foregroundcolor yellow
        Set-Service -Name "SPTimerV4" -startuptype Automatic
        Set-Service -Name "IISADMIN" -startuptype Automatic

        ##Grabbing local server and starting services##
        $servername = hostname
        $server = get-spserver $servername

        $srv2 = get-service "SPTimerV4"
        $srv2.start()
        $srv3 = get-service "IISADMIN"
        $srv3.start()
        $srv4 = get-service "OSearch15"
        $srv5 = get-service "SPSearchHostController"

        ###Ensuring Search Services were stopped by script before Starting"
        if($srch4srvctr -eq 2)
        {
        set-service -Name "OSearch15" -startuptype Automatic
        $srv4.start()
        }
        if($srch5srvctr -eq 2)
        {
        Set-service "SPSearchHostController" -startuptype Automatic
        $srv5.start()
        }

        ###Resuming Search Service Application if paused###
        if($srchctr -eq 2)
        {
        Write-Host "Resuming the Search Service Application" -foregroundcolor yellow
        $ssa = get-spenterprisesearchserviceapplication
        $ssa.resume()
        }

        Write-Host "Services are Started" -foregroundcolor green
        Write-Host
        Write-Host
        Write-Host "Script Duration" -foregroundcolor yellow
        Write-Host "Started: " $starttime -foregroundcolor yellow
        Write-Host "Finished: " $finishtime -foregroundcolor yellow
        Write-Host "Script Complete"

      4. Save all files that is of extensions ".exe , .cab, .cab, .ps 1" in one folder.Patching SharePoint
      5. Open "SharePoint Management Shell".
      6. Navigate to the folder in which all files are stored and run the Powershell script.
      7. Next step is to run the config wizard. Please find the video in detail step by step further.

 

 

Advertisements

Advertisements

SharePoint search crawl properties storage locations

SharePoint search crawl properties storage locations

Advertisements

Advertisements

SharePoint search crawl properties storage locations

Here we will discuss about SharePoint search crawl properties storage locations. When gathering files from a content source, the SharePoint 2013 Crawl Component can be very I/O intensive process – locally writing all of the files it gathers from content repositories to its to temporary file paths and having them read by the Content Processing Component during document parsing. This post can help you understand where the Crawl Components write temporary files, which can help in planning and performance troubleshooting (e.g. Why does disk performance of my C:\ drive get so bad – or worse, fill up – when I start a large crawl?)

By default, all Search data files will be written within the Installation Path

  • The Data Directory (by default, a sub-directory of the Installation Path) specifies the path for all Search data files including those used by I/O intensive components (Crawl, Analytics, and Index Components)
    • The Data Directory can only be configured at the time of Installation (e.g. it can only be changed if uninstalling/re-installing SharePoint on the given server)
      • From the Installation Wizard, choose the “File Location” tab as seen below
      • IMPORTANT: Before uninstalling SharePoint, first modify your Search topology by removing any Search components from the applicable server. Once SharePoint is re-installed, you can once again deploy the components back to this server.
    • The defined path can be viewed in the registry:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\15.0\Search\Setup\DataDirectory

    • Advanced Note: The Index files (by default, written to the Data Directory) path can be configured separately when provisioning an Index Component via PowerShell using the “RootDirectory” parameter

3175.installAndDataPath
(As a side note: the graphic is only intended to display the default locations specified at install time. It is recommended to change these to a file path other than C:\ drive)

For the Crawl Component:

  • When crawling [gathering] an item, the filter daemon (mssdmn.exe – a child process of the Crawl Component that actually interfaces with an end content repository using a Search Connector/Protocol Handler) will download any applicable file blobs to the SSA’s “TempPath” (e.g. an HTML file, a Word document, a PowerPoint presentation, etc)
    • In the graphic below, this is step 2a
    • The defined path can be viewed either:
      • In the registry (of a Crawl server)

        HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\15.0\Search\Global\Gathering Manager\TempPath

      • Or as a property of the SSA:

        $SSA = Get-SPEnterpriseSearchServiceApplication

        $SSA.TempPath

  • When the filter daemon completes the gathering of an item, it is returned to the Gathering Manager (mssearch.exe – responsible for orchestrating a crawl of a given item) and the applicable blob is moved to the “GathererDataPath“, which is a path relative to the DataDirectory mentioned above.
    • In the graphic below, this occurs in step 2b
    • The defined path can be viewed in the registry (of a Crawl server):

      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\15.0\Search\Components\-GUID-of-theSSA-crawl-0\GathererDataPath

  • The GathererDataPath is mapped as a network share (used by the Content Processing Components)
    • The shared path can be viewed in the registry (of a Crawl server):

      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\15.0\Search\Components\-GUID-of-theSSA-crawl-0\GathererDataShare

8233.crawlFlow
Usage by the Content Processing Components:

  • When the item is fed from the Crawler to the Content Processing Component (step 3 above), the item is only logically submitted to the CPC in a serialized payload of properties that represent that particular item – any related blob would remain on the Crawler and retrieved by a later stage in the processing flow
    • For SharePoint list items, there would typically not be a blob (unless the list item had an attachment)
    • For a document in a SharePoint library, the blob would represent the item’s associated file (such as a Word document)
  • During the Document Parsing stage in the processing flow (e.g. during step 4 above), the item’s blob will be retrieved from the Crawl Component via the GathererDataShare
  • When the Crawl Component receives a callback (success or failure) from the CPC (e.g. in step 6b above after an item has been processed), the temporary blob is then deleted from the GathererDataPath

1373.gathererDataShare
An example path to an item with DocID 933112 would look like the following:

file://crawlSrv/gthrsvc_7ecdbb10-3c86-4298-ab09-04f61aaeb636-crawl-0//f8/0xe3cf8_1.aspx   

#0xe3cf8 hex = 933112 decimal

Where:

  • crawlerSrv is a server running a crawl component
  • gthrsvc_-GUID-of-theSearchAdminWebServiceApp--crawl-0 is the name of the crawl component
    • This GUID can be identified using the following PowerShell:

      $SSA = Get-SPEnterpriseSearchServiceApplication

      $searchAdminWeb = Get-SPServiceApplication –Name $SSA.id

      $searchAdminWeb.id

      7ecdbb10-3c86-4298-ab09-04f61aaeb636

  • And the file name is actually re-named to the hex value of the docID
    • For example: 0xe3cf8 hex = 933112 decimal
    • Which we can see in ULS, such as:
      • From the Crawl Component (in this case, running on server “faceman”):

        mssearch.exe     SharePoint Server Search Crawler:Content Plugin      af7zf VerboseEx

        CTSDocument: FeedingDocument: properties : strDocID = ssic://933112 key = path values =\\FACEMAN\gthrsvc_7ecdbb10-3c86-4298-ab09-04f61aaeb636-crawl-0\\f8\0xe3cf8.aspx 

      • From the Content Processing Component:

        NodeRunnerContent2-834ebb1f-009    Search    Document Parsing      ai3ef VerboseEx

        AttachDocParser – Parsing: ‘file://faceman/gthrsvc_7ecdbb10-3c86-4298-ab09-04f61aaeb636-crawl-0//f8/0xe3cf8.aspx’

Advertisements

Advertisements