Category Archives: windows server

No buffer space available (maximum connections reached?)

Caused by: java.net.SocketException: No buffer space available (maximum connections reached?): connect

This is most likely due to the number of ephemeral TCP ports being exhausted, the server has too many active client connections due to which the ephemeral TCP ports are all used up and in this case no more ports can be allocated to a new client connection request resulting in the behaviour we see here that no new connections can be setup.

Quoting from Wikipedia entry:
http://en.wikipedia.org/wiki/Ephemeral_port

“Ephemeral port is a transport protocol port for Internet Protocol (IP) communications allocated automatically from a predefined range by the TCP/IP Stack Software. It is typically used by the TCP, UDP or SCTP as port for the client end of a client-server communication when the application doesn’t bind the socket to a specific port number, or by a server application to free up service’s well known listening port and establish a service connection to the client host. The allocations are temporary and only valid for the duration of the connection. After completion of the communication session the ports become available for reuse, although most implementations simply increment the last used port number until the ephemeral port range is exhausted.”

This is a known issue on Windows boxes, a hotfix is available from Microsoft: “Kernel sockets leak on a multiprocessor computer that is running Windows Server 2008 R2 or Windows 7” – http://support.microsoft.com/kb/2577795

http://rwatsh.blogspot.be/2012/04/resolution-for-no-buffer-space.html
http://dbaktiar-on-java.blogspot.be/2010/03/hudson-shows-buffer-space-available.html

Invalid XSL format (or) file name.

Are you executing some wmic commands, most likely with a format command and getting the following error : Invalid XSL format (or) file name.

for example : wmic process list FULL /FORMAT:CSV

You running on Windows 7 (64-bit) or Windows 2008 R2 and have installed additional keyboards or language settings.

It seems that some wmic commands use files that are located in a localized folder:

on 32-bit : C:WindowsSystem32wbemen-US
on 64-bit : C:WindowsSysWOW64wbemen-US

If you have for example a UK keyboard layout installed, simply copy C:WindowsSysWOW64wbemen-US to C:WindowsSysWOW64wbemen-GB.

Your format command above should work fine now.

Disable UAC for Windows Servers through Group Policy

In Computer Configuration | Policies | Windows Settings | Security Settings | Local Policies | Security Options configure the following values:

– User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode
– User Account Control: Detect application installations and prompt for elevation
– User Account Control: Turn on Admin Approval Mode

Source.

Pagefile Management for Windows Server Core

First you need to disable the automatic management:

wmic
>computersystem where name=”hostname” set AutomaticManagedPagefile=False

Next, you select where to put the pagefile and how big it should be (expressed in MB)

wmic
>pagefileset where name=”C:\pagefile.sys” set InitialSize=8192,MaximumSize=8192

More info : http://blogs.dirteam.com/blogs/sanderberkouwer/archive/2007/12/27/page-files-in-server-core.aspx

Free eBook: Understanding Microsoft Virtualization R2 Solutions

Learn about the latest Microsoft Virtualization technologies, including Hyper-V and Windows Azure. Download Understanding Microsoft Virtualization R2 Solutions, written by industry expert Mitch Tulloch along with the Microsoft Virtualization team.

http://blogs.technet.com/b/johnbaker/archive/2011/11/04/free-ebook-understanding-microsoft-virtualization-r2-solutions.aspx