Wednesday, April 11, 2012

vCenter Inventory Service Tune Up

I noticed that the wrapper.log file (typically found in C:/ProgramData/VMware/Infrastructure/Inventory Service/Logs/wrapper.log) for the VMware Inventory Service (which gets installed with the vCenter server) can keep growing by default and so if you are not interested in wrapper.log file to keep growing forever and thus impacting eventually the vCenter server itself (since it will fill up the entire disk space) then change the wrapper.conf to have a rolling file instead of a growing log file.

#********************************************************************
# Wrapper Logging Properties
#********************************************************************


# Log file to use for wrapper output logging.
wrapper.logfile=C:/ProgramData/VMware/Infrastructure/Inventory Service/Logs/wrapper.log

# Format of output for the log file. (See docs for formats)
wrapper.logfile.format=LPTM

# Log Level for log file output. (See docs for log levels)
wrapper.logfile.loglevel=INFO

# Maximum size that the log file will be allowed to grow to before
# the log is rolled. Size is specified in bytes. The default value
# of 0, disables log rolling. May abbreviate with the 'k' (kb) or
# 'm' (mb) suffix. For example: 10m = 10 megabytes.
wrapper.logfile.maxsize=100m

# Maximum number of rolled log files which will be allowed before old
# files are deleted. The default value of 0 implies no limit.
wrapper.logfile.maxfiles=2


Wednesday, April 04, 2012

Resolution for “No buffer space available (maximum connections reached?): JVM_Bind” issue

I hit this issue recently which occurred on only one windows 7 host. The error was caused by this hard to guess reason (http://support.microsoft.com/kb/196271). The default number of ephemeral TCP ports is 5000. Sometimes this number may become less if 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 can be allocated to a new client connection request resulting in the below issue (for a Java application):
Caused by: java.net.SocketException: No buffer space available (maximum connections reached?): JVM_Bind
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
    at java.net.Socket.bind(Socket.java:577)
    at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.bind(BaseSSLSocketImpl.java:95)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.bind(SSLSocketImpl.java:45)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:399)
    at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:123)
    at org.apache.commons.httpclient.contrib.ssl.EasySSLProtocolSocketFactory.createSocket(EasySSLProtocolSocketFactory.java:183)
    at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
    at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
    at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
    at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
 



The resolution is to open the registry editor and locate the registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters and add a new entry as shown below:

Value Name: MaxUserPort
Value Type: DWORD
Value data: 65534
That’s it! Thanks to Daniel Baktiar for his post.

Update 6/14/2012:
Microsoft has a hot fix to resolve this issue for Win2K8 R2 and Win7: http://support.microsoft.com/kb/2577795

Book Review: Spring Start Here: Learn what you need and learn it well

  Spring Start Here: Learn what you need and learn it well by Laurentiu Spilca My rating: 5 of 5 stars This is an excellent book on gett...