Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

impala-shell -k with ha proxy not working

avatar
Rising Star

Hi, 
I have a imapala cluster with kerberos and HA proxy, and everything works fine when I connect using impyla.

But when I do a  (after a kinit)
 impala-shell -k

connect myHaproxy:21051;
I get :

Error: Unable to communicate with impalad service. This service may not be an impalad instance. Check host:port and try again.
Traceback (most recent call last):
  File "/opt/cloudera/parcels/CDH-5.14.0-1.cdh5.14.0.p0.24/bin/../lib/impala-shell/impala_shell.py", line 1554, in <module>
    shell.cmdloop(intro)
  File "/usr/lib/python2.7/cmd.py", line 142, in cmdloop
    stop = self.onecmd(line)
  File "/opt/cloudera/parcels/CDH-5.14.0-1.cdh5.14.0.p0.24/bin/../lib/impala-shell/impala_shell.py", line 563, in onecmd
    return cmd.Cmd.onecmd(self, line)
  File "/usr/lib/python2.7/cmd.py", line 221, in onecmd
    return func(arg)
  File "/opt/cloudera/parcels/CDH-5.14.0-1.cdh5.14.0.p0.24/bin/../lib/impala-shell/impala_shell.py", line 717, in do_connect
    self._connect()
  File "/opt/cloudera/parcels/CDH-5.14.0-1.cdh5.14.0.p0.24/bin/../lib/impala-shell/impala_shell.py", line 764, in _connect
    result = self.imp_client.connect()
  File "/opt/cloudera/parcels/CDH-5.14.0-1.cdh5.14.0.p0.24/lib/impala-shell/lib/impala_client.py", line 245, in connect
    result = self.ping_impala_service()
  File "/opt/cloudera/parcels/CDH-5.14.0-1.cdh5.14.0.p0.24/lib/impala-shell/lib/impala_client.py", line 250, in ping_impala_service
    return self.imp_service.PingImpalaService()
  File "/opt/cloudera/parcels/CDH-5.14.0-1.cdh5.14.0.p0.24/lib/impala-shell/gen-py/ImpalaService/ImpalaService.py", line 223, in PingImpalaService
    return self.recv_PingImpalaService()
  File "/opt/cloudera/parcels/CDH-5.14.0-1.cdh5.14.0.p0.24/lib/impala-shell/gen-py/ImpalaService/ImpalaService.py", line 238, in recv_PingImpalaService
    raise x
thrift.Thrift.TApplicationException: Invalid method name: 'PingImpalaService'

any idea why?

thanks

1 ACCEPTED SOLUTION

avatar
Super Collaborator

Sorry, I didn't notice before.

Impyla uses the port 21050 to connect to Impala. This port is also used for JDBC connection. Probably in your HAProxy, you have configured port 21051 in front.

"impala-shell", on the other hand, uses the default port "21000" to connect to impala. So you have to configure an additional block in your HAProxy configuration, to forward that port as well.

 

You can refer to https://www.cloudera.com/documentation/enterprise/latest/topics/cm_ig_ports_impala.html .

View solution in original post

5 REPLIES 5

avatar
Super Collaborator

Does impyla connect with Kerberos authentication, or LDAP?

Connection through HAProxy using LDAP authentication works fine. But in order to use Kerberos authentication, you have to configure your "myHaproxy:21051" as Load Balancer in impala's configuration.

https://www.cloudera.com/documentation/enterprise/latest/topics/impala_proxy.html#proxy_kerberos

avatar
Rising Star

Hi, 
Impyla connect using kerberos, we are not using ldap. 
I have configured the Load Balancer as stated in the docs, but still have the same error.

 

thanks

avatar
Super Collaborator

Sorry, I didn't notice before.

Impyla uses the port 21050 to connect to Impala. This port is also used for JDBC connection. Probably in your HAProxy, you have configured port 21051 in front.

"impala-shell", on the other hand, uses the default port "21000" to connect to impala. So you have to configure an additional block in your HAProxy configuration, to forward that port as well.

 

You can refer to https://www.cloudera.com/documentation/enterprise/latest/topics/cm_ig_ports_impala.html .

avatar
Rising Star

Worked !
thanks

avatar
Explorer
Hi, I have the same problem, could you please give me some detail guid? Thanks a lot