You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Michael Edge (JIRA)" <ji...@apache.org> on 2015/11/25 03:51:11 UTC
[jira] [Commented] (CASSANDRA-8369) Better error handling in CQLSH
for invalid password
[ https://issues.apache.org/jira/browse/CASSANDRA-8369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026061#comment-15026061 ]
Michael Edge commented on CASSANDRA-8369:
-----------------------------------------
Tested this on v2.1, 2.2 and 3.0 and we do receive a more user-friendly error.
h3. Version 2.1
{code}
[cass21@localhost ~]$ cqlsh -u cassandra -p johnny
Connection error: ('Unable to connect to any servers', {'127.0.0.1': AuthenticationFailed(u'Failed to authenticate to 127.0.0.1: code=0100 [Bad credentials] message="Username and/or password are incorrect"',)})
{code}
>From within CQLSH
{code}
cassandra@cqlsh> login cassandra
Password:
('Unable to connect to any servers', {'127.0.0.1': AuthenticationFailed(u'Failed to authenticate to 127.0.0.1: code=0100 [Bad credentials] message="Username and/or password are incorrect"',)})
{code}
h3. Version 2.2
{code}
[cass22@localhost ~]$ cqlsh -u cassandra -p johnny
Connection error: ('Unable to connect to any servers', {'127.0.0.1': AuthenticationFailed(u'Failed to authenticate to 127.0.0.1: code=0100 [Bad credentials] message="Username and/or password are incorrect"',)})
{code}
>From within CQLSH
{code}
cassandra@cqlsh> login cassandra
Password:
('Unable to connect to any servers', {'127.0.0.1': AuthenticationFailed(u'Failed to authenticate to 127.0.0.1: code=0100 [Bad credentials] message="Username and/or password are incorrect"',)})
{code}
h3. Version 3.0
{code}
[cass30@localhost ~]$ cqlsh -u cassandra -p johnny
Connection error: ('Unable to connect to any servers', {'127.0.0.1': AuthenticationFailed(u'Failed to authenticate to 127.0.0.1: code=0100 [Bad credentials] message="Username and/or password are incorrect"',)})
{code}
>From within CQLSH
{code}
cassandra@cqlsh> login cassandra
Password:
('Unable to connect to any servers', {'127.0.0.1': AuthenticationFailed(u'Failed to authenticate to 127.0.0.1: code=0100 [Bad credentials] message="Username and/or password are incorrect"',)})
{code}
> Better error handling in CQLSH for invalid password
> ---------------------------------------------------
>
> Key: CASSANDRA-8369
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8369
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Johnny Miller
> Priority: Minor
>
> On C* 2.0.11/Cqlsh 4.1.1 when logging with an invalid password you get back a stacktrace rather than a more user friendly error. It might be better if this was more user friendly.
> For example - this is what you get back now:
> root@cass1:~# cqlsh -u cassandra -p johnny
> Traceback (most recent call last):
> File "/usr/bin/cqlsh", line 2113, in <module>
> main(*read_options(sys.argv[1:], os.environ))
> File "/usr/bin/cqlsh", line 2093, in main
> single_statement=options.execute)
> File "/usr/bin/cqlsh", line 505, in __init__
> password=password, cql_version=cqlver, transport=transport)
> File "/usr/share/dse/cassandra/lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/connection.py", line 143, in connect
> File "/usr/share/dse/cassandra/lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/connection.py", line 59, in __init__
> File "/usr/share/dse/cassandra/lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/thrifteries.py", line 157, in establish_connection
> File "/usr/share/dse/cassandra/lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cassandra/Cassandra.py", line 465, in login
> File "/usr/share/dse/cassandra/lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cassandra/Cassandra.py", line 486, in recv_login
> cql.cassandra.ttypes.AuthenticationException: AuthenticationException(why='Username and/or password are incorrect')
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)