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.
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>:<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.