Adding more servers with AutoSPInstaller

Dec 23, 2011 at 1:46 PM
Edited Dec 23, 2011 at 1:47 PM

Good day,

I'm using this fantastic script to setup my new farm. The farm consists of a SQL Database cluster, 1 WebFrontEnd and 3 Application servers. The application server (#3) which is going to host User Profile Services on it is going first. I've had some bumps in the road with installing this first server but everything is fine now. The next thing to do is to add the second application server to the farm. I've tried several adjustments to the AutoSPInstaller script but it keeps crashing when it comes to the WebApplication section.

 

 - Checking farm membership for DBSRV1 in "SP2010_ACP_INT_FarmConfigDB"...

 - Attempting to join farm on "SP2010_ACP_INT_FarmConfigDB"...
 - Done joining farm.
--------------------------------------------------------------
--------------------------------------------------------------
 - Configuring the SharePoint farm/server...
 - Installing Help Collection...
 - Securing Resources...
 - Installing Services...
 - Installing Features...
 - Installing Application Content...
 - Starting SharePoint 2010 Timer Service...
 - Done initial farm/server config.
--------------------------------------------------------------
--------------------------------------------------------------
 - Adding Managed Accounts
 - Creating local profile for contoso\uSys-ShP-Svc-dflt-A...Done.
 - Managed account contoso\uSys-ShP-Svc-dflt-A already exists.
<there were more here but left out>
 - Done Adding Managed Accounts

--------------------------------------------------------------
--------------------------------------------------------------
 - Creating web applications...
 - Web app "Personal My Sites" already provisioned.
 - Creating Site Collection "http://mysitesp2010acp.contoso.local:80"...
--------------------------------------------------------------
Script aborted!


Exception             : System.ArgumentException: Another site already exists a
                        t http://mysitesp2010acp.contoso.com. Delete this site be
                        fore attempting to create a new site with the same URL,
                         choose a new URL, or create a new inclusion at the pat
                        h you originally specified. ---> Microsoft.SharePoint.S
                        PException: Another site already exists at http://mysit
                        esp2010acp.contoso.local. Delete this site before attemptin
                        g to create a new site with the same URL, choose a new 
                        URL, or create a new inclusion at the path you original
                        ly specified.
                           --- End of inner exception stack trace ---
                           at Microsoft.SharePoint.Administration.SPConfigurati
                        onDatabase.CreateSite(SPWebApplication application, SPC
                        ontentDatabase database, String originalPath, Guid id, 
                        Guid siteSubscriptionId, Boolean useHostHeaderAsSiteNam
                        e, Boolean bDeleted, DateTime deletionTime)
                           at Microsoft.SharePoint.Administration.SPConfigurati
                        onDatabase.CreateSite(SPWebApplication application, SPC
                        ontentDatabase database, String path, Boolean useHostHe
                        aderAsSiteName)
                           at Microsoft.SharePoint.Administration.SPSiteCollect
                        ion.Add(SPContentDatabase database, SPSiteSubscription 
                        siteSubscription, String siteUrl, String title, String 
                        description, UInt32 nLCID, String webTemplate, String o
                        wnerLogin, String ownerName, String ownerEmail, String 
                        secondaryContactLogin, String secondaryContactName, Str
                        ing secondaryContactEmail, String quotaTemplate, String
                         sscRootWebUrl, Boolean useHostHeaderAsSiteName)
                           at Microsoft.SharePoint.PowerShell.SPCmdletNewSite.C
                        reateDataObject()
                           at Microsoft.SharePoint.PowerShell.SPNewCmdletBase`1
                        .InternalProcessRecord()
                           at Microsoft.SharePoint.PowerShell.SPCmdlet.ProcessR
                        ecord()
TargetObject          : Microsoft.SharePoint.PowerShell.SPCmdletNewSite
CategoryInfo          : InvalidData: (Microsoft.Share...SPCmdletNewSite:SPCmdle
                        tNewSite) [New-SPSite], ArgumentException
FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSite
ErrorDetails          : 
InvocationInfo        : System.Management.Automation.InvocationInfo
PipelineIterationInfo : {0, 1}
PSMessageDetails      : 



-----------------------------------
| Automated SP2010 install script |
| Started on: 12/23/2011 14:31:18 |
| Aborted:    12/23/2011 14:54:44 |

 

In the above error it crashes because it already has configured the WebApplications. I've tried it one again and took out all the WebApplications out of the configuration file, yet sadly it also crashes with an error.

 

--------------------------------------------------------------
--------------------------------------------------------------
 - Creating web applications...
 - Creating Web App ""
--------------------------------------------------------------
Script aborted!


Exception             : System.Management.Automation.ParameterBindingValidation
                        Exception: Cannot bind argument to parameter 'Name' bec
                        ause it is null.
                           at System.Management.Automation.ParameterBinderBase.
                        ValidateNullOrEmptyArgument(CommandParameterInternal pa
                        rameter, CompiledCommandParameter parameterMetadata, Ty
                        pe argumentType, Object parameterValue, Boolean recurse
                        IntoCollections)
                           at System.Management.Automation.ParameterBinderBase.
                        BindParameter(CommandParameterInternal parameter, Compi
                        ledCommandParameter parameterMetadata, ParameterBinding
                        Flags flags)
                           at System.Management.Automation.CmdletParameterBinde
                        rController.BindParameter(CommandParameterInternal argu
                        ment, MergedCompiledCommandParameter parameter, Paramet
                        erBindingFlags flags)
                           at System.Management.Automation.CmdletParameterBinde
                        rController.BindParameter(UInt32 parameterSets, Command
                        ParameterInternal argument, MergedCompiledCommandParame
                        ter parameter, ParameterBindingFlags flags)
                           at System.Management.Automation.CmdletParameterBinde
                        rController.BindParameters(UInt32 parameterSets, Collec
                        tion`1 arguments, CommandMetadata commandMetadata)
                           at System.Management.Automation.CmdletParameterBinde
                        rController.BindCommandLineParametersNoValidation(Colle
                        ction`1 arguments)
                           at System.Management.Automation.CmdletParameterBinde
                        rController.BindCommandLineParameters(Collection`1 argu
                        ments)
                           at System.Management.Automation.CommandProcessor.Bin
                        dCommandLineParameters(CommandParameterInternal[] param
                        eters)
                           at System.Management.Automation.CommandProcessor.Pre
                        pare(CommandParameterInternal[] parameters)
                           at System.Management.Automation.CommandProcessorBase
                        .DoPrepare(CommandParameterInternal[] parameters)
                           at System.Management.Automation.Internal.PipelinePro
                        cessor.Start(Boolean incomingStream)
                           at System.Management.Automation.Internal.PipelinePro
                        cessor.SynchronousExecuteEnumerate(Object input, Hashta
                        ble errorResults, Boolean enumerate)
TargetObject          : 
CategoryInfo          : InvalidData: (:) [New-SPWebApplication], ParameterBindi
                        ngValidationException
FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsof
                        t.SharePoint.PowerShell.SPCmdletNewSPWebApplication
ErrorDetails          : 
InvocationInfo        : System.Management.Automation.InvocationInfo
PipelineIterationInfo : {}
PSMessageDetails      : 



-----------------------------------
| Automated SP2010 install script |
| Started on: 12/23/2011 15:13:04 |
| Aborted:    12/23/2011 15:30:49 |

 

I'm pretty sure it's possible to just join a server to a farm instead of creating all the WebApps around it or so. Anyone got any experience with this and could lend me a hand?

Thanks in advance!

Dec 23, 2011 at 6:25 PM

Web Application name is unique. so you need to change "Personal My Sites" to something else.

Dec 23, 2011 at 7:37 PM
josephsaad wrote:

Web Application name is unique. so you need to change "Personal My Sites" to something else.

Well it's not that I want to create another Web Application. I just want the other servers connected to the farm. I was under the impression the AutoSPInstaller could do that?

Dec 23, 2011 at 11:32 PM

From the log

 

- Creating Site Collection "http://mysitesp2010acp.contoso.local:80"...
--------------------------------------------------------------
Script aborted!


Exception             : System.ArgumentException: Another site already exists http://mysitesp2010acp.contoso.com

I suppose there's a typo then in how you named your "My Sites" web app on the second server. and you'll need to make it identical to the first server (i.e. .local)

Your second server already joined the farm.
Dec 24, 2011 at 9:15 AM

There is no typo involved. I copy/pasted the first appservers configuration and renamed it to the second one. After that I adjusted a few things about the services, as they aren't all hosted on that machine.

The second server joined the farm but the script itself gave an error when it entered the part about the webapplications. Isn't it suppose to skip that part and go to the configuration of the services on the machine?

Dec 24, 2011 at 5:20 PM

Can you paste the webapplications node from both files indicating which one is the first server and which one is the second?

Jan 6, 2012 at 12:45 PM

Brianlala gave an answer to the problem I had in a different post [X]. Seems creating a "dummy webapp" and deleting that after the server has been added to the farm, fixes the issue I had with using no webapp in the configuration file of servers that I wanted to add to the farm.

Jul 11, 2012 at 4:38 PM

I know one thing that causes this to happen because I stumbled onto it - I'm posting here in the event it helps someone... After I installed my first WFE (Goal was to setup 2 WFE's and 1 App Svr) I attempted to install my app server. When I saw it "hang up" while attempting to create the User Profile Service, I broke out of the script and then...

1. Ran the Configuration Wizard on WFE1

2. Attempted to run the Wizard on the App Server (During which, for some reason there was a problem and the App Server didn't join the farm)

When I attempted to re-run the AutoSPInstaller on the App Server, I saw the errors you posted above. It was probably overkill, but I uninstalled SPS 2010 and started over to get beyond the issue.

Jul 12, 2012 at 10:24 AM

Hi all,

i just submited and new issue that will resolve the problem in my opinion:

http://autospinstaller.codeplex.com/workitem/18353

Ciao Marco