You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Umeshbalegar <um...@yahoo.com> on 2010/04/04 20:40:29 UTC

Intermittent Fatal transport error: Connection timed out:could be due to invalid address

Hi, 
We are using HTTPClient Implementation-Version: 3.0.1. and we have been
facing an Intermittent problem with the following exception. 

[4/4/10 3:46:40:717 GMT] 0000003d SystemErr     R Fatal transport error:
Connection timed out:could be due to invalid address
[4/4/10 3:46:40:717 GMT] 0000003d SystemErr     R java.net.SocketException:
Connection timed out:could be due to invalid address
[4/4/10 3:46:40:718 GMT] 0000003d SystemErr     R 	at
java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:391)
[4/4/10 3:46:40:718 GMT] 0000003d SystemErr     R 	at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:252)
[4/4/10 3:46:40:718 GMT] 0000003d SystemErr     R 	at
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:239)
[4/4/10 3:46:40:718 GMT] 0000003d SystemErr     R 	at
java.net.SocksSocketImpl.connect(SocksSocketImpl.java:389)
[4/4/10 3:46:40:718 GMT] 0000003d SystemErr     R 	at
java.net.Socket.connect(Socket.java:551)
[4/4/10 3:46:40:718 GMT] 0000003d SystemErr     R 	at
java.net.Socket.connect(Socket.java:501)
[4/4/10 3:46:40:718 GMT] 0000003d SystemErr     R 	at
java.net.Socket.<init>(Socket.java:409)
[4/4/10 3:46:40:718 GMT] 0000003d SystemErr     R 	at
java.net.Socket.<init>(Socket.java:283)
[4/4/10 3:46:40:718 GMT] 0000003d SystemErr     R 	at
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:79)
[4/4/10 3:46:40:718 GMT] 0000003d SystemErr     R 	at
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:121)
[4/4/10 3:46:40:719 GMT] 0000003d SystemErr     R 	at
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706)
[4/4/10 3:46:40:719 GMT] 0000003d SystemErr     R 	at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:386)
[4/4/10 3:46:40:719 GMT] 0000003d SystemErr     R 	at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
[4/4/10 3:46:40:719 GMT] 0000003d SystemErr     R 	at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
[4/4/10 3:46:40:719 GMT] 0000003d SystemErr     R 	at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
[4/4/10 3:46:40:719 GMT] 0000003d SystemErr     R 	at
com.gbwp.util.ExternalModuleFetcher.runHttp(ExternalModuleFetcher.java:112)
[4/4/10 3:46:40:719 GMT] 0000003d SystemErr     R 	at
com.gbwp.util.ExternalModuleFetcher.getModuleData(ExternalModuleFetcher.java:60)
[4/4/10 3:46:40:719 GMT] 0000003d SystemErr     R 	at
com.gbwp.finder.GBProductListingAction.setMetaDataModuleHtml(GBProductListingAction.java:454)
[4/4/10 3:46:40:719 GMT] 0000003d SystemErr     R 	at
com.gbwp.finder.GBProductListingAction.execute(GBProductListingAction.java:237)
[4/4/10 3:46:40:719 GMT] 0000003d SystemErr     R 	at
sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
[4/4/10 3:46:40:719 GMT] 0000003d SystemErr     R 	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[4/4/10 3:46:40:719 GMT] 0000003d SystemErr     R 	at
java.lang.reflect.Method.invoke(Method.java:618)
[4/4/10 3:46:40:719 GMT] 0000003d SystemErr     R 	at
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:440)
[4/4/10 3:46:40:719 GMT] 0000003d SystemErr     R 	at
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:279)
[4/4/10 3:46:40:719 GMT] 0000003d SystemErr     R 	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:242)
[4/4/10 3:46:40:719 GMT] 0000003d SystemErr     R 	at
com.gbwp.interceptors.CacheAllNeMapInterceptor.intercept(CacheAllNeMapInterceptor.java:58)
[4/4/10 3:46:40:719 GMT] 0000003d SystemErr     R 	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
[4/4/10 3:46:40:719 GMT] 0000003d SystemErr     R 	at
com.gbwp.interceptors.NavigationInterceptor.intercept(NavigationInterceptor.java:56)
[4/4/10 3:46:40:719 GMT] 0000003d SystemErr     R 	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
[4/4/10 3:46:40:719 GMT] 0000003d SystemErr     R 	at
com.gbwp.interceptors.SessionUpdateInterceptor.intercept(SessionUpdateInterceptor.java:57)
[4/4/10 3:46:40:719 GMT] 0000003d SystemErr     R 	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
com.gbwp.interceptors.SeoInterceptor.intercept(SeoInterceptor.java:53)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
com.gbwp.interceptors.LocaleInterceptor.intercept(LocaleInterceptor.java:79)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:837)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:680)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:588)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:524)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3548)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:269)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:818)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:125)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
[4/4/10 3:46:40:720 GMT] 0000003d SystemErr     R 	at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
[4/4/10 3:46:40:721 GMT] 0000003d SystemErr     R 	at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
[4/4/10 3:46:40:721 GMT] 0000003d SystemErr     R 	at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
[4/4/10 3:46:40:721 GMT] 0000003d SystemErr     R 	at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
[4/4/10 3:46:40:721 GMT] 0000003d SystemErr     R 	at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
[4/4/10 3:46:40:721 GMT] 0000003d SystemErr     R 	at
com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
[4/4/10 3:46:40:721 GMT] 0000003d SystemErr     R 	at
com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
[4/4/10 3:46:40:721 GMT] 0000003d SystemErr     R 	at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
[4/4/10 3:46:40:721 GMT] 0000003d SystemErr     R 	at
com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
[4/4/10 3:46:40:721 GMT] 0000003d SystemErr     R 	at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)

Below piece of code runs on AIX, Websphere environment and throws the above
exception. 

	  private String runHttp(String url) {
		String timeout = "2000"  ;
		String numOfRetries = "1"  ;
		String responseBody = "";
		
		MultiThreadedHttpConnectionManager connManager = new
MultiThreadedHttpConnectionManager();
		HttpConnectionManagerParams parms = new HttpConnectionManagerParams();
		parms.setDefaultMaxConnectionsPerHost(20);
		parms.setConnectionTimeout(Integer.parseInt(timeout.trim()));
		connManager.setParams(parms);
	    HttpClient client = new HttpClient(connManager);
	    
	    GetMethod method = new GetMethod(url);
	    method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER,  new
DefaultHttpMethodRetryHandler(Integer.parseInt(numOfRetries.trim()),
false));
	    method.getParams().setParameter(HttpMethodParams.SO_TIMEOUT,
Integer.parseInt(timeout.trim()));
	    
	    method.setFollowRedirects(true);
	    
	    try {
	    	int statusCode = client.executeMethod(method);
	        if (statusCode != HttpStatus.SC_OK) {
	          logger .error("Method failed: " + method.getStatusLine());
	        }
	        InputStream stream = method.getResponseBodyAsStream();
	        responseBody = convertStreamToString(stream);
	      }	catch (Exception e) 
	      {
	    	  e.printStackTrace();
	      }finally {
	        // Release the connection.
	        method.releaseConnection();
	      }  	      
	      return responseBody;
	  }

We have tried to debugg this and no success, any help would be immensely
appreciated. 
-- 
View this message in context: http://old.nabble.com/Intermittent-Fatal-transport-error%3A-Connection-timed-out%3Acould-be-due-to-invalid-address-tp28133663p28133663.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: Intermittent Fatal transport error: Connection timed out:could be due to invalid address

Posted by Umeshbalegar <um...@yahoo.com>.
Can anyone please help me on this?
-- 
View this message in context: http://old.nabble.com/Intermittent-Fatal-transport-error%3A-Connection-timed-out%3Acould-be-due-to-invalid-address-tp28133663p28270264.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org