Introduction
This posting walks through the process of rebuilding Office Web App (OWA) services for a SharePoint 2013 farm. Rebuilding an OWA farm is simple and quick and is sometimes the most efficient method for recovering from severe errors or service failures.
This posting assumes a single-server internal OWA farm that exposes its service over HTTP (not HTTPS) for an internal corporate environment and that has Microsoft Office volume licensing. It also assumes an internal SharePoint 2013 farm that uses authentication over HTTP and does not employ encrypted connections.
Procedure
This posting walks through the process of rebuilding Office Web App (OWA) services for a SharePoint 2013 farm. Rebuilding an OWA farm is simple and quick and is sometimes the most efficient method for recovering from severe errors or service failures.
This posting assumes a single-server internal OWA farm that exposes its service over HTTP (not HTTPS) for an internal corporate environment and that has Microsoft Office volume licensing. It also assumes an internal SharePoint 2013 farm that uses authentication over HTTP and does not employ encrypted connections.
Procedure
- Remove SharePoint Bindings
- Login to any server in the farm that hosts SharePoint 2013, using the Setup User Administrator account (eg, spAdmin).
NOTE: always use the SharePoint Setup User Administrator account for any SharePoint installation and configuration activities.
- Open a SharePoint Management Shell with elevated privileges (as administrator).
- Execute the following:
Remove-SPWOPIBinding -All:$True
This removes the Office application bindings that SharePoint has to the OWA server. - Logout of the SharePoint server.
- Remove the OWA server from the farm
- Login to the OWA server using an administrator account (no need to use the SharePoint Admin account - this is not really a SharePoint server).
- Open a PowerShell window with elevated privileges (as administrator).
- Execute the following:
Import-Module -Name OfficeWebApps
This doesn't uninstall the OWA software; it only removes the local OWA server from the OWA farm.
Remove-OfficeWebAppsMachineNOTE: if you have more than one OWA server in the OWA farm, you must first execute this command on each of the child OWA servers first. Then you can execute this command on the final, master OWA server.
- Remain logged onto the OWA server. There's still one more thing to do.
- Re-build the OWA Server
- Uninstall the software using standard Windows uninstallation method.
NOTE: you must uninstall the OWA software and rebuild fresh due to how the updates were previously installed. Uninstalling the OWA software will also get rid of the updates.
- Restart the OWA server.
- Logon using an administrator account (no need to use the SharePoint Admin account).
- Re-install OWA.
- Re-install updates.
- Restart the OWA server.
- Re-build the OWA farm
- Login to the OWA server again using an administrator account.
- Open a PowerShell window with elevated privileges (as administrator).
- Execute the following:
Import-Module -Name OfficeWebApps
where servername is the actual name of the OWA server host machine. Do not use the fully qualified name. Executing this command builds a new OWA farm.
New-OfficeWebAppsFarm -InternalURL "http://servername" -AllowHttp -EditingEnabled - Next, execute the following:
Get-OfficeWebAppsMachine
This returns the Roles and health status of the local OWA server. For my OWA farm, I wanted the roles to be All and health status Healthy.NOTE: if the status returned is Unhealthy, verify that the HTTP-Activation feature has been added for both .NET 3.5 and .NET 4.5. If not, add these features and then check status again. It may take afew minutes for this feature change to have an affect.
- Logout of the OWA server.
- Open any browser on your desktop machine (assuming it can connect to the OWA server), and then connect to the following:
http:/servername/hosting/discovery
If everything's working correctly, you will see the service discovery file in XML format. - Close the browser.
- Add SharePoint Bindings
- Login to any SharePoint farm server (ie, hosting SharePoint) using your farm's SharePoint Setup User Administrator account.
- Open a SharePoint Management Shell with elevated privileges (as administrator).
- Execute the following:
Get-SPWOPIBinding
This should return nothing, since all WOPI bindings should have been removed back in step 3. If it doesn't, execute Remove-SPWOPIBinding. - In this same SharePoint Management shell, execute the following:
New-SPWOPIBinding -ServerName <WacServerName> -AllowHTTP
where ServerName is the actual name of the OWA server host machine. Do not use the fully qualified name. This command builds the bindings in SharePoint to the OWA service application. - In this same SharePoint Management shell, execute the following:
Get-SPWOPIBinding
This should now return a list of Office applications and actions and their bindings. - In the same SharePoint Management shell, execute the following:
Get-SPWOPIZone
This should return internal-http, given the WOPI authentication type that was configured in step 22, "-AllowHTTP." - In the same SharePoint Management shell, execute the following:
(Get-SPSecurityTokenServiceConfig).AllowOAuthOverHttp
This should return True, if you are not using HTTPS for connections to your farm. - OWA services should be available immediately, and you can test right away.
- Remove-OfficeWebAppsMachine
- Remove-SPWOPIBinding
- Import-Module
- Fun configuring Office web apps 2013 (OWA)
- Install Office Web Apps 2013 for SharePoint 2013 – with PDF Preview
- Installing SharePoint 2013 Office Web Applications Server
- A quick-guide to setting up OWA with SharePoint 2013 – start to finish
- Office Web Apps 2013 multi servers (NLB) Installation and Deployment for SharePoint 2013 step by step guide
- How to remove Office Web Apps 2013 with Service Pack 1 and apply Security Update 2878219
- General