Showing posts with label OWA. Show all posts
Showing posts with label OWA. Show all posts

Tuesday 7 January 2014

Office Web App Common Problems & Fixes

There is now a article on WCA on Technet that includes troubleshooting.  Updated 30/04/2014.

Finding your issues: Office Web Apps (WCA) displays and error, without a correlation Id.  If you have a small WCA farm, you can trawl the WCA ULS logs using ULS eventviewer to find your issue.  However on a busy or large farm finding the ULS errors is tedious.  You can use IE development tools, fiddler or any tool provided you can find the correlation Id send in the response from the WCA server.

The screenshot below shows how to use fiddler to find a correlationId returned from the WCA server.  In the browser view the http response and find the "X-CorrelationId" property.

Tip: It is also worth verify the WCA farm is reachable and running using https://wcaservername/hosting/discovery

==========================================

Problem: When opening a work or pdf document I receive the following error popup "Sorry, there was a problem and we can't open this PDF. If this happens again, try opening the PDF in Microsoft Word.".
Initial Hypothesis:  WCA was working and pdf's were opening.  The error is similar to the error received when the networking is not correct (WCA machines can't access the SharePoint WFE's).  Opening the ULS logs on the WCA machines, I can see the following error message "WOPI CheckFile: Catch-All Failure [exception:Microsoft.Office.Web.Common.EnvironmentAdapters.UnexpectedErrorException: HttpRequest failed ---> Microsoft.Office.Web.Apps.Common.HttpRequestAsyncException: No Response in WebException ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 10.189.xx.15:443"   

Resolution:  My load balancer is not passing through the traffic from the WCA servers using https to the WFE's.  Fixed the loadbalance so https traffic is forwarded correctly.  The WCA servers need to speak to the WFE/SharePoint servers either on http or https depending on how the WCA farm is configured (SSL termination, with or without ssl are the 3 options).

===========================================

Problem:  Can't open any document in WCA and the WCA ULS is generating the following issue:
WOPI CheckFile: Catch-All Failure [exception:Microsoft.Office.Web.Common.EnvironmentAdapters.UnexpectedErrorException: HttpRequest failed ---> Microsoft.Office.Web.Apps.Common.HttpRequestAsyncException: No Response in WebException ---> System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.   

Initial Hypothesis:  On each specific WCA server, I try open the SharEPoint web Application i.e. https://www.demo.dev, the browser displays that the certificate has errors "Certificate error".  Opening up the certificate and the certificate chain looks correct.

Resolution:
1.> Run > MMC > File > Add snap-ins > Certificates > Add > Computer Account > Local Computer > Finish. OK.
2.> In the MMC console navigate to Certificates > Trusted Root Certificate Authorities > Certificates > (Right click) All Tasks > Import (both the Trust root and the intermidiary certificates required.
After adding the missing certificates, open the the browser and check the certificate.  Thank to David C for documenting and figuring out the issue is the certificate chain being used on the WCA servers.  Office web apps is working again.

===========================================

Problem: When Opening a word document I get the following error when Office Web Apps tries to render the document "There's a configuration problem preventing us from getting your document. If possible, try opening this document in Microsoft Word."

Initial Hypothesis: Check the ULS logs on the Web Front End (SharePoint Server) as this doesn't tell me much.  I found the following issue in my ULS:
WOPI (CheckFile) - Invalid Proof Signature for file SandPit Environment Setup.docx url: http://web-sp2013-uat.demo.dev/Docs/_vti_bin/wopi.ashx/files/6d0f38c0d5554c87a655558da9cedcad?access_token...
Resolution: Run the following PS> Update-SPWOPIProofKey -ServerName "wca-uat.demo.dev"

More Info:
http://technet.microsoft.com/en-us/library/jj219460.aspx

===========================================

Problem:  When opening a docx file using WCA (Office Web Apps) I get the following error mes: "Sorry, there was a problem and we can't open this document. If this happens again, try opening the document in Microsoft Word."
I then tried to open an excel document and got the error: "We couldn't find the file you wanted.
It's possible the file was renamed, moved or deleted."

Initial Hypothesis: Checked the ULS logs on the only OWA server and found this unexpected error:
 HttpRequestAsync, (WOPICheckFile,WACSERVER) no response [WebExceptionStatus:ConnectFailure, url:http://webuat.demo.dev/_vti_bin/wopi.ashx/...
This appears to be a networking related issue, I have a NLB (KEMP) and I am using a wildcard certificate on the WCA adr with SSL termination.

Resolution:  The error message tells me that it can't get back to the SharePoint WFE servers from the OWA server.  The request from the WCA/OWA1 server back to the SP front end server is not done using https but http.  I have an issue as my nlb can't deal with traffic on port 80.
I add a host entry on my OWA1 server so that traffic to the SharePoint WFE goes directly to a server by IP and it works.  This means i don't have high availaibilty.  A NLB service dealing with the web application on port 80 will fix my issue.

The OWA Server need to access the web app on port 80.  My NLB stopped all traffic on port 80.

==========================================

Problem:  The above issue was temporairly fixed by adding a host entry on the WCA1 server so that using the url of the web application on port 80 would direct the user back to WFE1.  I turned on WCA2 and WFE2 so I now have 2 SharePoint Web front ends & A 2 server WCA farm.  In my testing I have docs, doc and excel files.  From multiple locations I could open and edit the docx and doc files but opening the excel file gave me this issue: "Couldn't Open the Workbook
We're sorry. We couldn't open your workbook. You can try to open this file again, sometimes that helps."
 

Initial Hypothesis: Documents are cached and the internal balancing seemed to make word document available using office web apps.  I assume the requests are coming out the cache or from OWA that has the host entry.  I need to tell OWA where to go via a host entry or NLB entry.  Note: using a host entry won't make the OWA highly available/redunadant.  This is the same issue as mentioned in the problem above.

Resolution: I added a host entry to the WCA2 server, it points to the WFE1 machine.

==========================================

Problem: Opening docx or pptx files in Office Web Apps 2013 results in the error "Sorry, Word Web App ran into a problem opening this document. To view this document please open it in Microsoft Word."

 Resolution:  I don't like it but I had to remove the link to the WCA farm, rebuild the WCA farm and hoop SP2013 back to the WCA farm.  [sic].  Other documents were opening and I realised that my bindings were incorrect after I rebuilt.

============================
Problem: Can't open word, pdf, pptx or excel documents using Office Web Apps.  ULS on the OWA servers included these log messages: WOPI (CheckFile) - Invalid Proof Signature for file.  WOPI Proof: All WOPI Signature verification attempts failed.  WOPI Signature verification attempt failed with public key. 
Also found in the logs: "Error message from host: Verifying signature failed, host correlation" "
HttpRequestAsync (WOPICheckFile,WACSERVER), request failure [HttpResponseCode:NotFound, HttpResponseCodeDescription:Not Found, url:https://www.demo.dev/_vti_bin/wopi.ashx/files/8b07d55558955551beb5555bed545553?access_token=REDACTED_1014&access_token_ttl=1392256555993]"

Same issue ULS excerpt:  
Error message from host: Verifying signature failed, host correlation:
WOPI CheckFile: Catch-All Failure [exception:Microsoft.Office.Web.Common.EnvironmentAdapters.FileUnknownException: WOPI 404   
 at Microsoft.Office.Web.Apps.Common.WopiDocument.LogAndThrowWireException(HttpRequestAsyncResult result, HttpRequestAsyncException delayedException) 
 
FileUnknownException while loading the app.


Hypothesis: None, I can't understand why the SP and WCA farm are struggling to communicate.  I believe the cause is to do with the the load balancing/network changing [sic - maybe]. 

Resolution: Remove the link between the Sp farm and WCA
PS> Remove-SPWOPIBinding –All:$true
Connect SP to the WOPI farm
PS> $internalName = "wca.demo.dev"
PS> $internalZone = "internal-https"
PS> New-SPWOPIBinding -ServerName $internalName –AllowHTTP
PS> Set-SPWopiZone -zone $internalZone
 

==============================
 Problem: Intermitten requests are not returning the pdf/word documents.  Most requests are working and occasionally 1 request doesn't work.  Every 4th request tries to get the pdf to display on Office Web Apps for a few minutes without any error message and then stops trying and displays the message "Sorry, Word Web App can't open this ... document because the service is busy."

Initial Hypothesis:  Originally I thought it was only happening to pdfs but it is happening to word and pdf documents (I don't have excel docs in my system).  My monitoring software SolarWinds is badly configured on my OWA servers as the monitor is showing green, drining into the servers monitoring the 2 application monitors are failing.  The server should go amber if either of the 2 applications fail and in turn red after 5 minutes.  At this point I notice that I can't log onto my 4 OWA/WCA server.  Web request are not being returned.  I look at my KEMP load balancer and it says all 4 WCA servers are working, I notice the configuration is not on web requests but on ping (not right) and the NLB/KEMP is merely redirecting every 4th request to the broken server.

Resolution: 
  1. Reboot the broken server, once it comes up I can make http requests directly to http://wca.demo.dev/hosting/discovery the server: and it's all working again.
  2. SolarWinds monitoring is lousy - need to get it fixed
  3. Kemp hardware load balancing needs to be changed from checking the machine is on to rather checking each machine using a web request.




 

Tuesday 24 September 2013

Office Web App WCA - SSL confussion

Overview: Office web Apps (WCA) 2013 defaults to using https, this is a good position to take but SSL offloading may be needed or you may want to do testing without SSL.  In my case we are using KEMP for SSL termination and before the NLB's are in place I made some hard discoveries.

Options:
SSL, WCA wants to use SSL and has some confusing switches, they make sense eventually so to summerise: You have 3 options to install WCA with SP2013:
  • Not using SSL (not recommened),
  • SSL Certificates on the WCA servers
  • SSLOffloading (Hardware device such as an F5 or KEMP does the SSL decryption, this saves you distributing certs to the WCA servers but means that the traffic between the NLB and the servers is not encrypted.)
My Scenario and Resolution:
Basically I have 2 WCA servers that make up my Office web App farm.  I want to connect SharePoint 2013 to display/edit document via the web browser and I want the preview cabability that SharePoint search needs.  This post explains the situation "Not Using SSL". 

In my initial attemp at installing the WCA farm I selected the switch -SSLOffLoading, this makes the WCA farm accept http requests.  My issue was that other resources then made http requests that with a load balancer performing SSL termination in place is correct.  And here was the problem, when i open a word document it just waits.  I opened my IE developer toolbar and noticed the https request.  Below is how I rolled out of the issue to allow me to use http throughout (Don't do this in production).

Location of the ULS logs on the WCA VM's: C:\ProgramData\Microsoft\OfficeWebApps\Data\Logs\ULS
 
***********************************************************
 
This part of the post differs in that I explain how to use the "SSLOffloading scenario".
You need a load balancer such as F5 or Kemp with networking configured.
The big differences are:
Ensure the "WopiZone : internal-https"
Tip:  Watch the networking. 
Tip:  You can't use a wild card certificate if you use SSL termination on the load balance (it actually works if you only have 1 WCA VM in your farm).
 
Scenario: SharePoint 2013 farm (represents any WOPI client/consumer), this can be on http or https.  The WCA farm consists of 2 or more WCA dedicated VM's.
 
The diagram above shows of the clients browser will interact with the WOPI consumer namely SharePoint 2013 and it accesses the SSL based url for the WCA server.  So the request would go to https://wca.demo.dev.  The load balancer performs SSL termination and load balances to any WCA server on port 80 using session affinity.
 
Tip: I used a wildcard certificate in UAT that works in a load balanced scenario but rather go for the fully qualified certificate for the WCA https service. 
 
********************
 
Problem:  When I create a WCA farm (1VM) and connect SharePoint to use the WCA farm, office documents show correctly.  However when I have WCA multiple servers, I get a the error “[ServerError: Verifying signature failed]. [status:NotFound”.  In my  VM logs on the Office web app server (WCA ULS).

Initial Hypothesis: The error appears to be an issue with SSL, while routing around I found the following information on certificates: http://technet.microsoft.com/en-us/library/jj219435.aspx#certificate

·         The certificate must come from a trusted Certificate Authority and include the fully qualified domain name (FQDN) of your Office Web Apps Server farm in the SAN (Subject Alternative Name) field. (If the FQDN is not in the SAN when you try to use the certificate, the browser will either show security warnings or won’t process the response.)

·         The FQDN in the SAN field can’t begin with an asterisk (*).

Below is a view of our wildcard certificate of the SAN field:
 
What made this issue tough to track is that when I only have 1 WCA server, WCA displays my word document correctly.  This document is cached when I add the remaining servers however once the cache clears down I loose WCA functionality.
 
***********************************************************
Microsoft troubleshooting for WCA
 
***********************************************************
Tip:  A lot of issues around WCA involve networking.  It is useful to verify networking on the VM's.  I use host entries until I am ready to get the load balancing service working.  Note:  Ensure communication from WCA back to the SP WFE's.
 
 

Thursday 19 September 2013

WCA and SP2013 not displaying Office document

Problem: I have setup Office Web Apps (OWA/WAC) 2013 on Windows 2008 R2 and connected it to SP2013.  WAC appears to be working and the hookup from SP2013 went without a hitch.  I try open a word document in WAC and receive the error: "Sorry, there was a problem and we can't open this document. If this happens again, try opening the document in Microsoft Word."

Initial Hypothesis:  I can't find any errors in my event logs and in my ULS log on WAC (C:\ProgramData\Microsoft\OfficeWebApps\Data\Logs\ULS) I opened the latest log and looked for errors, I found couple of "Unexpected" errors that relate to my problem.  The error looks something like: "HttpRequestAsync, (WOPICheckFile,WACSERVER) no response [WebExceptionStatus:NameResolutionFailure, url:http://web-sp2013-uat.demo.dev/_vti_bin/wopi.ashx/files/ef71ad7d...."
...
WOPI CheckFile: Catch-All Failure [exception:Microsoft.Office.Web.Common.EnvironmentAdapters.UnexpectedErrorException: HttpRequest failed

I realised that my DNS entry to web-sp2013-uat.demo.dev is missing on my WAC servers, I added local host entries which corrected the error.

Resolution:  Ensure the DNS entry to the SP2013 web servers has permeated down to all WAC servers, I added a host entry to proof the fix however stick to using DNS as if the IP/resolving changes you would need to go to each OWA/WAC machine and correct the issue.

More Info:
http://wp.ahcheng.com/2013/07/07/office-web-app-with-sharepoint-sorry-there-was-a-problem-and-we-cant-open-this-document/
 

Tuesday 17 September 2013

OWA patch issue - Windows Update KB2592525 must be installed

I followed the Technet instruction to install OWA 2013 on Windows 2012 which are clear but did cause me to have this hiccup.

Problem:  After installing OWA 2013 binaries I try to create my new farm on Windows 2008 R2 using the PS cmd>New-OfficeWebAppsFarm –InternalURL "http://servername" –AllowHttp -EditingEnabled
I receive the following error: "New-OfficeWebAppsFarm : The operation failed. The server did not meet the following prerequisites: - Windows Update KB2592525 must be installed."

Initial Hypothesis: I have already installed the OWA pre-requisites and KB2592525 is part of the "Windows PowerShell 3.0" pre-requisite. 

Resolution: I downloaded the KB for Windows 2008 R2 and try install it.  It fails with the erro saying that the kb is not for this version of Windows (This update is not applicable to your computer).  So this failed now I'm getting rather irratated with Microsoft and the OWA install.  Failed, and I need to define a new problem.


Problem:  I can't install the download KB2592525.

Resolution: I found this post explaining how to fix my error "When you try to install Lync WAC server (Office wen apps server 2013) on Microsoft Windows server 2008 R2 SP1 you may have this error while installing KB2592525 required update (This update is not applicable to your computer)."


While routing arround my OWA Server, I noticed that the Windows Service "Office Web Apps" has not started.  It fails if you try start it.
 My event Viewer show the following error "The Farm settings are invalid...":
This is correct, the service only starts when the new OWA farm is created.
Note: The Windows Service "Office Web Apps" will only start once the New farm is created, not when the OWA binaries are installed. 

Monday 16 September 2013

OWA 2013 Installation Notes

Overview:  There are a lot of posts on the InterWeb about installing OWA/WCA 2013.  This post shows my experience while installing OWA/WCA 2013 on a 2 Windows Server farm using Windows 2008 R2.  The process involves 5 ligh level steps shown below:
  1. Install pre-requisites and Windows roles on all VM's to be WCA servers.
  2. Install the WCA binaries, Language packs and updates on all VM's to be WCA servers.
  3. Create the farm on the 1st WCA server.
  4. Join additional servers to the WCA farm.
  5. Join the SP2013 farm to the WCA farm (this step could also be Lync 2013 (pptx sharing) or Exchange 2013 (previews) or any custom WOPI host).
Notes:
  1. WCA 2013 does not require SQL database.
  2. WCA  2013 are now decoupled from SharePoint 2012.
  3. WCA 2013 farms need NLB server affinity.
  4. WCA 2013 integrates with SharePoint 2013, Lync Server 2013, and Exchange Server 2013.
  5. Install WCA on dedicated VM’s i.e. don’t install OWA on SharePoint, SQL or Domain Controller servers.
  6. Don’t Install Microsoft Office on the WCA VM’s.
  7. WCA 2013 installed in read-only mode is a free product (if you have editing you need licences).  "To enable users to edit (not just read) Office documents in a web browser, verify that you have the necessary editing licenses" from Technet and "Office Web Apps licensing offers two options:
    • View-only. By default, Office Web Apps is view-only. View-only functionality is provided for free.
    • Edit and view. You must purchase an editing license to use the editing features of Office Web Apps with SharePoint 2013. You enable editing when you create the Office Web Apps Server farm"
  8. The install of Office Web Apps 2013 with SP2013 is pretty easy, I have automated most steps.
  9. I have 2 VM's that make up my OWA farm.  It's pretty difficult to find hardware requirements for OWA 2013.  I have gone for 8CPU's, 16GB RAM, c drive is 90GB and D is 72GB on each VM.
  10. Create the WCA farm then on the SP2013 farm bind to the OWA farm.
  11. Location of the ULS logs on the WCA VM's: C:\ProgramData\Microsoft\OfficeWebApps\Data\Logs\ULS
  12. SharePoint's link to OWA/WCA is farm wide.  You can only have 1 OWA per farm.  So you can't use different WCA/OWA per web application and you can't specify to use OWA on 1 Web App but have it excluded from a different web app.  It's farm wide.  You can specify the default behaviour at a library level i.e. tell the browser to use "the default application" will then not use OAW to open the document.
  13. Individual file types can be excluded from opening using WCA.  E.g. PS>Remove-SPWOPIBinding –Application “Excel” at the SP2013 farm level.
  14. SSL, WCA wants to use SSL and has some confusing switches, they make sense eventually so to summerise:  You have 3 options to install WCA with SP2013:
    • No SSL (not recommened),
    • SSL Certificates on the WCA servers
    • SSLOffloading (Hardware device such as an F5 or KEMP does the SSL decryption, this saves you distributing certs to the WCA servers but means that the traffic between the NLB and the servers is not encrypted.)
Test your OWA farm install using IE: http://owa-uat.demo.dev/hosting/discovery.  A Web app Open Platform Interface (WOPI)-discovery XML file will open.

References/More Info:

http://blogs.msdn.com/b/uksharepoint/archive/2013/08/06/scripted-installation-of-sharepoint-2013-and-office-web-apps-server-from-the-field-part-4.aspx

http://blogs.technet.com/b/speschka/archive/2012/07/23/configuring-office-web-apps-in-sharepoint-2013.aspx

http://www.wictorwilen.se/office-web-apps-2013-securing-your-wac-farm

http://stevegoodyear.wordpress.com/sharepoint-2013-build-guide/office-web-apps-2013-server-install-and-configuration/

 http://www.sharepointdiary.com/2013/09/install-configure-office-web-apps-with-sharepoint-2013.html

Wednesday 7 December 2011

SharePoint Office Web Apps Cache Storage

Overview: Office Web App is used to work on word, power point and excel document without the need to have the client applications for each of these file types on the client machine. The documents are rendered in the browser for editing.
Problem: My default content database that is hosting my root site collection for the web application grows bigger than the 200GB recommended limit for a content database.

Initial Hypothesis: When a "rendition of the presentation" is available in the cache (stored in a content database) SharePoint will use the rendition to show the document. If there is no “document” in the cache, the appropriate service builds the “rendition”, displays it and adds it to the cache.

The cache is stored in the default content database. From Technet “Content databases also contain the Microsoft Office Web Apps cache, if Office Web Apps have been deployed. Only one cache is created per Web application. If multiple site collections that are stored in different content databases have Office Web Apps activated, they will all use the same cache. You can configure the size of cache, the expiration period, and the location.”
Resolution:
Database location for the OWA cache (a SharePoint content database). You can isolate the Office Web Apps cache from other content:
  • Create a separate content database, set it to contain only one site collection.
  • Configure the Office Web Apps cache to use that database.
Source: http://technet.microsoft.com/en-us/library/ee837422.aspx

Read More:
http://technet.microsoft.com/en-us/library/ff431685.aspx
http://technet.microsoft.com/en-us/library/cc678868.aspx
http://technet.microsoft.com/en-us/library/ee837422.aspx

Other: I have used OWA for thumbnails on a past project for search. So when search results return, I get a thumb nail of the word or PowerPoint document in the results. OWA is pretty heavy and it appears that it will have to convert all documents that don’t have a rendition of the presentation in the cache when a search is performed. This doesn’t seem a good use of resources and a potential bottleneck.  Have I understood how FAST generates preview?  Pls leave your comments.

The Microsoft Word Web App and Microsoft PowerPoint Web App generate a series of images to create a rendition of a document that is viewable in the browser. If Microsoft Silverlight 3 is installed, XAML is used to create the rendition.” - Technet