Stefania updated CASSANDRA-12642:
    Comment: was deleted

(was: Thanks for the patch! 

It LGTM except for one clarification, I'm not sure if you intentionally 
replaced {{self.current_keyspace}} (the keyspace from the latest USE statement) 
with {{self.keyspace}} (the initial keyspace). I assume this was a typo since 
it isn't related?

Running the tests here:


I also created a [pull 
request|https://github.com/riptano/cassandra-dtest/pull/1333] with a new test 
that reproduces the problem.)

> cqlsh NoHostsAvailable/AuthenticationFailure when sourcing a file with COPY 
> commands
> ------------------------------------------------------------------------------------
>                 Key: CASSANDRA-12642
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12642
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>            Reporter: Adam Holmberg
>            Assignee: Stefania
>            Priority: Minor
>              Labels: cqlsh
>             Fix For: 2.2.8, 3.10, 3.0.10
> In {{cqlsh}}, with authentication enabled, when sourcing a file with {{COPY}} 
> commands in it:
> {noformat}
> test.cql:2:Error for (None, None): Failed to connect to all replicas 
> [''] for (None, None), errors: ["NoHostAvailable - ('Unable to 
> connect to any servers', {'': AuthenticationFailed('Remote end 
> requires authentication.',)})"] (permanently given up after 0 rows and 5 
> attempts)
> {noformat}
> {{cqlsh}} creates a new {{Shell}} without passing all pertinent arguments. 
> When {{copyutil}} creates new cluster connections, they are not initialized 
> correctly.
> This is only for the {{source}} command. As a workaround,  {{cqlsh -f 
> <script>}}  works, since it does not create a new {{Shell}} instance.
> Repro:
> {code}
> ccm create -v 3.7 -n 1 test
> ccm updateconf "authenticator: PasswordAuthenticator" "authorizer: 
> CassandraAuthorizer"
> ccm start
> echo "copy system.local to 'something';" > test.cql
> echo "source 'test.cql'" | ccm node1 cqlsh
> {code}

This message was sent by Atlassian JIRA

Reply via email to