Hi, When we run xmlrpc, we can see a steady increase in the number of CLOSE_WAIT sockets over time. These sockets are not closed automatically. Our client and server runs on the same unix box. We use the xmlrpc in the following way.
import org.apache.xmlrpc.client.XmlRpcClientConfigImpl; import org.apache.xmlrpc.client.XmlRpcClient; import org.apache.xmlrpc.client.XmlRpcCommonsTransportFactory; import java.net.URL; public class XmlRpc { private XmlRpcClient client=null; private XmlRpc() { try { XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl(); String PORT= System.getenv("MYSYS_PORT"); if (PORT==null) { PORT="8000"; } StringBuffer ServerURL= new StringBuffer(); ServerURL.append("http://127.0.0.1:").append(PORT).append("/xmlrpc"); config.setServerURL(new URL(ServerURL.toString())); config.setEnabledForExtensions(true); config.setConnectionTimeout(20 * 1000); config.setReplyTimeout(20 * 1000); this.client = new XmlRpcClient(); // use Commons HttpClient as transport client.setTransportFactory(new XmlRpcCommonsTransportFactory(client)); // set configuration client.setConfig(config); } catch (Exception e) { Util.logger.error("xmlrpc",e); } } public static XmlRpc XMLRPC=new XmlRpc(); public Object call(String m,String f,Object[] a) throws Exception { return Util.get_result(client.execute(m+"."+f, a)); } } The 'call' function gets called through XMLRPC object in the following fashion in a different file public static void main(String[] args) throws Exception { String x=(String)XmlRpc.XMLRPC.call("XYZ","echo",new Object[]{"test"}); System.out.println("x="+x); } A snippet of the 'netstat' is (the port numbers are not mentioned) tcp 0 0 localhost: localhost: CLOSE_WAIT tcp 1 0 localhost: localhost: CLOSE_WAIT tcp 1 0 localhost: localhost: CLOSE_WAIT tcp 1 0 localhost: localhost: CLOSE_WAIT tcp 1 0 localhost: localhost: CLOSE_WAIT tcp 1 0 localhost: localhost: CLOSE_WAIT tcp 1 0 localhost: localhost: CLOSE_WAIT tcp 1 0 localhost: localhost: CLOSE_WAIT tcp 1 0 localhost: localhost: CLOSE_WAIT tcp 1 0 localhost: localhost: CLOSE_WAIT tcp 1 0 localhost: localhost: CLOSE_WAIT tcp 1 0 localhost: localhost: CLOSE_WAIT tcp 1 0 localhost: localhost: CLOSE_WAIT tcp 1 0 localhost: localhost: CLOSE_WAIT tcp 1 0 localhost: localhost: CLOSE_WAIT tcp 1 0 localhost: localhost: CLOSE_WAIT The situation does not improve even if we create a new client for each connection as follows: public Object call(String m,String f,Object[] a) throws Exception { XmlRpcClient client = new XmlRpcClient(); // use Commons HttpClient as transport client.setTransportFactory(new XmlRpcCommonsTransportFactory(client)); // set configuration client.setConfig(config); return Util.get_result(client.execute(m+"."+f, a)); } Our questions are: Should we also be creating the ?config? instance within the ?call? method ? Are there any known problems using this library and this specific mechanism to communicate to non XML rpc servers (ours is in Erlang). And do we need to do something special (since both client and server are running on a local host). Kind regards, Ram-A Kumar --- This communication may contain confidential and/or privileged information. If you are not the intended recipient (or have received this communication in error) please notify the sender immediately and destroy this communication. Any unauthorized copying, disclosure or distribution of the material in this communication is strictly forbidden. Deutsche Bank does not render legal or tax advice, and the information contained in this communication should not be regarded as such.