submission leads to HttpConnection.open() leads to conenction timeout

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

submission leads to HttpConnection.open() leads to conenction timeout

Bart Ottenkamp
Hai all,

I'm having a problem with the submission functionality.

as the following part of debug logging shows, a submission leads to a HttpConnection.open():

""
2009-07-28 10:06:04,332 DEBUG XFormsServer  - XForms -     connection - setting cookie {JSESSIONID: "98CE78D1B1DBC7095547059460577BDC"}
2009-07-28 10:06:04,332 DEBUG XFormsServer  - XForms -     connection - opening URL connection {URL: "http://test.e-inwoner.nl:11085/orbeon/e-formulieren/mail"}
2009-07-28 10:06:04,351 DEBUG DefaultHttpParams  - Set parameter http.useragent = Jakarta Commons-HttpClient/3.1
2009-07-28 10:06:04,353 DEBUG DefaultHttpParams  - Set parameter http.protocol.version = HTTP/1.1
2009-07-28 10:06:04,354 DEBUG DefaultHttpParams  - Set parameter http.connection-manager.class = class org.apache.commons.httpclient.SimpleHttpConnectionManager
2009-07-28 10:06:04,354 DEBUG DefaultHttpParams  - Set parameter http.protocol.cookie-policy = default
2009-07-28 10:06:04,354 DEBUG DefaultHttpParams  - Set parameter http.protocol.element-charset = US-ASCII
2009-07-28 10:06:04,354 DEBUG DefaultHttpParams  - Set parameter http.protocol.content-charset = ISO-8859-1
2009-07-28 10:06:04,355 DEBUG DefaultHttpParams  - Set parameter http.method.retry-handler = org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@6a773ec0
2009-07-28 10:06:04,355 DEBUG DefaultHttpParams  - Set parameter http.dateparser.patterns = [EEE, dd MMM yyyy HH:mm:ss zzz, EEEE, dd-MMM-yy HH:mm:ss zzz, EEE MMM d HH:mm:ss yyyy, EEE, dd-MMM-yyyy HH:mm:ss z, EEE, dd-MMM-yyyy HH-mm-ss z, EEE, dd MMM yy HH:mm:ss z, EEE dd-MMM-yyyy HH:mm:ss z, EEE dd MMM yyyy HH:mm:ss z, EEE dd-MMM-yyyy HH-mm-ss z, EEE dd-MMM-yy HH:mm:ss z, EEE dd MMM yy HH:mm:ss z, EEE,dd-MMM-yy HH:mm:ss z, EEE,dd-MMM-yyyy HH:mm:ss z, EEE, dd-MM-yyyy HH:mm:ss z]
2009-07-28 10:06:04,360 DEBUG DefaultHttpParams  - Set parameter http.connection-manager.max-per-host = {HostConfiguration[]=2147483647}
2009-07-28 10:06:04,360 DEBUG DefaultHttpParams  - Set parameter http.connection-manager.max-total = 2147483647
2009-07-28 10:06:04,382 DEBUG XFormsServer  - XForms -     submission - setting request body {mediatype: "application/xml", body: "<?xml version="1.0" encoding="UTF-8"?><formcontent xmlns:f="http://orbeon.org/oxf/xml/formatting" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:divosa="http://www.divosa.com/ops/processors" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:widget="http://orbeon.org/oxf/xml/widget" xmlns:exf="http://www.exforms.org/exf/1-0"><form-info group-name="wigo4it" user-name="[hidden email]" modified-date="27-07-2009 12:11:01" form-name="Bart01"/><prefilleddata form-name="Bart01"><dkdintserv/></prefilleddata><constants/><widgetTree><widget value="200022077" description="Bart01" addOverview="true" css="" email="" google="" overviewName="Afronden" overviewRelevance="" pdfEndPage="" pdfFrontPage="" pdfTemplatePage="" widgetType="form"><widget value="200022092" description="START" widgetType="tab"><widget value="200022091" description="184290181" align="none" class="" divStyle="" helptext="" includeInOverview="true" title="" widgetType="block"><widget value="200022088" description="184624273" align="horizontal" class="" divStyle="" helptext="" includeInOverview="true" title="" widgetType="block"><widget value="200022089" description="184491593" class="" helptext="" hinttext="" modelValue="bsn" widgetType="outputText"/><widget value="200022090" description="bsn" field="" constrainttext="" dkd="" helptext="" hinttext="" incremental="" initValue="" widgetType="inputText" xsdType="" xxforms_maxlength="" xxforms_size=""><value>864</value></widget></widget></widget><widget value="200022093" description="**Knoppen" align="none" class="" divStyle="" helptext="" includeInOverview="true" title="" widgetType="block"/></widget></widget></widgetTree></formcontent>"}
2009-07-28 10:06:04,384 DEBUG HttpClient  - Java version: 1.6.0_13
2009-07-28 10:06:04,384 DEBUG HttpClient  - Java vendor: Sun Microsystems Inc.
2009-07-28 10:06:04,384 DEBUG HttpClient  - Java class path: :/home/tcorbeon/tomcat_toolkit_staging/bin/bootstrap.jar
2009-07-28 10:06:04,384 DEBUG HttpClient  - Operating system name: Linux
2009-07-28 10:06:04,384 DEBUG HttpClient  - Operating system architecture: amd64
2009-07-28 10:06:04,384 DEBUG HttpClient  - Operating system version: 2.6.21-xenU
2009-07-28 10:06:04,399 DEBUG HttpClient  - SUN 1.6: SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS keystore; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Collection CertStores, JavaPolicy Policy; JavaLoginConfig Configuration)
2009-07-28 10:06:04,399 DEBUG HttpClient  - SunRsaSign 1.5: Sun RSA signature provider
2009-07-28 10:06:04,399 DEBUG HttpClient  - SunJSSE 1.6: Sun JSSE provider(PKCS12, SunX509 key/trust factories, SSLv3, TLSv1)
2009-07-28 10:06:04,399 DEBUG HttpClient  - SunJCE 1.6: SunJCE Provider (implements RSA, DES, Triple DES, AES, Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC)
2009-07-28 10:06:04,399 DEBUG HttpClient  - SunJGSS 1.0: Sun (Kerberos v5, SPNEGO)
2009-07-28 10:06:04,399 DEBUG HttpClient  - SunSASL 1.5: Sun SASL provider(implements client mechanisms for: DIGEST-MD5, GSSAPI, EXTERNAL, PLAIN, CRAM-MD5; server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5)
2009-07-28 10:06:04,400 DEBUG HttpClient  - XMLDSig 1.0: XMLDSig (DOM XMLSignatureFactory; DOM KeyInfoFactory)
2009-07-28 10:06:04,400 DEBUG HttpClient  - SunPCSC 1.6: Sun PC/SC provider
2009-07-28 10:06:04,402 DEBUG PostMethod  - enter PostMethod.clearRequestBody()
2009-07-28 10:06:04,402 DEBUG EntityEnclosingMethod  - enter EntityEnclosingMethod.clearRequestBody()
2009-07-28 10:06:04,403 DEBUG HttpClient  - enter HttpClient.executeMethod(HttpMethod)
2009-07-28 10:06:04,403 DEBUG HttpClient  - enter HttpClient.executeMethod(HostConfiguration,HttpMethod,HttpState)
2009-07-28 10:06:04,409 DEBUG MultiThreadedHttpConnectionManager  - enter HttpConnectionManager.getConnectionWithTimeout(HostConfiguration, long)
2009-07-28 10:06:04,409 DEBUG MultiThreadedHttpConnectionManager  - HttpConnectionManager.getConnection:  config = HostConfiguration[host=http://test.e-inwoner.nl:11085], timeout = 0
2009-07-28 10:06:04,409 DEBUG MultiThreadedHttpConnectionManager  - enter HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
2009-07-28 10:06:04,410 DEBUG MultiThreadedHttpConnectionManager  - enter HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
2009-07-28 10:06:04,410 DEBUG MultiThreadedHttpConnectionManager  - Allocating new connection, hostConfig=HostConfiguration[host=http://test.e-inwoner.nl:11085]
2009-07-28 10:06:04,413 DEBUG HttpMethodDirector  - Attempt number 1 to process request
2009-07-28 10:06:04,413 DEBUG HttpConnection  - enter HttpConnection.open()
2009-07-28 10:06:04,413 DEBUG HttpConnection  - Open connection to test.e-inwoner.nl:11085
""


If this URL is behind a NAT though, this leads to a connection timecout:

""
2009-07-28 10:09:13,424 DEBUG HttpConnection  - enter HttpConnection.closeSockedAndStreams()
2009-07-28 10:09:13,424 DEBUG HttpMethodDirector  - Closing the connection.
2009-07-28 10:09:13,424 DEBUG HttpConnection  - enter HttpConnection.close()
2009-07-28 10:09:13,424 DEBUG HttpConnection  - enter HttpConnection.closeSockedAndStreams()
2009-07-28 10:09:13,424 INFO  HttpMethodDirector  - I/O exception (java.net.ConnectException) caught when processing request: Connection timed out
2009-07-28 10:09:13,446 DEBUG HttpMethodDirector  - Connection timed out
java.net.ConnectException: Connection timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:519)
    at java.net.Socket.connect(Socket.java:469)
    at java.net.Socket.<init>(Socket.java:366)
    at java.net.Socket.<init>(Socket.java:240)
    at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
    at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
    at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
    at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
""

So my question is. Why do we open a connection here????
And can I circumvent this maybe??

Best regards,
Bart Ottenkamp


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: submission leads to HttpConnection.open() leads to conenction timeout

Erik Bruchez-3
Bart,

For the "why", the logs seem to say that your application is opening
this connection. You must have a submission referring to
"/e-formulieren/mail".

For that kind of issues, there is a property which sets the base URI
for service calls:

<property as="xs:anyURI"  name="oxf.url-rewriting.service.base-uri" value=""/>

You could set that to something which doesn't go all the way around
test.e-inwoner.nl.

http://wiki.orbeon.com/forms/doc/developer-guide/configuration-properties#TOC-URL-rewriting

-Erik

On Tue, Jul 28, 2009 at 2:12 AM, Bart Ottenkamp<[hidden email]> wrote:

> Hai all,
>
> I'm having a problem with the submission functionality.
>
> as the following part of debug logging shows, a submission leads to a
> HttpConnection.open():
>
> ""
> 2009-07-28 10:06:04,332 DEBUG XFormsServer  - XForms -     connection -
> setting cookie {JSESSIONID: "98CE78D1B1DBC7095547059460577BDC"}
> 2009-07-28 10:06:04,332 DEBUG XFormsServer  - XForms -     connection -
> opening URL connection {URL:
> "http://test.e-inwoner.nl:11085/orbeon/e-formulieren/mail"}
> 2009-07-28 10:06:04,351 DEBUG DefaultHttpParams  - Set parameter
> http.useragent = Jakarta Commons-HttpClient/3.1
> 2009-07-28 10:06:04,353 DEBUG DefaultHttpParams  - Set parameter
> http.protocol.version = HTTP/1.1
> 2009-07-28 10:06:04,354 DEBUG DefaultHttpParams  - Set parameter
> http.connection-manager.class = class
> org.apache.commons.httpclient.SimpleHttpConnectionManager
> 2009-07-28 10:06:04,354 DEBUG DefaultHttpParams  - Set parameter
> http.protocol.cookie-policy = default
> 2009-07-28 10:06:04,354 DEBUG DefaultHttpParams  - Set parameter
> http.protocol.element-charset = US-ASCII
> 2009-07-28 10:06:04,354 DEBUG DefaultHttpParams  - Set parameter
> http.protocol.content-charset = ISO-8859-1
> 2009-07-28 10:06:04,355 DEBUG DefaultHttpParams  - Set parameter
> http.method.retry-handler =
> org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@6a773ec0
> 2009-07-28 10:06:04,355 DEBUG DefaultHttpParams  - Set parameter
> http.dateparser.patterns = [EEE, dd MMM yyyy HH:mm:ss zzz, EEEE, dd-MMM-yy
> HH:mm:ss zzz, EEE MMM d HH:mm:ss yyyy, EEE, dd-MMM-yyyy HH:mm:ss z, EEE,
> dd-MMM-yyyy HH-mm-ss z, EEE, dd MMM yy HH:mm:ss z, EEE dd-MMM-yyyy HH:mm:ss
> z, EEE dd MMM yyyy HH:mm:ss z, EEE dd-MMM-yyyy HH-mm-ss z, EEE dd-MMM-yy
> HH:mm:ss z, EEE dd MMM yy HH:mm:ss z, EEE,dd-MMM-yy HH:mm:ss z,
> EEE,dd-MMM-yyyy HH:mm:ss z, EEE, dd-MM-yyyy HH:mm:ss z]
> 2009-07-28 10:06:04,360 DEBUG DefaultHttpParams  - Set parameter
> http.connection-manager.max-per-host = {HostConfiguration[]=2147483647}
> 2009-07-28 10:06:04,360 DEBUG DefaultHttpParams  - Set parameter
> http.connection-manager.max-total = 2147483647
> 2009-07-28 10:06:04,382 DEBUG XFormsServer  - XForms -     submission -
> setting request body {mediatype: "application/xml", body: "<?xml
> version="1.0" encoding="UTF-8"?><formcontent
> xmlns:f="http://orbeon.org/oxf/xml/formatting"
> xmlns:xi="http://www.w3.org/2001/XInclude"
> xmlns:ev="http://www.w3.org/2001/xml-events"
> xmlns:xforms="http://www.w3.org/2002/xforms"
> xmlns:xhtml="http://www.w3.org/1999/xhtml"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:divosa="http://www.divosa.com/ops/processors"
> xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
> xmlns:widget="http://orbeon.org/oxf/xml/widget"
> xmlns:exf="http://www.exforms.org/exf/1-0"><form-info group-name="wigo4it"
> user-name="[hidden email]" modified-date="27-07-2009 12:11:01"
> form-name="Bart01"/><prefilleddata
> form-name="Bart01"><dkdintserv/></prefilleddata><constants/><widgetTree><widget
> value="200022077" description="Bart01" addOverview="true" css="" email=""
> google="" overviewName="Afronden" overviewRelevance="" pdfEndPage=""
> pdfFrontPage="" pdfTemplatePage="" widgetType="form"><widget
> value="200022092" description="START" widgetType="tab"><widget
> value="200022091" description="184290181" align="none" class="" divStyle=""
> helptext="" includeInOverview="true" title="" widgetType="block"><widget
> value="200022088" description="184624273" align="horizontal" class=""
> divStyle="" helptext="" includeInOverview="true" title=""
> widgetType="block"><widget value="200022089" description="184491593"
> class="" helptext="" hinttext="" modelValue="bsn"
> widgetType="outputText"/><widget value="200022090" description="bsn"
> field="" constrainttext="" dkd="" helptext="" hinttext="" incremental=""
> initValue="" widgetType="inputText" xsdType="" xxforms_maxlength=""
> xxforms_size=""><value>864</value></widget></widget></widget><widget
> value="200022093" description="**Knoppen" align="none" class="" divStyle=""
> helptext="" includeInOverview="true" title=""
> widgetType="block"/></widget></widget></widgetTree></formcontent>"}
> 2009-07-28 10:06:04,384 DEBUG HttpClient  - Java version: 1.6.0_13
> 2009-07-28 10:06:04,384 DEBUG HttpClient  - Java vendor: Sun Microsystems
> Inc.
> 2009-07-28 10:06:04,384 DEBUG HttpClient  - Java class path:
> :/home/tcorbeon/tomcat_toolkit_staging/bin/bootstrap.jar
> 2009-07-28 10:06:04,384 DEBUG HttpClient  - Operating system name: Linux
> 2009-07-28 10:06:04,384 DEBUG HttpClient  - Operating system architecture:
> amd64
> 2009-07-28 10:06:04,384 DEBUG HttpClient  - Operating system version:
> 2.6.21-xenU
> 2009-07-28 10:06:04,399 DEBUG HttpClient  - SUN 1.6: SUN (DSA key/parameter
> generation; DSA signing; SHA-1, MD5 digests; SecureRandom; X.509
> certificates; JKS keystore; PKIX CertPathValidator; PKIX CertPathBuilder;
> LDAP, Collection CertStores, JavaPolicy Policy; JavaLoginConfig
> Configuration)
> 2009-07-28 10:06:04,399 DEBUG HttpClient  - SunRsaSign 1.5: Sun RSA
> signature provider
> 2009-07-28 10:06:04,399 DEBUG HttpClient  - SunJSSE 1.6: Sun JSSE
> provider(PKCS12, SunX509 key/trust factories, SSLv3, TLSv1)
> 2009-07-28 10:06:04,399 DEBUG HttpClient  - SunJCE 1.6: SunJCE Provider
> (implements RSA, DES, Triple DES, AES, Blowfish, ARCFOUR, RC2, PBE,
> Diffie-Hellman, HMAC)
> 2009-07-28 10:06:04,399 DEBUG HttpClient  - SunJGSS 1.0: Sun (Kerberos v5,
> SPNEGO)
> 2009-07-28 10:06:04,399 DEBUG HttpClient  - SunSASL 1.5: Sun SASL
> provider(implements client mechanisms for: DIGEST-MD5, GSSAPI, EXTERNAL,
> PLAIN, CRAM-MD5; server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5)
> 2009-07-28 10:06:04,400 DEBUG HttpClient  - XMLDSig 1.0: XMLDSig (DOM
> XMLSignatureFactory; DOM KeyInfoFactory)
> 2009-07-28 10:06:04,400 DEBUG HttpClient  - SunPCSC 1.6: Sun PC/SC provider
> 2009-07-28 10:06:04,402 DEBUG PostMethod  - enter
> PostMethod.clearRequestBody()
> 2009-07-28 10:06:04,402 DEBUG EntityEnclosingMethod  - enter
> EntityEnclosingMethod.clearRequestBody()
> 2009-07-28 10:06:04,403 DEBUG HttpClient  - enter
> HttpClient.executeMethod(HttpMethod)
> 2009-07-28 10:06:04,403 DEBUG HttpClient  - enter
> HttpClient.executeMethod(HostConfiguration,HttpMethod,HttpState)
> 2009-07-28 10:06:04,409 DEBUG MultiThreadedHttpConnectionManager  - enter
> HttpConnectionManager.getConnectionWithTimeout(HostConfiguration, long)
> 2009-07-28 10:06:04,409 DEBUG MultiThreadedHttpConnectionManager  -
> HttpConnectionManager.getConnection:  config =
> HostConfiguration[host=http://test.e-inwoner.nl:11085], timeout = 0
> 2009-07-28 10:06:04,409 DEBUG MultiThreadedHttpConnectionManager  - enter
> HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> 2009-07-28 10:06:04,410 DEBUG MultiThreadedHttpConnectionManager  - enter
> HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> 2009-07-28 10:06:04,410 DEBUG MultiThreadedHttpConnectionManager  -
> Allocating new connection,
> hostConfig=HostConfiguration[host=http://test.e-inwoner.nl:11085]
> 2009-07-28 10:06:04,413 DEBUG HttpMethodDirector  - Attempt number 1 to
> process request
> 2009-07-28 10:06:04,413 DEBUG HttpConnection  - enter HttpConnection.open()
> 2009-07-28 10:06:04,413 DEBUG HttpConnection  - Open connection to
> test.e-inwoner.nl:11085
> ""
>
>
> If this URL is behind a NAT though, this leads to a connection timecout:
>
> ""
> 2009-07-28 10:09:13,424 DEBUG HttpConnection  - enter
> HttpConnection.closeSockedAndStreams()
> 2009-07-28 10:09:13,424 DEBUG HttpMethodDirector  - Closing the connection.
> 2009-07-28 10:09:13,424 DEBUG HttpConnection  - enter HttpConnection.close()
> 2009-07-28 10:09:13,424 DEBUG HttpConnection  - enter
> HttpConnection.closeSockedAndStreams()
> 2009-07-28 10:09:13,424 INFO  HttpMethodDirector  - I/O exception
> (java.net.ConnectException) caught when processing request: Connection timed
> out
> 2009-07-28 10:09:13,446 DEBUG HttpMethodDirector  - Connection timed out
> java.net.ConnectException: Connection timed out
>     at java.net.PlainSocketImpl.socketConnect(Native Method)
>     at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>     at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>     at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>     at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>     at java.net.Socket.connect(Socket.java:519)
>     at java.net.Socket.connect(Socket.java:469)
>     at java.net.Socket.<init>(Socket.java:366)
>     at java.net.Socket.<init>(Socket.java:240)
>     at
> org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
>     at
> org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
>     at
> org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
>     at
> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
> ""
>
> So my question is. Why do we open a connection here????
> And can I circumvent this maybe??
>
> Best regards,
> Bart Ottenkamp
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing
> list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws