[ 
https://issues.apache.org/jira/browse/KNOX-2677?focusedWorklogId=663462&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-663462
 ]

ASF GitHub Bot logged work on KNOX-2677:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 11/Oct/21 11:31
            Start Date: 11/Oct/21 11:31
    Worklog Time Spent: 10m 
      Work Description: zeroflag opened a new pull request #507:
URL: https://github.com/apache/knox/pull/507


   If a host is unreachable Knox marks the URL but keeps trying the same URL 
upon failover.
   
   ## What changes were proposed in this pull request?
   
   The new URL is now chosen from haProvider.
   
   ## How was this patch tested?
   
   Add these to sandbox.xml:
   
   ```xml
   <provider>
        <role>ha</role>
        <name>HaProvider</name>
        <enabled>true</enabled>
        <param>
            <name>HIVE</name>
            
<value>maxFailoverAttempts=3;failoverSleep=1000;enabled=true;enableStickySession=true;enableLoadBalancing=true</value>
        </param>
   </provider>
   ```
   
   ```xml
   <service>
       <role>HIVE</role>
       <url>http://deadhost.site</url>
       <url>http://localhost:1701/alive</url>
       <param>
           <name>replayBufferSize</name>
           <value>8</value>
       </param>
   </service>
   ```
   
   Mini HTTP server:
   
   ```smalltalk
   Teapot on
        GET: '/alive' -> 'OK';
        start.
   ```
   
   ```bash
   $  curl -k -u admin:admin-password  
https://localhost:8443/gateway/sandbox/hive
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 663462)
    Time Spent: 1h 20m  (was: 1h 10m)

> HADispatch keeps retrying the same URL on failover
> --------------------------------------------------
>
>                 Key: KNOX-2677
>                 URL: https://issues.apache.org/jira/browse/KNOX-2677
>             Project: Apache Knox
>          Issue Type: Task
>            Reporter: Attila Magyar
>            Assignee: Attila Magyar
>            Priority: Major
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> In case of a failover, the current URL is marked as failed, but 
> outboundRequest still refers to the failed URL:
>  
> {code:java}
> URI uri = getDispatchUrl(inboundRequest);
> ((HttpRequestBase) outboundRequest).setURI(uri);
>  {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to