Monday, May 3, 2010

How to delete a timer job in SharePoint or Solution is always remain in Retracting state.

Problem : A deployment or retraction is already under way for the solution "xxx.wsp" , and only one deployment or retraction at a time is supported


Sometime this error has been occured from Windows SharePoint Services Administration command when the user do retractsolution or deploysolution like the follwing

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>stsadm -o retractsolution -name "%PackageName%" -local -url %TargetWebUrl%

or

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>stsadm -o deploysolution -name "%PackageName%" -local -allowGacDeployment -url %TargetWebUrl%

it occurs if anomalies deployment is running for the same package in the backend due to some previous deployment has been crashed before for some reason.

Solution:
To avoid this problem do the followings:

1. Look for the deploy jobId to break the running by the following command:

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>stsadm-o enumdeployments

2. Cancel the deploy typing the following command:

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>stsadm-o canceldeployment-id "GUID jobId"

3. Check that deploy has been canceled by typing the following command:

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>stsadm-o enumdeployments

Hope it should work.

No comments:

Post a Comment