I decided to create a three tier farm using SharePoint 2010 and while trying to join a Web Frontend server to the farm I got several error messages. The first one occurred because of the Named Pipes Provider, the second one because of a wrong PowerShell parameter I used and the third on occurred because of my Firewall settings.
Although I used PowerShell scripts and directly got an error message in the command line you can also find the in the 14 hive if you use the Installation wizard:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS
SQL Server 2008 R2 and Named Pipes
I missed a configuration step after installing SQL Server 2008 even though I have described it in my own installation guide: Installing SharePoint Server 2010 on Windows Server 2008 R2 and SQL Server 2008 R2 - Part 7: SQL Server 2008 R2 installation and configuration. This was because my application server and database server are on the same virtual image.
Error message
Connect-SPConfigurationDatabase: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Solution
You need to turn on Named Pipes using the SQL Server Configuration Manager. You need this if you want to join
PowerShell and Connect-SPConfigurationDatabase
You can use PowerShell and the Microsoft.SharePoint.PowerShell snap in to administrate SharePoint 2010. If you want to join a new Web Frontend server you can use the following cmdlet:
Connect-SPConfigurationDatabase [-DatabaseName] <String> [-Passphrase] <SecureString> -DatabaseServer <String> [-AssignmentCollection <SPAssignmentCollection>] [-DatabaseCredentials <PSCredential>] [<CommonParameters>]
The provided example is the following:
Connect-SPConfigurationDatabase -DatabaseServer "ServerName\InstanceName" -DatabaseName "SharePointConfigurationDatabaseName" -Passphrase (ConvertTo-SecureString "MyP@ssw0rd" -AsPlainText -Force
Error message
Connect-SPConfigurationDatabase: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 25 - Connection string is not valid)
Solution
The value for parameter –DatabaseServer was wrong since I used the server name and the instance name. After using only the server name it worked. I don’t know why but maybe this is because I only created the the default instance in SQL Server.
SharePoint 2010 and firewalls
Luckily I never had to deploy SharePoint with firewalls between servers…
Error message
Connect-SPConfigurationDatabase: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Solution
If you have a development environment just disable the firewall. :)

Summary
That’s it. After resolving the 3 described issues I was able to join my SharePoint 2010 farm. Note: Be aware that this error would have occurred earlier if I would use a separate virtual image for my database server. In this case the error would happen while creating a new SharePoint farm.