Solution Deployment – Failed


Thursday, March 27, 2008 by Nandu

I tried to add a solution using the command

stsadm -o addsolution -filename abcd.wsp

However, I got a error saying the “The timer job for the operation has been created. However, it cannot be run because the administrative service for this server is not enabled.”

I found that the “Windows SharePoint Services Administration” wasn’t running. I started the service.

Since I wasn’t sure about the solution being added I thought of deleting the solution and adding it again. When I tried to delete the solution using the command:

stsadm -o deletesolution -name abcd.wsp

I got a message suggesting: “The solution cannot be removed when a job is scheduled or running.
abcd.wsp: The removal of the solution failed.”

I thought of deleting this solution from Central Administration > Operations > Global Configuration > Solution Management.

I found that the status of the solution was failed.

abcd.wsp Failed.

After searching a lot on Internet I found a forum that suggested to delete the solution using the canceldeployment option.

stsadm -o canceldeployment -id <id>

Here the <id> is the guid of the time job created for this solution deployment.

I wasn’t sure on how to find this id so the only option was to find on internet again.

I later found following solution to cancel the deployment of the failed solution:

The best way to find the job associated is

Goto Central Administration > Operations > Global Configuration > Timer Job Status.

Look for the wsp file name, in my case it was abcd.wsp. Its also easy if you sort the list on the status field. This job could be found with the Failed status.

Then go to Central Administration > Operations > Global Configuration > Timer Job Definitons.

Search for the name of the job found in the Time Job Status list. Copy the url associated to this hyperlink and the Job id can extracted from the url.

It is of the form http://<machine&gt;:<port>/_admin/JobEdit.aspx?JobId=70092246%2D16f5%2D409e%2D97f5%2Dd8ae2eb1d68e

extact the guid and use it in the canceldeployment command like this:

stsadm -o canceldeployment -id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

It worked for me. Hopefully it helps others too.

3 thoughts on “Solution Deployment – Failed

  1. craig says:

    You can also do “stsadm -o enumsolutions” and it will show all solutions with their deployment state and job ids, then just copy the id into your canceldeployment command.

  2. Phil Ayton says:

    I had the same problem and followed your steps up to the last one. I clicked on the link to the timer job and clicked delete in the next screen. Worked a treat! Thanks for the post.

  3. Vance says:

    Thanks!!! This helped a bunch!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: