Fixing Office Web Apps 2013 Server Error

After a disaster at work, involving our SAN shitting itself and falling over, we invoked our DR procedures and got services back online. While testing the functionality of our SharePoint 2013 farm, which had a few little issues that were resolved in an hour, I noticed that Office Web Apps 2013 were not working, Giving an nondescript “Server Error”.

webapps-errorI logged onto the Web Apps Server box and ran the Get-OfficeWebAppsFarm powershell command an got the following.

webapps-powershell-error-1

 

Notice the WARNING: It does not appear that this machine is part of an Office Web Apps Server farm message at the top? The Server was also missing from the “Machines” property of the farm.

Since this was a single Office Web Apps server and not an actual farm, the easiest solution was to recreate the farm with the following command.

$farm = Get-OfficeWebAppsFarm
New-OfficeWebAppsFarm -InternalURL $farm.InternalURL -ExternalURL $farm.ExternalURL -CertificateName $farm.CertificateName -EditingEnabled

This command grabs all necessary properties from the original farm. It also assumes you have a volume license for office and wish to enable editing. If you don’t remove -EditingEnabled from the end or suffer Microsoft’s wrath.

After I executed this command the machine was listed in the farm properties and Web Apps were working once again.

 

webapps-powershell-fixed-1

 

SharePoint 2010 “Group cannot be found” error

I ran into a very interesting error in SharePoint today and thought I would document it as I attempt to fix it. Hopefully it will help somebody else in the future.

In my site collection -> Site Actions – > Site Settings – > People and Groups I noticed that all of my groups were duplicated. If you try to click on one of the groups to edit it there is no issue, but the second group throws the following error.

I was actually going to delete a load of groups to start with, so I decided to delete them all and re-create the ones I need. Since I can’t get into edit the group in the GUI, I tried powershell on the server. This didn’t work either and bombed me out with the same error.

Now what? I decided to check Central Admin and take a look at the content databases. There appeared to be 2 site collections in the content database. I can only remember creating 1, although the site was migrated from Sharepoint 2007 so maybe that had something to do with it.

I then backed up the content database and restored it in our development environment to do a bit more digging. When you hover over the group name in SharePoint the URL has ID=### at the end. I fired up MS SQL Management Studio and took a look in the “Groups” table and noticed that the groups present had the same ID’s as the URLs for the groups displayed in SharePoint that I could still edit. There were no rows for the groups that I could not edit though. It looks like the groups have had their ID’s changed for some reason.

Then I edited the table and copied the row of a working group and inserted a new row, pasting from my clipboard and changing the ID to the ID in the URL or the group that was not working. I couldn’t commit this as the Title already existed in the bale, so I added a 1 to the end of the title for the row I had just created and committed it.

I went back to SharePoint and clicked on the group that was not working. It worked…. I could now click Settings – > Group Settings -> Delete and the group was gone, both from SharePoint and from the Groups table.

I seriously wouldn’t recommend this on a live server, but I repeated these steps in our development environment for each group and I was successful in deleting all of the groups from the SharePoint site collection.