Opening documents by using OOS --> Error

Brass Contributor

Hi there,
Does anyone have any idea on this issue?? Thanks.


My Environment:

I create two SharePoint Server in the same farm. One is WFE, another one is Application. There are two SharePoint Sites inside.
1.) One is Publishing Portal (http://hostname:2975)
2.) Another is My site host (http://hostname:29845). I also EXTENDED this site for extranet and there will be a record in AAM. the record will be "https://doclib.xxx.xxx:443" and personal site URL will be https://doclib.xxx.xxx:443/personal/domain_username
 
I alos create an OOS farm (TWO OOS Servers) by using the following commands:


^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OWA Machine
===============
1.) Import-Module -Name OfficeWebApps
2.) New-OfficeWebAppsFarm -InternalURL "http://hostname.xxx.com" -ExternalUrl "https://dnsname.xxx.com"  -CertificateName "OfficeWebApps Certificate" -AllowHttp -EditingEnabled -OpenFromURLEnabled
3.) https://dnsname.xxx.com/hosting/discovery -> work properly. everything works fine.
 
SharePoint Side
================
1.) New-SPWOPIBinding -ServerName "hostname.xxx.com" -AllowHttp
2.) Set-SPWOPIZone -Zone "external-https"
 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
TESTING::
 
1.) CONNECT TO Publishing Portal (http://hostname:2975) and Open Document in any Document Libraries :: To open a document by using OOS :: OK -> Success -> NO any issues
2.) CONNECT TO http://hostname:29845 or https://doclib.xxx.xxx:443/personal/domain_username and Open Document in any Document Libraries :: To open a document by using OOS :: Error -> Failed.  the erroe is the shown below:

 

IMG_9690.jpg

 

SharePoint Errors:

Claims Windows Sign-In: Sending 401 for request 'http://vms3tstpssp02:11465/personal/testcmmp_psadmin1/_layouts/15/WopiFrame2.aspx?sourcedoc={1F90A54B-5BC8-4AD8-85FB-BE06E4FE1D6F}&file=testing document.docx&action=default&CT=1577699145592&OR=DocLib' because the user is not authenticated and resource requires authentication.
Sending HTTP response 401 - text/plain:401 UNAUTHORIZED.
 
12/31/2019 11:25:16.94 w3wp.exe (0x159C) 0x0A18 SharePoint Foundation DistributedCache air4a Monitorable Token Cache: Failed to get token from distributed cache. Key: '0).w|s-1-5-21-1995047987-106792918-3988336842-100608'.(This is expected during the process warm up or if data cache Initialization is getting done by some other thread). 95c2269f-ca50-70d7-ef25-ca6c123e8d13
12/31/2019 11:25:16.94 w3wp.exe (0x159C) 0x0A18 SharePoint Foundation DistributedCache air4b Monitorable Token Cache: Reverting to local cache to get the token. Key: '0).w|s-1-5-21-1995047987-106792918-3988336842-100608'. 95c2269f-ca50-70d7-ef25-ca6c123e8d13
12/31/2019 11:25:16.96 w3wp.exe (0x159C) 0x0A18 SharePoint Foundation WOPI bjupx Monitorable WopiFrame2: User does not have access to document. Mode is embed. Check for ClientRender Sign-in 95c2269f-ca50-70d7-ef25-ca6c123e8d13
12/31/2019 11:25:16.96 w3wp.exe (0x159C) 0x0A18 SharePoint Foundation General bjupw Monitorable ClientRenderBasedContent: Last modified date provided with KillSwitchId: 05/27/2016, Label provided with KillSwitchId: STS_SupportClientRenderWOPI 95c2269f-ca50-70d7-ef25-ca6c123e8d13
12/31/2019 11:25:16.96 w3wp.exe (0x159C) 0x0A18 SharePoint Foundation General bjupv Monitorable ClientRenderBasedContent: DisableContents Render 95c2269f-ca50-70d7-ef25-ca6c123e8d13
12/31/2019 11:25:16.99 w3wp.exe (0x159C) 0x0A18 SharePoint Foundation General bxkxg High SPSiteSubscriptionSettings: ctor: UseCachedValues 'UnAssigned' for tenant '00000000-0000-0000-0000-000000000000' - not using the cache in call-stack ' @ GetStackTrace @ .ctor @ GetSettings @ IsIPAddressBlockAccessPolicyEnforcedOnTenant @ GetManager @ RequestRawLoopbackToken @ IssueLoopbackTokenString @ IssueLoopbackTokenString @ GetAccessToken @ GetAccessToken @ GetWOPITargetInternalForDocAspx @ GetWOPITargetInternalEx @ OnLoadHelper @ OnLoad @ OnLoad @ LoadRecursive @ ProcessRequestMain @ ProcessRequest @ ProcessRequest @ ProcessRequest @ System.Web.HttpApplication.IExecutionStep.Execute @ ExecuteStepImpl @ ExecuteStep @ ResumeSteps @ BeginProcessRequestNotification @ ProcessRequestNotificationPrivate @ ProcessRequestNotificationHelper @ ProcessRequestNotification @ MgdIndicateCompletion @ MgdIndicateCompletion @ ProcessRequestNotificationHelper @ ProcessRequestNotification'. 95c2269f-ca50-70d7-ef25-ca6c123e8d13
12/31/2019 11:25:17.01 w3wp.exe (0x159C) 0x0A18 SharePoint Foundation Application Authentication aiv3e High Self-issued token request for 'wopi/doclib.test.cmmp.hksarg@d6eb933a-94ee-4862-869f-d3e17836ad77' succeeded. 95c2269f-ca50-70d7-ef25-ca6c123e8d13
12/31/2019 11:25:17.07 w3wp.exe (0x159C) 0x0A18 SharePoint Foundation Database adhpr High Leaving Monitored Scope: (VqueryEngine) Execution Time=42.7944; CPU Milliseconds=29; SQL Query Count=3; Parent=SPRequest.GetListItemDataWithCallback2 95c2269f-ca50-70d7-ef25-ca6c123e8d13
12/31/2019 11:25:17.07 w3wp.exe (0x159C) 0x0A18 SharePoint Foundation Database adhpr High ____SQL Query Count=3 95c2269f-ca50-70d7-ef25-ca6c123e8d13
12/31/2019 11:25:17.07 w3wp.exe (0x159C) 0x0A18 SharePoint Foundation General f6l7 High Leaving Monitored Scope: (SPRequest.GetListItemDataWithCallback2) Execution Time=51.4125; CPU Milliseconds=34; SQL Query Count=4; Parent=EnsureListItemsData 95c2269f-ca50-70d7-ef25-ca6c123e8d13
12/31/2019 11:25:17.07 w3wp.exe (0x159C) 0x0A18 SharePoint Foundation Monitoring b4ly High Leaving Monitored Scope: (EnsureListItemsData) Execution Time=51.8612; CPU Milliseconds=35; SQL Query Count=4; Parent=Request (GET:http://vms3tstpssp02:11465/personal/testcmmp_psadmin1/_layouts/15/WopiFrame2.aspx?sourcedoc={C1AABD1B-68D6-41E9-BA3D-94F42ADECA67}&file=Document.docx&action=default&CT=1577762715128&OR=DocLib) 95c2269f-ca50-70d7-ef25-ca6c123e8d13
12/31/2019 11:25:17.11 w3wp.exe (0x159C) 0x0A18 SharePoint Foundation General agxkz High calling GetCurrentGenericSetupPath for a versioned path: TEMPLATE\LAYOUTS 95c2269f-ca50-70d7-ef25-ca6c123e8d13

OOS Errors:
 
12/31/2019 11:20:34.82 w3wp.exe (0x25B0) 0x2798 Office Online Collab Sandboxing aoogc Unexpected HttpRequestAsync, (Wopi,CheckFile,WACSERVER) no response [WebExceptionStatus:SendFailure, url:UREDACTED_(wf8xVbqDC7awHtcf3zqMnC4pjLFirfIAo8j6EibRD1A=)] 4bc2269f-da31-70d7-ef25-c57d92ca0f79
12/31/2019 11:20:34.82 w3wp.exe (0x25B0) 0x27B4 Office Online Collab Sandboxing buqbb Monitorable {"WacRequestId":"a2262c82-8102-4420-9a9a-e28ba2ae2f80","httpStatusCode":"Unused","logPrefix":"Wopi,CheckFile,WACSERVER","requestDurationMs":"20","bytesRead":"0","bytesWritten":"0"} 4bc2269f-da31-70d7-ef25-c57d92ca0f79
12/31/2019 11:20:34.82 w3wp.exe (0x25B0) 0x27B4 Office Online Collab Sandboxing adhsk Unexpected WOPI CheckFile: Catch-All Failure [exception:Microsoft.Office.Web.Common.EnvironmentAdapters.UnexpectedErrorException: HttpRequest failed. ---> Microsoft.Office.Web.Common.HttpRequestAsyncException: No Response in WebException ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host     at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)     at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)     --- End of inner exception stack trace ---     at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)     at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)     --- End of inner exception stack trace ---     at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)     at Microsoft.Office.Web.Common.HttpRequestAsync.GetResponseCallback(IAsyncResult asyncResult)     --- End of inner exception stack trace ---     --- End of inner exception stack trace ---     at Microsoft.Office.Web.Apps.Common.WopiTalky.AddHostResponseDataAndThrow(Exception exception, HttpRequestAsyncResult result)     at Microsoft.Office.Web.Apps.Common.WopiTalky.LogAndThrowWireException(HttpRequestAsyncResult result, HttpRequestAsyncException delayedException)     at Microsoft.Office.Web.Apps.Common.WopiDocument.LogAndThrowWireException(HttpRequestAsyncResult result, HttpRequestAsyncException delayedException)     at Microsoft.Office.Web.Common.HttpRequestAsync.End()     at Microsoft.Office.Web.Apps.Common.WopiDocument.CheckWopiFile()] 4bc2269f-da31-70d7-ef25-c57d92ca0f79
12/31/2019 11:20:34.82 w3wp.exe (0x25B0) 0x27B4 Services Infrastructure Services Infrastructure Br Err b66ra Unexpected FileUnknownException with InnerException from CheckBaseDocument, InnerException: Microsoft.Office.Web.Common.EnvironmentAdapters.UnexpectedErrorException: HttpRequest failed. ---> Microsoft.Office.Web.Common.HttpRequestAsyncException: No Response in WebException ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host     at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)     at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)     --- End of inner exception stack trace ---     at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)     at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)     --- End of inner exception stack trace ---     at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)     at Microsoft.Office.Web.Common.HttpRequestAsync.GetResponseCallback(IAsyncResult asyncResult)     --- End of inner exception stack trace ---     --- End of inner exception stack trace ---     at Microsoft.Office.Web.Apps.Common.WopiTalky.AddHostResponseDataAndThrow(Exception exception, HttpRequestAsyncResult result)     at Microsoft.Office.Web.Apps.Common.WopiTalky.LogAndThrowWireException(HttpRequestAsyncResult result, HttpRequestAsyncException delayedException)     at Microsoft.Office.Web.Apps.Common.WopiDocument.LogAndThrowWireException(HttpRequestAsyncResult result, HttpRequestAsyncException delayedException)     at Microsoft.Office.Web.Common.HttpRequestAsync.End()     at Microsoft.Office.Web.Apps.Common.WopiDocument.CheckWopiFile() 4bc2269f-da31-70d7-ef25-c57d92ca0f79
12/31/2019 11:20:34.82 w3wp.exe (0x25B0) 0x27B4 Services Infrastructure Services Infrastructure Br Err by88d Unexpected FileUnknownException while loading the app. [FileSourceId: -1088102096] [ClusterId: 0] [ExtraErrorInfo: ] 4bc2269f-da31-70d7-ef25-c57d92ca0f79
12/31/2019 11:20:34.84 w3wp.exe (0x25B0) 0x27B4 Services Infrastructure Services Infrastructure Br Err cmgyy Monitorable Unable to retrieve file name from. 4bc2269f-da31-70d7-ef25-c57d92ca0f79
12/31/2019 11:20:34.84 w3wp.exe (0x25B0) 0x27B4 Office Online Office Online Resume Assistant cq2gj Monitorable DocChat Disabled:baseDoc null 4bc2269f-da31-70d7-ef25-c57d92ca0f79

2 Replies

@Will # _________ H  From the script you posted:

 

OWA Machine
===============
1.) Import-Module -Name OfficeWebApps
2.) New-OfficeWebAppsFarm -InternalURL "http://hostname.xxx.com" -ExternalUrl "https://dnsname.xxx.com"  -CertificateName "OfficeWebApps Certificate" -AllowHttp -EditingEnabled -OpenFromURLEnabled
3.) https://dnsname.xxx.com/hosting/discovery -> work properly. everything works fine.
 
SharePoint Side
================
1.) New-SPWOPIBinding -ServerName "hostname.xxx.com" -AllowHttp
2.) Set-SPWOPIZone -Zone "external-https"

 

On the SP side you are using the OOS internal URL but setting the WOPIZone to External, I think that is where you issue is.  Also if you are using HTTPS, like you should, you can leave out the -AllowHTTP.

Hi JoshMcClanahan,
I solved the issue yesterday and found out the main cause. normally the script came from another TechNet forum and microsoft. I do a test this script on my labs (2 environments) and it work properly regardless of HTTP or HTTPS. It is weird when my site host comes along with HTTPS, cannot work. I looked into the issue, finally the SharePoint AAM is the big problem. so I change the configuration from AAM, and work fine.
anyway thanks for your reply.