When Sharepoint (Companyweb) 503’s on you, here’s how to fix it 8


Post to Twitter Post to Facebook Post to StumbleUpon

At first it seems like a mystery. One minute Sharepoint is working fine and the next it’s not. You didn’t even do anything! It’s true you don’t have to do anything to have this problem occur. The only thing that has to happen is that the password for the Sharepoint service accounts expire or otherwise become out of sync with the Sharepoint database.

Things not to do:

  • DO NOT reset the password for the Sharepoint service accounts
  • DO NOT change the password for the sharepoint services logon account
  • DO NOT change the account that the app pool runs as

All of these things will waste you time and just complicate things.

the example I am about the give occurred on an SBS 2011 server but the procedure will apply equally to any Sharepoint Foundation 2010. The only change to the procedure that you will need to make is database name and sharepoint service account names.

In this post I am standing on the  shoulders of Adam Zou and Shawn Song, of Microsoft partner support who helped walk me through the process. There is a case record here: http://social.microsoft.com/Forums/en-US/partnerofficesharepoint/thread/dec8834c-876b-4b22-9f0d-dc213a0f0fac/

Here’s is what you should do:

  1. In SBS 2011, the problem stems from an expired password on the account named spfarm. You might have trouble finding this account in your active directory. It is located in Active Directory Users and Computers, under My Business OU – Users – SBSUsers and is called Sharepoint Farm Account. This password has expired and you need to reset it. Reset it to a complex password that you’ll remember.
  2. Next open Services.msc and sort by the Logon As column. Change the password to the one you just set for each service that logs on with that account.image
  3. Open the Sharepoint 2010 Management Shell. This is Sharepoint’s powershell console. Enter the the following: Set-SPManagedAccount -UseExistingPassword -Identity domainspwebapp  Being sure to put in your domain name where the command string calls for domain. For good measure, I did ran this command for spfarm, spwebapp and spsearch.
  4. Still in the shell, run this command: Repair-SPManagedAccountDeployment
  5. Open an elevated command prompt and run IISreset /noforce
  6. At this point you may want to see if everything is running, it may be and you might be done. Be sure to check your sharepoint website and the central admin site.

If any of the powershell commands gave you an error about permissions (which you’ll get if you’ve restore your server or your databases) then do this:

  1. Launch an elevated SQL Management Studio 2010 and look for databases labeled as Suspect.
  2. For each database labeled as suspect run the following SQL commands, replacing dbname with the full name of the suspect database:

ALTER DATABASE dbname SET EMERGENCY

GO

ALTER DATABASE dbname SET SINGLE_USER WITH ROLLBACK IMMEDIATE

GO

DBCC CHECKDB( Dbname, REPAIR_ALLOW_DATA_LOSS)

GO

ALTER DATABASE dbname SET MULTI_USER WITH ROLLBACK IMMEDIATE

GO

ALTER DATABASE dbname SET ONLINE

GO

Immediately following these commands you should see your databases come out of suspect status and sharepoint should now be working fully.

__________

So who wrote this blog and what do they do for a living anyway?
We’re Third Tier. We provide advanced Third Tier support for IT Professionals like you.

www.


Leave a comment

Your email address will not be published. Required fields are marked *

This blog is kept spam free by WP-SpamFree.

8 thoughts on “When Sharepoint (Companyweb) 503’s on you, here’s how to fix it

  • Nathan

    I recieve the following. Any clue on how to fix this?

    Set-SPManagedAccount : Error deploying administration application pool credenti
    als. Another deployment may be active. An object of the type Microsoft.SharePoi
    nt.Administration.SPAdminAppPoolCredentialDeploymentJobDefinition named “job-ad
    min-apppool-change” already exists under the parent Microsoft.SharePoint.Admini
    stration.SPTimerService named “SPTimerV4”. Rename your object or delete the ex
    isting object.
    At line:1 char:21
    + Set-SPManagedAccount <<<< -UseExistingPassword -Identity Domain.local\
    spfarm
    + CategoryInfo : InvalidData: (Microsoft.Share…tManagedAccount:
    SPCmdletSetManagedAccount) [Set-SPManagedAccount], InvalidOperationExcepti
    on
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletSetManag
    edAccount

  • Mike Lazarus

    THANK YOU, THANK YOU, THANK YOU …. saved what’s left of my hair.

    But, one question … re: “For good measure, I did ran this command for spfarm, spwebapp and spsearch”

    I would think you only need to do that for spfarm … which is the only one you can’t set to AutoGenerate the passwords because it’s also the main Farm account – a stupid idea if I’ve ever heard one :-(

    Or do you recommend disabling the AutoGen passwords for the other two also?

  • Pingback: Sharepoint Service Unavailable 503 Revisited |

  • Pingback: Fix Companyweb Error 503 Windows XP, Vista, 7, 8 [Solved]

  • Nicknet

    Thanks for posting this. In my instance is was spwebapp username that had expired but your post at least put me onto the right path and it was a quick fix from there.

    Running Get-SPManagedAccount in Sharepoint Shell quickly showed me my issue.

    Microsoft didn’t make it very easy to figure out though, the login failed error I was getting was referring to my user as ‘DOMAINNAME\SBSSERVER$’ – through me off a bit. Thanks again.

  • Steven Teiger

    “Set-SPManagedAccount -UseExistingPassword -Identity domainspwebapp” should be “Set-SPManagedAccount -UseExistingPassword -Identity domain\spwebapp” and the English needs tidying up!