You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Andreas Veithen (JIRA)" <ji...@apache.org> on 2008/11/10 13:12:46 UTC

[jira] Created: (SYNAPSE-479) Failure in REST test case

Failure in REST test case
-------------------------

                 Key: SYNAPSE-479
                 URL: https://issues.apache.org/jira/browse/SYNAPSE-479
             Project: Synapse
          Issue Type: Bug
          Components: Transports
    Affects Versions: NIGHTLY
         Environment: - Hudson
- Mac OS X
            Reporter: Andreas Veithen
            Priority: Minor
         Attachments: 01-debug.log

The following test case systematically fails:

org.apache.synapse.transport.nhttp.HttpCoreNIOListenerTest.0076:test=REST,client=java.net,endpoint=axis

This test case uses a URLConnection to send a GET request to HttpCoreNIOListener. The test case logs show that the transport sends back the status line and the headers, but fails to write the (empty) body. After 60 seconds it times out and closes the connection, causing a "Premature EOF" error in URLConnection.

This seems to be a regression caused by the recent upgrade to httpcore 4.0-beta3.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Assigned: (SYNAPSE-479) Failure in REST test case

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen reassigned SYNAPSE-479:
---------------------------------------

    Assignee: Andreas Veithen

> Failure in REST test case
> -------------------------
>
>                 Key: SYNAPSE-479
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-479
>             Project: Synapse
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: NIGHTLY
>         Environment: - Hudson
> - Mac OS X
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Minor
>         Attachments: 01-debug.log
>
>
> The following test case systematically fails:
> org.apache.synapse.transport.nhttp.HttpCoreNIOListenerTest.0076:test=REST,client=java.net,endpoint=axis
> This test case uses a URLConnection to send a GET request to HttpCoreNIOListener. The test case logs show that the transport sends back the status line and the headers, but fails to write the (empty) body. After 60 seconds it times out and closes the connection, causing a "Premature EOF" error in URLConnection.
> This seems to be a regression caused by the recent upgrade to httpcore 4.0-beta3.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Resolved: (SYNAPSE-479) Failure in REST test case

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved SYNAPSE-479.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3

Fixed in trunk.

> Failure in REST test case
> -------------------------
>
>                 Key: SYNAPSE-479
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-479
>             Project: Synapse
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: NIGHTLY
>         Environment: - Hudson
> - Mac OS X
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: 01-debug.log
>
>
> The following test case systematically fails:
> org.apache.synapse.transport.nhttp.HttpCoreNIOListenerTest.0076:test=REST,client=java.net,endpoint=axis
> This test case uses a URLConnection to send a GET request to HttpCoreNIOListener. The test case logs show that the transport sends back the status line and the headers, but fails to write the (empty) body. After 60 seconds it times out and closes the connection, causing a "Premature EOF" error in URLConnection.
> This seems to be a regression caused by the recent upgrade to httpcore 4.0-beta3.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-479) Failure in REST test case

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12658947#action_12658947 ] 

Andreas Veithen commented on SYNAPSE-479:
-----------------------------------------

What happens here is that Synapse hangs in ContentInputStream#close(), called from ServerWorker#run(). The close method looks as follows:

    public void close() throws IOException {
        // read and discard the remainder of the message
        byte tmp[] = new byte[1024];
        while (this.buffer.read(tmp, 0, tmp.length) >= 0) {
        }
        super.close();
    }

This method has been added in r636863 to "[fix] handling of requests with partially consumed content". Note that in the present case the transport is processing a GET request which by definition has no content. It appears that ServerHandler#requestReceived always creates an input buffer and a ContentInputStream independently of the type of request. The solution is to check the type of request and only create the input buffer and ContentInputStream if necessary and of course only use ContentInputStream#close() if the input stream is not null.


> Failure in REST test case
> -------------------------
>
>                 Key: SYNAPSE-479
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-479
>             Project: Synapse
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: NIGHTLY
>         Environment: - Hudson
> - Mac OS X
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Minor
>         Attachments: 01-debug.log
>
>
> The following test case systematically fails:
> org.apache.synapse.transport.nhttp.HttpCoreNIOListenerTest.0076:test=REST,client=java.net,endpoint=axis
> This test case uses a URLConnection to send a GET request to HttpCoreNIOListener. The test case logs show that the transport sends back the status line and the headers, but fails to write the (empty) body. After 60 seconds it times out and closes the connection, causing a "Premature EOF" error in URLConnection.
> This seems to be a regression caused by the recent upgrade to httpcore 4.0-beta3.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Updated: (SYNAPSE-479) Failure in REST test case

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen updated SYNAPSE-479:
------------------------------------

    Attachment: 01-debug.log

Attached test case logs.

> Failure in REST test case
> -------------------------
>
>                 Key: SYNAPSE-479
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-479
>             Project: Synapse
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: NIGHTLY
>         Environment: - Hudson
> - Mac OS X
>            Reporter: Andreas Veithen
>            Priority: Minor
>         Attachments: 01-debug.log
>
>
> The following test case systematically fails:
> org.apache.synapse.transport.nhttp.HttpCoreNIOListenerTest.0076:test=REST,client=java.net,endpoint=axis
> This test case uses a URLConnection to send a GET request to HttpCoreNIOListener. The test case logs show that the transport sends back the status line and the headers, but fails to write the (empty) body. After 60 seconds it times out and closes the connection, causing a "Premature EOF" error in URLConnection.
> This seems to be a regression caused by the recent upgrade to httpcore 4.0-beta3.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org