You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/07/06 07:18:00 UTC

[jira] [Work logged] (KNOX-2771) Log HTTP client config parameters such as socket timeouts with info level

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

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

                Author: ASF GitHub Bot
            Created on: 06/Jul/22 07:17
            Start Date: 06/Jul/22 07:17
    Worklog Time Spent: 10m 
      Work Description: MrtnBalazs opened a new pull request, #602:
URL: https://github.com/apache/knox/pull/602

   ## What changes were proposed in this pull request?
   
   Changed log level of http connection timeout and socket timeout to from DEBUG to INFO and added INFO level log for retry count and retry non safe request parameters, because sometimes clients were confused why the timeout parameters haven't changed even though they changed it in gateway-site.xml, but service.xml override-s it. Now they can see in the log what is the value of these parameters, only after the first request after topology deployment.
   
   ## How was this patch tested?
   
   I tested it manually, using ```curl -k -u tom:tom-password https://localhost:8443/gateway/sandbox/hive``` command from terminal.
   
   1. Nothing is set:
   
   <img width="1654" alt="semmiben" src="https://user-images.githubusercontent.com/77810082/177487369-f710d79c-b7a7-482d-8fc7-96f30c517873.png">
   
   2. Timeout params set in gateway-site.xml and retry params set in sandbox.xml:
   
   <img width="1655" alt="gatewayben" src="https://user-images.githubusercontent.com/77810082/177488015-15cadfe4-4a19-4426-91a1-83520d0ae119.png">
   <img width="492" alt="globalbeallitas" src="https://user-images.githubusercontent.com/77810082/177487993-22eb1066-bb82-4348-8ead-91b42ea0a2ab.png">
   <img width="494" alt="Screenshot 2022-07-06 at 8 56 18" src="https://user-images.githubusercontent.com/77810082/177488328-b48d9e69-7c0d-44b4-90bd-6405f10fea5e.png">
   
   3. Timeout params set in gateway-site.xml and in service.xml, retry params set like 2.:
   
   <img width="1653" alt="servicebenesgatewayben" src="https://user-images.githubusercontent.com/77810082/177489168-614d58fc-a22a-4387-bbff-949b70802725.png">
   <img width="492" alt="globalbeallitas" src="https://user-images.githubusercontent.com/77810082/177489298-5a13d6c8-4c44-4e66-bcc6-04d932371632.png">
   <img width="1359" alt="servicekod" src="https://user-images.githubusercontent.com/77810082/177489894-f509c7b4-76cf-409f-b46c-46445ee67c5a.png">
   
   We can see that service.xml overrides gateway-site.xml settings.
   
   The logs only appear after the first request after the topology is deployed.
   After that it is not logged until the topology is deployed again.
   <img width="1654" alt="masodszorra nem logol" src="https://user-images.githubusercontent.com/77810082/177491088-769f9fb3-d188-42e4-913e-53a1a91bddec.png">
   




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

            Worklog Id:     (was: 788148)
    Remaining Estimate: 0h
            Time Spent: 10m

> Log HTTP client config parameters such as socket timeouts with info level
> -------------------------------------------------------------------------
>
>                 Key: KNOX-2771
>                 URL: https://issues.apache.org/jira/browse/KNOX-2771
>             Project: Apache Knox
>          Issue Type: Improvement
>            Reporter: Balazs Marton
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Timeout parameters can be defined in two places, in gateway-site.xml and service.xml
>  
> {code:java}
> gateway.httpclient.connectionTimeout -> 6000000
> gateway.httpclient.socketTimeout -> 6000000
>   {code}
>  
> {code:java}
> <dispatch classname="org.apache.knox.gateway.hive.HiveDispatch" ha-classname="org.apache.knox.gateway.hive.HiveHaDispatch">
>   <param>
>     <name>httpclient.connectionTimeout</name>
>     <value>5m</value>
>   </param>
>   <param>
>     <name>httpclient.socketTimeout</name>
>     <value>5m</value>
>   </param>
> </dispatch> {code}
> The latter takes priority over the former. There are multiple examples where the customer and/or the support tried to set these in gateway-site level but it didn't work.
> It would be good to see these parameters (plus other http related configs) in the log.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)