A developer on our team was trying to upgrade his solution and asked for my help since the job was showing "Deploying" and he was receiving an error when trying to execute the upgradesolution stsadm command. The error he received was:

Sharepoint Service Error: A deployment or retraction is already under way for the solution “solutionname.wsp”, and only one deployment or retraction at a time is supported

I was able to resolve the issue by running the stsadm -o enumdeployments.

This gave me a listing of all deployments that were pending on the server. There were a few and it turned out a failed deployment from another developer was blocking this new deployment.

The enumdeployments output gives you the GUID ID for each pending job. I captured each ID and then ran the following command to clear the jobs:

stsadm -o canceldeployment -id <ID>

Once complete, verified that no jobs remained by rerunning enumdeployments command. After that, the original solution upgrade could be completed.

Final note is that if this issue arises, it is not a good practice to repeatedly try stsadm -o execadmsvcjobs. Sometimes this command is run to force a timer job to run when a -immediate is done on a deployment. If you don’t want to wait for the timer, use -local and deploy to each SharePoint farm box individually. The execadmsvcjobs can have unintended consequences.