Saturday, October 24, 2015

SharePoint 2013: Config Wizard doesn't recognize certain updates

I installed a couple of updates for SharePoint and tried to run the Config Wizard. Well, it didn't go so well, because some updates were missing on some servers, even after I installed them. I found this little PowerShell cmd:
Get-SPProduct -local
So, now: What does this do?
As far as I know, this will check the registry for required farm wide updates and also I think it is checking different MSI-Package Installation information. After that it will run a stored procedure on SQL Server which will update the product version. This might sound a bit sketchy, but if I find more detailed information out there I will link it below.
It is important to note that you can run this with "-local", to get only the information of the server you are on, but also without "-local" which will return the products installed on the farm.

Source: Technet
*edit*
As promised: I found more information on that command -> The Magic of Get-SPProduct -Local by Trevor Seward

Thursday, October 22, 2015

Windows Server 2003 / 2008: Lack of sufficient buffer space or queue was full

So users had issues with connections to SharePoint 2010 on a Windows Server 2008. The only thing they were able to tell we was a Correlation ID, which still is the best starting point you can imagine. The log, of course, was a mess with errors, the most interesting was this one:
System.Data.SqlClient.SqlException: 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: TCP Provider, error: 0 - An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.)
And also:
SqlError: '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: TCP Provider, error: 0 - An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.)' Source: '.Net SqlClient Data Provider' Number: 10055 State: 0 Class: 20 Procedure: '' LineNumber: 0 Server: ''

Also some issues with a connection string.
ConnectionString: 'Data Source=SERVERNAME\INSTANCE,PORT;Initial Catalog=DATABASE;Integrated Security=True;Enlist=False;Asynchronous Processing=False;Connect Timeout=15' ConnectionState: Closed ConnectionTimeout: 15

Now that we got that error: How do we fix it? And what went wrong?
First you have to take a look at the available dynamic ports:

The output will look something like this:
Depending on the system you are running and the amount of users you have to support, well: this might not be enough and will explain the errors above.
Let's fix this:

"start=" defines the first dynamicport that could be used. The "num=" defines the range, in my case I got 1000 Ports available, starting with 49152. That's a lot more and should allow more users to connect. If you still get the error, but not as often as you used to, just set the range higher, I think the range is up to 16384, because that's the range of dynamic, private and ephemeral ports.

As a little knowledge nugget: How to do this on Windows Server 2003 and older?
Go to the registry HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters, check if there is a "MaxUserPort" entry there. If not, create a DWORD, the standard value is 5000 (decimal) oder 0x1388 (hex), you can enter values up to 65534 (decimal). This will define the highest available TCP/IP port, starting with the first port 1024. So: "MaxUserPort" - 1024 = available dynamic ports.