Uploaded image for project: 'Hue (READ ONLY)'
  1. Hue (READ ONLY)
  2. HUE-7904

Hue's Impala app does not respect Impala server load balancer


    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: 3.11.0, 3.12.0, 4.0.0, 4.1.0
    • Fix Version/s: None
    • Component/s: con.impala
    • Labels:


      We're using Hue as an interface to our Impala setup. Hue connects to a load balancer server (via haproxy) that should distribute the incoming requests to the actual impala-servers based on whichever servers have the fewest connections (leastconn in haproxy speak). Unfortunately, we experience a frustrating amount of "Results have expired, rerun the query if needed" error messages when submitting impala queries. From my understanding, Hue spawns a connection pool such that "a single user session may not have the same TCP connection" [ 1 ] so the impala server used to submit a query may not be same impala server used to retrieve the results, which prompts impala to invalidate the results and show that dreaded error message. I've seen suggestions for using source IP persistence [ 1 ] [ 2 ] [ 3 ] and even, as an extension, to "add more Hue Server instances, so that each can be pinned to another HiveServer2/Impala instance" [ 1 ]. It seems like this issue exists with the hive query editor too [ 4 ]. These are not solutions, as they eliminate load balancing and force all HUE queries to go to one impala server. Likewise, setting up a hue server per impala server is a waste of resources and not automation-friendly, since we use SAML SSO authentication for HUE and another team manages the SAML server.

      Our impala server load balancer is the only connection point for all of our other clients; nothing we use connects to impala servers directly. All other clients we've tested or used, like Tableau or impala-shell, behave correctly with the "leastconn" balancing method in haproxy, thus HUE is the outlier. I'm not experienced with database connectors, so I'm not sure how this ties into ODBC/Thrift protocols. My naive recommendation would be to encode Hue/Impala TCP connection info into each user session so that a user could still be tied to one machine but multiple users would be assigned different connections, which would allow the leastconn method to work.

      I was browsing through the HUE issues before this and came across HUE-6224 which sounds like a solution to our problem, but I can't find anything else related to that on this site nor on github.

      We've tried Hue 3.11, 3.12, 4.0, and 4.1, all with the same results.

      Any help would be appreciated! Thank you for your time!

      [ 1 ] https://www.cloudera.com/documentation/enterprise/5-13-x/topics/hue_sec_ha.html#concept_ef1_1pf_51b
      [ 2 ] https://impala.apache.org/docs/build/impala-2.10.pdf#page=80&zoom=100,-159,285
      [ 3 ] https://community.cloudera.com/t5/Interactive-Short-cycle-SQL/Frequent-quot-Results-Expired-quot-while-running-Impala-Queries/td-p/54976
      [ 4 ] https://issues.cloudera.org/browse/HUE-4990




            • Assignee:
              jsmalkowski Justin Smalkowski
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: