Forum Discussion
SharePoint 2016 Named Pipes
Setting up an on-premises multi-server SharePoint 2016 farm and having problems with servers disconnecting from the SQL Server 2016 database. Lots of messages in the ULS logs about Named Pipes Provider, error: 40 - Could not open a connection to SQL Server.
We are using TCP/IP on default port 1433, and I've tried with and without SQL Aliases.
Does the Named Pipes protocol need to be enabled on the MSSQLSERVER network configuration? This wasn't the case for SharePoint 2010 and SQL Server 2008 R2.
4 Replies
- No, you shouldn't need named pipes enabled; it's disabled by default in SQL.
That said, can you share a more comprehensive ULS log?- Thomas KupkaIron Contributor
Hey Trevor, thanks for responding. Been dealing with this for 3 weeks.
The semi-quick story...
Building a HA 10 server farm using minrole, not including the DB server. When I first built it, all 10 servers connected successfully and configured. After a few days, 2 servers could no longer connect with SharePoint services or SSMS. Then a few more. Now I only have 5 of 10 connected. If I restart SQL, all good for a few day, then problems resurface. Can telnet from SP to SQL on 1433 without issues every time. Thought it was an ODBC problem, but can connect with .udl connection every time. Seems like a connect limit gets reached on SQL 2016, but not sure how to diagnose or prove.
Application Event log example:
Unknown SQL Exception 53 occurred. Additional error information from SQL Server is included below.
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)
ULS Log example:
System.Data.SqlClient.SqlException (0x80131904): 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) ---> System.ComponentModel.Win32Exception (0x80004005): The network path was not found
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.SharePoint.Utilities.SqlSession.OpenConnection() ClientConnectionId:00000000-0000-0000-0000-000000000000 Error Number:53,State:0,Class:20- Thomas KupkaIron Contributor
Appreciate any help you can provide, or point me in the right direction. Also, love your Deploying SharePoint 2016 book. Helped me more than once on this journey.
This is one more from the ULS logs. See that max pool size= 100? Where does that come from?
SQL connection time: 60282.3704186822 for Data Source=SPDBTSTA;Failover Partner=SPDBTSTB;Initial Catalog=SP_ConfigDB;Integrated Security=True;Persist Security Info=False;Enlist=False;Pooling=True;Min Pool Size=0;Max Pool Size=100;PoolBlockingPeriod=Auto;Asynchronous Processing=False;Connection Reset=True;MultipleActiveResultSets=False;Replication=False;Connect Timeout=60;Encrypt=False;TrustServerCertificate=False;Load Balance Timeout=0;Packet Size=8000;Type System Version=Latest;Application Name=SharePoint[psconfigui][1][SP_ConfigDB];User Instance=False;Context Connection=False;Transaction Binding="Implicit Unbind";ApplicationIntent=ReadWrite;MultiSubnetFailover=False;TransparentNetworkIPResolution=True;ConnectRetryCount=1;ConnectRetryInterval=10;Column Encryption Setting=Disabled ConnectionId: 00000000-0000-0000-0000-000000000000