none
New-SPconfigurationDatabase: Invalid Address on single SP2010 install

    Domanda

  • Can anyone please help me with this as I'm sure im missing something small.

    I am installing SP2010 on a Win7 Prof machine. SQL2008R2 installed and all the features are activeted as per this script on this site:

    http://msdn.microsoft.com/en-us/library/ee554869(office.14).aspx

    But now I'm executing this in Powershell:

    $sp_cfdatabasename = "SP2010_ConfigDB"
    $sp_cadatabasename = "SP2010_Admin_Content"
    $sp_databaseserver = "Lüs-PC"
    $sp_passphrase = (ConvertTo-SecureString "SP_Svc1_" -AsPlainText -force)
    $sp_password = (ConvertTo-SecureString "SP_Svc1" -AsPlainText -force)
    $sp_username = "Lüs-PC\SP_Svc"

    # Clean up the credentials
    $sp_credentials = New-Object System.Management.Automation.PsCredential $sp_username,$sp_password
    # Execute the config wizard
    Write-Host "Add configuration and administration databases"
    New-SPConfigurationDatabase -DatabaseName $sp_cfdatabasename -DatabaseServer $sp_databaseserver -AdministrationContentDatabaseName $sp_cadatabasename -Passphrase $sp_passphrase -FarmCredentials $sp_credentials

    I keep on getting this below:
    New-SPConfigurationDatabase : MyServerName is an invalid or loopback address.  Specify a valid server address.

    I did disable loopback check in registry. 

    Does anyone have any info on why this is happaning?

    giovedì 5 luglio 2012 19:39

Risposte

  • Hello,

    I just tested this out for you, and the error is being caused by the special character ("ü") in your database server name.  To work around this, you will need to create an SQL alias so that you can give the New-SPConfigurationDatabase cmdlet a database server name that does not have any special characters.  This document describes the process for creating a SQL alias:

    http://msdn.microsoft.com/en-us/library/ms190445.aspx

    If you have trouble finding the management panel to set up the alias, you can go to "Start->Run..." and then type in "cliconfg.exe" to bring the panel up directly.


    Mike Dalton
    SharePoint Barista
    Rackspace Hosting
    blog: mikedalton.net
    twitter: twitter.com/mikeelliot


    giovedì 5 luglio 2012 20:35
  • When you set up the SQL alias, did you set it to TCP/IP, uncheck "Dynamically determine port", and then manually set the Port number to 1433?  Also, do you have the TCP/IP protocol enabled for SQL Server?  Here's how you change it:

    http://technet.microsoft.com/en-us/library/ms191294.aspx


    Mike Dalton
    SharePoint Barista
    Rackspace Hosting
    blog: mikedalton.net
    twitter: twitter.com/mikeelliot

    lunedì 9 luglio 2012 13:22
  • I did verify that my account running the script and Account specified is sysAdmin and dbcreator and has connect permissions on the master db.

    Not sure if that's a typo -- it should be dbcreator and securityadmin. Sysadmin has more access so in theory it's not a permission issue.

    I am using SQL2008R2 and created the default instance. So the SQL server name used for the alias is just Lüs-PC.

    SQL Server 2008 R2 by default doesn't create a Windows Firewall rule to allow port 1433, so usually it's blocked unless you've created a rule allowing this. You'll need to open up TCP port 1433 in Windows Firewall. See TCP/IP port numbers required to communicate to SQL over a firewall.

    Edit: You can also test your connection by creating a Universal Data Link (UDL) file (.udl). This will let you try things out before commiting to running your PowerShell script. If you're logged in as the setup user account (which you should be if you're attempting to create the farm) you should be able to connect to the instance using Windows Authentication. Once connected you should be able to see databases in the database dropdown list (or the Test Connection button will return success). You should be to test both the direct connection to the server and the alias. If you think the issue is with the server name, you can use a IP in the alias or localhost if it's the same machine (which it sounds like it is)


    Jason Warren
    Infrastructure Specialist



    lunedì 9 luglio 2012 13:34

Tutte le risposte

  • Hello,

    I just tested this out for you, and the error is being caused by the special character ("ü") in your database server name.  To work around this, you will need to create an SQL alias so that you can give the New-SPConfigurationDatabase cmdlet a database server name that does not have any special characters.  This document describes the process for creating a SQL alias:

    http://msdn.microsoft.com/en-us/library/ms190445.aspx

    If you have trouble finding the management panel to set up the alias, you can go to "Start->Run..." and then type in "cliconfg.exe" to bring the panel up directly.


    Mike Dalton
    SharePoint Barista
    Rackspace Hosting
    blog: mikedalton.net
    twitter: twitter.com/mikeelliot


    giovedì 5 luglio 2012 20:35
  • Thanks Mike! That seems to do the trick.

    But now I get another error.

    New-SPConfigurationDatabase : Cannot connect to database master at SQL server at HomeDev. The database might not exist, or the current user does not have permission to connect to it.

    I did verify that my account running the script and Account specified is sysAdmin and dbcreator and has connect permissions on the master db.

    Any info on this perhaps?

    giovedì 5 luglio 2012 22:07
  • Lots of suggestions on this StackOverFlow post, but in the end the poster gave up and returned to the graphical config utility and default database names..

    http://serverfault.com/questions/148301/cant-successfully-run-sharepoint-foundation-2010-first-time-configuration


    Kind Regards Bjoern
    Blog

    giovedì 5 luglio 2012 22:25
  • Yeah I found a lot of posts on permissiosn but all that is set up and double checked with me.

    Some other people also pulling their hair out of their head about this issue..

    Thanks,

    giovedì 5 luglio 2012 22:39
  • Are you using SQL Express?  If so, it installs using a named instance (in your case, probably "Lüs-PC\SQLEXPRESS").  Did you include the instance name in the SQL alias you set up?  If the problem persists, you may want to look at uninstalling SQL Express, and then reinstalling, opting to install as a named instance, and then providing an instance name of "MSSQLSERVER".  That is the default instance name, and you will then be able to refer to the SQL server without the use of an instance name at all.  See this MSDN page for more info on named instances:

    http://msdn.microsoft.com/en-us/library/ms165614(v=sql.90).aspx


    Mike Dalton
    SharePoint Barista
    Rackspace Hosting
    blog: mikedalton.net
    twitter: twitter.com/mikeelliot

    venerdì 6 luglio 2012 14:14
  • Hi Mike,

    Thanks for your response.

    I am using SQL2008R2 and created the default instance. So the SQL server name used for the alias is just Lüs-PC.

    I don't think it's to do with the permissions. The reason I say so it because I have an alias set up 'HomeDev' to point to Lüs-PC. Now when I enter a SQL server name(alias) it gives me the same error even if I enter an incorrect alias name.

    Thanks,

    venerdì 6 luglio 2012 18:43
  • When you set up the SQL alias, did you set it to TCP/IP, uncheck "Dynamically determine port", and then manually set the Port number to 1433?  Also, do you have the TCP/IP protocol enabled for SQL Server?  Here's how you change it:

    http://technet.microsoft.com/en-us/library/ms191294.aspx


    Mike Dalton
    SharePoint Barista
    Rackspace Hosting
    blog: mikedalton.net
    twitter: twitter.com/mikeelliot

    lunedì 9 luglio 2012 13:22
  • I did verify that my account running the script and Account specified is sysAdmin and dbcreator and has connect permissions on the master db.

    Not sure if that's a typo -- it should be dbcreator and securityadmin. Sysadmin has more access so in theory it's not a permission issue.

    I am using SQL2008R2 and created the default instance. So the SQL server name used for the alias is just Lüs-PC.

    SQL Server 2008 R2 by default doesn't create a Windows Firewall rule to allow port 1433, so usually it's blocked unless you've created a rule allowing this. You'll need to open up TCP port 1433 in Windows Firewall. See TCP/IP port numbers required to communicate to SQL over a firewall.

    Edit: You can also test your connection by creating a Universal Data Link (UDL) file (.udl). This will let you try things out before commiting to running your PowerShell script. If you're logged in as the setup user account (which you should be if you're attempting to create the farm) you should be able to connect to the instance using Windows Authentication. Once connected you should be able to see databases in the database dropdown list (or the Test Connection button will return success). You should be to test both the direct connection to the server and the alias. If you think the issue is with the server name, you can use a IP in the alias or localhost if it's the same machine (which it sounds like it is)


    Jason Warren
    Infrastructure Specialist



    lunedì 9 luglio 2012 13:34