calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Elser <>
Subject Re: Question about PQS sqlline-thin go through knox
Date Wed, 22 Feb 2017 21:05:51 GMT

HTTP user authentication refers to the authentication between the 
Avatica client (in Phoenix parlance: sqlline-thin) and the Avatica 
server (Phoenix Query Server).

The database user authentication refers to any authentication that is 
down at the JDBC level inside of the server. For Phoenix, there is no 
such authentication support.

In future Avatica releases, will provide the 
ability to specify a custom keystore and truststore via the JDBC URL 
without the need to specify the system properties at the JVM level.

As to your actual environment, it would appear that Knox is disallowing 
your user "guest" with the password "guest-password". This isn't an 
Avatica question, instead a question of how you have configured Knox and 
the valid credentials for that Knox configuration.

- Josh

Shi Wang wrote:
> Hi,
> Recently I am trying connect to PQS with sqlline-thin client and go
> through knox, but it throws 401 error
> java.lang.RuntimeException: Failed to execute HTTP Request, got HTTP/401
> at
> org.apache.calcite.avatica.remote.AvaticaCommonsHttpClientImpl.send(
> at
> org.apache.calcite.avatica.remote.RemoteProtobufService._apply(
> at
> org.apache.calcite.avatica.remote.ProtobufService.apply(
> at org.apache.calcite.avatica.remote.Driver.connect(
> at sqlline.DatabaseConnection.connect(
> at sqlline.DatabaseConnection.getConnection(
> at sqlline.Commands.connect(
> at sqlline.Commands.connect(
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> at java.lang.reflect.Method.invoke(
> at
> sqlline.ReflectiveCommandHandler.execute(
> at sqlline.SqlLine.dispatch(
> at sqlline.SqlLine.initArgs(
> at sqlline.SqlLine.begin(
> at sqlline.SqlLine.start(
> at sqlline.SqlLine.main(
> at
> org.apache.phoenix.queryserver.client.SqllineWrapper.main(
> sqlline version 1.1.9
> I added knox
> for the ssl handshake to success.
> Also
> add authentication=BASIC;avatica_user=guest;avatica_password=guest-password
> after knox url for basic authentication by knox.
> I was wondering if user guest or knox need to be added in some acl? Also
> how db user authentication is related to http user authentication?
> Best,
> Shi

View raw message