You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andrea Cosentino (JIRA)" <ji...@apache.org> on 2017/02/01 15:03:51 UTC

[jira] [Commented] (CAMEL-10777) failover not working for jetty endpoint

    [ https://issues.apache.org/jira/browse/CAMEL-10777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15848463#comment-15848463 ] 

Andrea Cosentino commented on CAMEL-10777:
------------------------------------------

Did you try with Camel 2.18.x or master? 2.17.x is EOL, 2.16.x is not active.

> failover not working for jetty endpoint
> ---------------------------------------
>
>                 Key: CAMEL-10777
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10777
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core, camel-jetty
>    Affects Versions: 2.16.3, 2.17.3
>            Reporter: Miroslav Borský
>            Priority: Minor
>
> The following proxy will accept incoming calls on http://localhost:8888/lb and respond to them.
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <blueprint xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd" xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> 	<camelContext id="test-ctx" xmlns="http://camel.apache.org/schema/blueprint">
> 		<route streamCache="true">
> 			<from uri="jetty:http://0.0.0.0:8888/lb/?matchOnUriPrefix=true" />
> 			<removeHeaders pattern="CamelServlet.*"/>
> 			<removeHeaders pattern="CamelHttpServlet.*"/>
> 			<removeHeader headerName="CamelHttpUri"/>
> 			<loadBalance inheritErrorHandler="false">
>                 <failover maximumFailoverAttempts="1" />
> 				<to uri="jetty:http://localhost:8889/1/?bridgeEndpoint=true&amp;throwExceptionOnFailure=true" />
> 				<to uri="jetty:http://localhost:8888/2/?bridgeEndpoint=true&amp;throwExceptionOnFailure=false" />
> 			</loadBalance>
> 		</route>
> 		<route>
> 			<from uri="jetty:http://0.0.0.0:8888/2/?matchOnUriPrefix=true" />
> 			<setBody><constant>22</constant></setBody>
> 		</route>
> 	</camelContext>
> </blueprint>
> {code}
> When nothing runs on port 8889 (the first node in the failover), the expected behaviour is to respond always with the number 2.
> The observed behaviour is, that service respond with returning the request back for the first call. If the second call is made within a short time (up to 30 second in my case), the service will respond correctly.
> Workaround is to use for example http4 instead of jetty:http.
> Tried with camel 2.17.3 and 2.16.3



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)