Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

a customer has a problem deploying a webpart I developed for them on a farm. The webpart is packaged as a .WSP solution with WSPBuilder and it seems to work fine when deployed to a single server.

When customer tries to deploy it to the farm, the deployment batch file goes through OK, but the feature doesn't show up in Sharepoint and there seem to be no errors.

The install batch file contains the following:

"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o retractsolution -name "MCTPlanogramSharepointWebPartDeploy-prod.wsp" -immediate -allcontenturls
rem Izvedi ukaz
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o execadmsvcjobs

rem Nato odstranimo WSP solution, ce ze obstaja
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deletesolution -name "MCTPlanogramSharepointWebPartDeploy-prod.wsp"
rem Izvedi ukaz
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o execadmsvcjobs

rem Dodaj WSP solution 
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "MCTPlanogramSharepointWebPartDeploy-prod.wsp"
rem Izvedi ukaz
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o execadmsvcjobs

rem In naredi deployment na vse contentUrl. Ce zelimo naredimo deployment na poseben URL, umaknemo parameter -allcontenturls in dodamo -url http://imekamhocemodat
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "MCTPlanogramSharepointWebPartDeploy-prod.wsp" -immediate -allcontenturls -allowGacDeployment -allowCasPolicies -force

rem Izvedi ukaz
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o execadmsvcjobs

This is what the customer sent:

  Name: mctplanogramsharepointwebpartdeploy-prod.wsp
Type:   Core Solution
Contains Web Application Resource:  Yes
Contains Global Assembly:   Yes
Contains Code Access Security Policy:   No
Deployment Server Type: Front-end Web server
Deployment Status:  Not Deployed
Deployed To:    None
Last Operation Result:  The solution was successfully deployed.
Last Operation Details: MOSS-I : http://moss.mercator.si/ : The solution was successfully deployed. 
MOSS-I : https://portal.mercator.si/ : The solution was successfully deployed. 
MOSS-I : https://ssp-moss.mercator.si/ : The solution was successfully deployed. 
MOSS-A : http://moss.mercator.si/ : The solution was successfully deployed. 
MOSS-A : https://portal.mercator.si/ : The solution was successfully deployed. 
MOSS-A : https://ssp-moss.mercator.si/ : The solution was successfully deployed. 
MOSS-A : http://moss.mercator.si/ : The solution was successfully deployed. 
MOSS-A : https://portal.mercator.si/ : The solution was successfully deployed. 
MOSS-A : https://ssp-moss.mercator.si/ : The solution was successfully deployed. 
MOSS-B : http://moss.mercator.si/ : The solution was successfully deployed. 
MOSS-B : https://portal.mercator.si/ : The solution was successfully deployed. 
MOSS-B : https://ssp-moss.mercator.si/ : The solution was successfully deployed. 

The features in the wsp packages have their Scope set to Site - should they be set to FARM? Are there any other differences when deploying to the farm that I should be aware of? Do they need to run the stsadm commands on every frontend server?

If someone can point me to some documenation for this specific scenario I'd be grateful.

share|improve this question
    
Have the features been set to Hidden, thus not showing in "Site Features" in Site Settings? –  James Love Jun 14 '10 at 10:33
    
one feature yes (because it is not needed for the ui, the second one no. As well, as I said, this works ok in non-farm scenario. –  Anonymous Jun 14 '10 at 11:14

3 Answers 3

  1. Web Parts must be deployed to the Site Collection (Scope=Site)
  2. When using stsadm operation deploysolution you need to specify the site collection (or use -allcontenturls)
  3. Only run the stsadm commands on one WFE (and consistenly use the same WFE)
share|improve this answer
    
hm, it seems that this is what the customer did do. Scope=Site, -allcontenturls is set, the only thing I need to check which WFE he ran the command on. –  Anonymous Jun 14 '10 at 11:16

As Wictor say, its important to always execute jobs from the same WFE.

execadmsvcjobs only executes jobs in the current WFE cue, so if previous jobs are "hanging" on other WFE, you will see some weird behaviour when the same jobs are executed on another WFE. Gary Lapointe created an extended version, gl-execadmsvcjobs, that flushes cue across WFE. http://stsadm.blogspot.com/

Also be careful using -force parameter. Its different what -force means in solutions and feature syntax, but what it in general does is hide any exceptions that might cause retraction/deployment to fail. This is all good and well if you know your solutions isnt failing (eg. your event handler code doesnt fail), but it shouldnt be your first option as it will hide any errors in your provisioning code.

share|improve this answer
    
thanks, I'll try removing -force parameter. So, if I understand correctly, I only need to execute the script on one WFE and it should automatically propagate to all WFEs? –  Anonymous Jun 14 '10 at 14:49
    
Yes, that's one of the purposes of the WSPs. Basically -o addsolution adds the WSP to the configuration database and -o deploysolution creates a timer job on each WFE which unpacks the WSP to the file system and installs the solution. –  Wictor Wilen MCA MCM MVP Jun 14 '10 at 15:08

This post has useful information on what scope to deploy what features:

http://weblogs.asp.net/soever/archive/2007/05/03/sharepoint-features-elements-scope-and-other-info.aspx

share|improve this answer
    
thank you, but unfortunately it does not mention web parts. –  Anonymous Jun 14 '10 at 11:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.