tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rohan Kadam <roha...@cybage.com>
Subject RE: Tomcat is not able to connect to IPV4 (Tomcat Version : 7.0.14)
Date Wed, 13 Jul 2011 10:01:56 GMT
I really apologize for the confusion created. 

We are having an application, which is deployed on tomcat. Rather we are shipping the application
with tomcat. After extraction (complete installation), the application is placed under the
webapps directory.

The logs that I have shared is from the console, while debugging the application.

To summarize more, we were facing a similar kind of problem in an earlier version of tomcat
when we upgraded it from 5.5.26 to 5.5.30 (We were able to access the link through browser,
but not through application). To solve this issue, we modified the connector tag in the server.xml
file.

	<Connector port="7070"    	  maxHttpHeaderSize="8192"
               	  maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
             	  enableLookups="false" redirectPort="8443" acceptCount="100"
               	  connectionTimeout="20000" disableUploadTimeout="true" address="0.0.0.0"
/>

As, it can be seen from above we have added address="0.0.0.0" in the connector tag, by doing
so we were able to connect. 

Now, as per the new requirement, we are upgrading our tomcat from 5.5.30 to 7.0.14(Since the
folder structure is changed, we are shipping the fresh copy of tomcat). We have modified the
connector tag as we have done for 5.5.30, but still no success. Please let me know if I am
missing something or you want more information for the same.

Thanks.

-----Original Message-----
From: André Warnier [mailto:aw@ice-sa.com] 
Sent: Wednesday, July 13, 2011 3:12 PM
To: Tomcat Users List
Subject: Re: Tomcat is not able to connect to IPV4 (Tomcat Version : 7.0.14)

Rohan,

what you have never clearly explained until now in this rather long thread, is what you are
exactly trying to do.

Is it :

a) an external application written in Java, which is trying to connect to Tomcat ?
(and the log lines below are from the logfile of that application)

OR

b) is it a webapp /within Tomcat/ which is trying to connect to some other server ?
(and the log lines below are from a Tomcat logfile)

Then, when you have answered the above, can you show us exactly which parameters you are using
for the org.apache.commons.httpclient connection method, to set up this connection ?
(host, port, URL, whatever)



Rohan Kadam wrote:
> Hi All,
> 
> I tried again. And still not successful, please find the stack trace below -
> 
> INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection
refused: connect
> Jul 13, 2011 12:10:36 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
> INFO: Retrying request
> java.net.ConnectException: Connection refused: connect
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(Unknown Source)
>         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
>         at java.net.PlainSocketImpl.connect(Unknown Source)
>         at java.net.SocksSocketImpl.connect(Unknown Source)
>         at java.net.Socket.connect(Unknown Source)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>         at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:139)
>         at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:124)
>         at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706)
>         at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1321)
>         at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:386)
>         at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
>         at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
>         at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
>         at com.symantec.lua.util.rcl.HttpHelper.open(HttpHelper.java:209)
>         at com.symantec.lua.manager.config.ConfigManagerUtil.testServerConnection(ConfigManagerUtil.java:82)
>         at com.symantec.lua.manager.config.ConfigManagerUtil.testServerConnection(ConfigManagerUtil.java:30)
>         at com.symantec.lua.presentation.common.ServerStatusAction.doAction(ServerStatusAction.java:148)
>         at com.ultimatetech.console.core.presentation.action.ActionThread.run(ActionThread.java:76)
>         at com.ultimatetech.console.core.presentation.action.CoreAction.execute(CoreAction.java:184)
>         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
>         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
>         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
>         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>         at com.ultimatetech.console.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:82)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
>         at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:843)
>         at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:679)
>         at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1293)
>         at java.lang.Thread.run(Unknown Source)
> 
> I am able to open the link through browser but not through application. Also I have checked
firewall setting, it is not blocking any ports.
> 
> Please suggest.
> 
> Thanks,
> Rohan Kadam.
> 
> -----Original Message-----
> From: Christopher Schultz [mailto:chris@christopherschultz.net] 
> Sent: Thursday, July 07, 2011 1:55 AM
> To: Tomcat Users List
> Subject: Re: Tomcat is not able to connect to IPV4 (Tomcat Version : 7.0.14)
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Rohan,
> 
> On 7/5/2011 12:18 AM, Rohan Kadam wrote:
>> I apologize for the typo made by me. I used  only 
>> "-Djava.net.preferIPv4Stack=true" in the java option pane. But it 
>> didn't work.
> 
> Go back and read Konstantin's response.
> 
> Sounds like you have two options:
> 
> 1. Use another connector (BIO or NIO)
> 2. Configure APR to use IPv4
> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAk4UxJUACgkQ9CaO5/Lv0PBpagCfbk2I1OflSti0DwkNzekOH9dG
> pAAAn0M7VXdoeo3LnMygLDMY4vwVA6/p
> =8luQ
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 
> "Legal Disclaimer: This electronic message and all contents contain information from
Cybage Software Private Limited which may be privileged, confidential, or otherwise protected
from disclosure. The information is intended to be for the addressee(s) only. If you are not
an addressee, any disclosure, copy, distribution, or use of the contents of this message is
strictly prohibited. If you have received this electronic message in error please notify the
sender by reply e-mail to and destroy the original message and all copies. Cybage has taken
every reasonable precaution to minimize the risk of malicious content in the mail, but is
not liable for any damage you may sustain as a result of any malicious content in this e-mail.
You should carry out your own malicious content checks before opening the e-mail or attachment."

> www.cybage.com


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



"Legal Disclaimer: This electronic message and all contents contain information from Cybage
Software Private Limited which may be privileged, confidential, or otherwise protected from
disclosure. The information is intended to be for the addressee(s) only. If you are not an
addressee, any disclosure, copy, distribution, or use of the contents of this message is strictly
prohibited. If you have received this electronic message in error please notify the sender
by reply e-mail to and destroy the original message and all copies. Cybage has taken every
reasonable precaution to minimize the risk of malicious content in the mail, but is not liable
for any damage you may sustain as a result of any malicious content in this e-mail. You should
carry out your own malicious content checks before opening the e-mail or attachment." 
www.cybage.com
Mime
View raw message