[
https://issues.apache.org/jira/browse/CASSANDRA-8001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15828846#comment-15828846
]
Russell Razoy commented on CASSANDRA-8001:
------------------------------------------
I ran into the same issue, although slightly different symptoms.
*TLRD: Besides brew uninstalling and installing cassandra, I had to run this
command:*
{code}brew link --overwrite cassandra{code}
Long version:
1. My python installation broke, so reinstalled it through brew, and
reinstalled all modules through pip (cql included).
2. When connecting to remote cqlsh server, I would get this error:
{code}
Connection error: ('Unable to connect to any servers', {'17.169.33.31':
DriverException('ProtocolError returned from server while using explicitly set
client protocol_version 4',)})
{code}
3. Using --cqlshversion=4.x.x parameter on cqlsh command wouldn't work
4. Forced pip install cqlsh==4.x.x and would get similar error to the one on
your stacktrace:
{code}
Traceback (most recent call last):
File "/usr/local/bin/cqlsh", line 2031, in <module>
main(*read_options(sys.argv[1:], os.environ))
File "/usr/local/bin/cqlsh", line 2017, in main
display_float_precision=options.float_precision)
File "/usr/local/bin/cqlsh", line 477, in __init__
cql_version=cqlver, transport=transport)
File "/usr/local/lib/python2.7/site-packages/cql/connection.py", line 143, in
connect
consistency_level=consistency_level, transport=transport)
File "/usr/local/lib/python2.7/site-packages/cql/connection.py", line 59, in
__init__
self.establish_connection()
File "/usr/local/lib/python2.7/site-packages/cql/thrifteries.py", line 157,
in establish_connection
self.client.login(AuthenticationRequest(credentials=self.credentials))
File "/usr/local/lib/python2.7/site-packages/cql/cassandra/Cassandra.py",
line 454, in login
self.send_login(auth_request)
File "/usr/local/lib/python2.7/site-packages/cql/cassandra/Cassandra.py",
line 461, in send_login
args.write(self._oprot)
File "/usr/local/lib/python2.7/site-packages/cql/cassandra/Cassandra.py",
line 2769, in write
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__,
self.thrift_spec)))
TypeError: expecting 5 arguments for typeargs to map
{code}
Solution mentioned above worked like a charm, now I can run this successfully:
{code}
cqlsh <host> -u <user> -p <pass> --cqlversion=3.2.1
{code}
> CQLSH broken in Mac OS 10.9.5
> -----------------------------
>
> Key: CASSANDRA-8001
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8001
> Project: Cassandra
> Issue Type: Bug
> Environment: Mac OS 10.9.5, homebrew python 2.7, cql 4.1.1
> Reporter: Jonathan Hoskin
> Labels: cqlsh
>
> Since upgrading to Mac OS 10.9.5, cqlsh has stopped working.
> Here is the error trace I get:
> {quote}
> $ cqlsh -u USER -k KEYSPACE HOST
> Traceback (most recent call last):
> File "/usr/local/bin/cqlsh", line 2044, in <module>
> main(*read_options(sys.argv[1:], os.environ))
> File "/usr/local/bin/cqlsh", line 2030, in main
> display_float_precision=options.float_precision)
> File "/usr/local/bin/cqlsh", line 480, in __init__
> cql_version=cqlver, transport=transport)
> File "/usr/local/lib/python2.7/site-packages/cql/connection.py", line 143,
> in connect
> consistency_level=consistency_level, transport=transport)
> File "/usr/local/lib/python2.7/site-packages/cql/connection.py", line 59,
> in __init__
> self.establish_connection()
> File "/usr/local/lib/python2.7/site-packages/cql/thrifteries.py", line 157,
> in establish_connection
> self.client.login(AuthenticationRequest(credentials=self.credentials))
> File "/usr/local/lib/python2.7/site-packages/cql/cassandra/Cassandra.py",
> line 454, in login
> self.send_login(auth_request)
> File "/usr/local/lib/python2.7/site-packages/cql/cassandra/Cassandra.py",
> line 461, in send_login
> args.write(self._oprot)
> File "/usr/local/lib/python2.7/site-packages/cql/cassandra/Cassandra.py",
> line 2769, in write
> oprot.trans.write(fastbinary.encode_binary(self, (self.__class__,
> self.thrift_spec)))
> TypeError: expected string or Unicode object, NoneType found
> {quote}
> At first I suspected that some system dependency had changed, so I have clean
> reinstalled python, pip and cql. The error persists.
> I have also tested the cqlsh command on another Mac running OS 10.9.2 and it
> can connect fine.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)