You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Tim Dunphy <bl...@gmail.com> on 2014/09/22 02:53:16 UTC

cassandra 2.1.0 unable to use cqlsh

Hey all,

 I've just upgraded to the latest cassandra on my site with version 2.1.0.

But now when I run the command I am getting the following error:

[root@beta-new:/usr/local] #cqlsh
Traceback (most recent call last):
  File "/etc/alternatives/cassandrahome/bin/cqlsh-old", line 113, in
<module>
    from cqlshlib import cqlhandling, cql3handling, pylexotron
  File
"/usr/local/apache-cassandra-2.1.0/bin/../pylib/cqlshlib/cql3handling.py",
line 18, in <module>
    from cassandra.metadata import maybe_escape_name
ImportError: No module named cassandra.metadata

Just to clarify some of the above output, all my 'cqlsh' command does is
automatically fill in some values I'd like to use as defaults and then
invoke the real command which I've named 'cqlsh-old'. Just a quirk of my
setup that's always allowed cqlsh to be invoked without issue across
multiple upgrades.

[root@beta-new:/usr/local] #cat /etc/alternatives/cassandrahome/bin/cqlsh
#!/bin/sh
/etc/alternatives/cassandrahome/bin/cqlsh-old beta-new.mydomain.com 9160
--cqlversion="3.0.0"

I'd appreciate any advice you  could spare on how to get around this error!

Thanks
Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

Re: cassandra 2.1.0 unable to use cqlsh

Posted by Tim Dunphy <bl...@gmail.com>.
Hi Adam,

 Ok thanks again for the tips there! So I fell back to the stock
configuration of cassandra 2.1.0 and setup my environment variables... and
I was able to get cqlsh to work!

[root@beta-new:~] #cqlsh

Connected to mydomain Cluster at beta-new.mydomain.com:9042.

[cqlsh 5.0.1 | Cassandra 2.1.0 | CQL spec 3.2.0 | Native protocol v3]

Use HELP for help.

cqlsh>


Thanks!

Tim

On Mon, Sep 22, 2014 at 11:05 AM, Adam Holmberg <ad...@datastax.com>
wrote:

> cqlsh in Cassandra 2.1.0 uses the DataStax python driver. The
> "cassandra.metadata" module is provided by this package. By default it uses
> the driver from an archive included in the Cassandra distribution
> (.../lib/cassandra-driver-internal-only-2.1.0.zip).
>
> See /usr/local/apache-cassandra-2.1.0/bin/cqlsh for how everything gets
> setup -- it's possible your wrapper or environment are not playing well
> with that.
>
> Also note that "9160" will not apply anymore since this driver uses the
> native protocol (9042).
>
> Adam
>
> On Sun, Sep 21, 2014 at 7:53 PM, Tim Dunphy <bl...@gmail.com> wrote:
>
>> Hey all,
>>
>>  I've just upgraded to the latest cassandra on my site with version 2.1.0.
>>
>> But now when I run the command I am getting the following error:
>>
>> [root@beta-new:/usr/local] #cqlsh
>> Traceback (most recent call last):
>>   File "/etc/alternatives/cassandrahome/bin/cqlsh-old", line 113, in
>> <module>
>>     from cqlshlib import cqlhandling, cql3handling, pylexotron
>>   File
>> "/usr/local/apache-cassandra-2.1.0/bin/../pylib/cqlshlib/cql3handling.py",
>> line 18, in <module>
>>     from cassandra.metadata import maybe_escape_name
>> ImportError: No module named cassandra.metadata
>>
>> Just to clarify some of the above output, all my 'cqlsh' command does is
>> automatically fill in some values I'd like to use as defaults and then
>> invoke the real command which I've named 'cqlsh-old'. Just a quirk of my
>> setup that's always allowed cqlsh to be invoked without issue across
>> multiple upgrades.
>>
>> [root@beta-new:/usr/local] #cat /etc/alternatives/cassandrahome/bin/cqlsh
>> #!/bin/sh
>> /etc/alternatives/cassandrahome/bin/cqlsh-old beta-new.mydomain.com 9160
>> --cqlversion="3.0.0"
>>
>> I'd appreciate any advice you  could spare on how to get around this
>> error!
>>
>> Thanks
>> Tim
>>
>> --
>> GPG me!!
>>
>> gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
>>
>>
>


-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

Re: cassandra 2.1.0 unable to use cqlsh

Posted by Tim Dunphy <bl...@gmail.com>.
>
> cqlsh in Cassandra 2.1.0 uses the DataStax python driver. The
> "cassandra.metadata" module is provided by this package. By default it uses
> the driver from an archive included in the Cassandra distribution
> (.../lib/cassandra-driver-internal-only-2.1.0.zip).


Ok that's really good to know.

>
> See /usr/local/apache-cassandra-2.1.0/bin/cqlsh for how everything gets
> setup -- it's possible your wrapper or environment are not playing well
> with that.
> Also note that "9160" will not apply anymore since this driver uses the
> native protocol (9042).



OK yes very possible. I'll try working with what's originally there and if
need be make any alterations I'll need to.

Thanks!
Tim

On Mon, Sep 22, 2014 at 11:05 AM, Adam Holmberg <ad...@datastax.com>
wrote:

> cqlsh in Cassandra 2.1.0 uses the DataStax python driver. The
> "cassandra.metadata" module is provided by this package. By default it uses
> the driver from an archive included in the Cassandra distribution
> (.../lib/cassandra-driver-internal-only-2.1.0.zip).
>
> See /usr/local/apache-cassandra-2.1.0/bin/cqlsh for how everything gets
> setup -- it's possible your wrapper or environment are not playing well
> with that.
>
> Also note that "9160" will not apply anymore since this driver uses the
> native protocol (9042).
>
> Adam
>
> On Sun, Sep 21, 2014 at 7:53 PM, Tim Dunphy <bl...@gmail.com> wrote:
>
>> Hey all,
>>
>>  I've just upgraded to the latest cassandra on my site with version 2.1.0.
>>
>> But now when I run the command I am getting the following error:
>>
>> [root@beta-new:/usr/local] #cqlsh
>> Traceback (most recent call last):
>>   File "/etc/alternatives/cassandrahome/bin/cqlsh-old", line 113, in
>> <module>
>>     from cqlshlib import cqlhandling, cql3handling, pylexotron
>>   File
>> "/usr/local/apache-cassandra-2.1.0/bin/../pylib/cqlshlib/cql3handling.py",
>> line 18, in <module>
>>     from cassandra.metadata import maybe_escape_name
>> ImportError: No module named cassandra.metadata
>>
>> Just to clarify some of the above output, all my 'cqlsh' command does is
>> automatically fill in some values I'd like to use as defaults and then
>> invoke the real command which I've named 'cqlsh-old'. Just a quirk of my
>> setup that's always allowed cqlsh to be invoked without issue across
>> multiple upgrades.
>>
>> [root@beta-new:/usr/local] #cat /etc/alternatives/cassandrahome/bin/cqlsh
>> #!/bin/sh
>> /etc/alternatives/cassandrahome/bin/cqlsh-old beta-new.mydomain.com 9160
>> --cqlversion="3.0.0"
>>
>> I'd appreciate any advice you  could spare on how to get around this
>> error!
>>
>> Thanks
>> Tim
>>
>> --
>> GPG me!!
>>
>> gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
>>
>>
>


-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

Re: cassandra 2.1.0 unable to use cqlsh

Posted by Adam Holmberg <ad...@datastax.com>.
cqlsh in Cassandra 2.1.0 uses the DataStax python driver. The
"cassandra.metadata" module is provided by this package. By default it uses
the driver from an archive included in the Cassandra distribution
(.../lib/cassandra-driver-internal-only-2.1.0.zip).

See /usr/local/apache-cassandra-2.1.0/bin/cqlsh for how everything gets
setup -- it's possible your wrapper or environment are not playing well
with that.

Also note that "9160" will not apply anymore since this driver uses the
native protocol (9042).

Adam

On Sun, Sep 21, 2014 at 7:53 PM, Tim Dunphy <bl...@gmail.com> wrote:

> Hey all,
>
>  I've just upgraded to the latest cassandra on my site with version 2.1.0.
>
> But now when I run the command I am getting the following error:
>
> [root@beta-new:/usr/local] #cqlsh
> Traceback (most recent call last):
>   File "/etc/alternatives/cassandrahome/bin/cqlsh-old", line 113, in
> <module>
>     from cqlshlib import cqlhandling, cql3handling, pylexotron
>   File
> "/usr/local/apache-cassandra-2.1.0/bin/../pylib/cqlshlib/cql3handling.py",
> line 18, in <module>
>     from cassandra.metadata import maybe_escape_name
> ImportError: No module named cassandra.metadata
>
> Just to clarify some of the above output, all my 'cqlsh' command does is
> automatically fill in some values I'd like to use as defaults and then
> invoke the real command which I've named 'cqlsh-old'. Just a quirk of my
> setup that's always allowed cqlsh to be invoked without issue across
> multiple upgrades.
>
> [root@beta-new:/usr/local] #cat /etc/alternatives/cassandrahome/bin/cqlsh
> #!/bin/sh
> /etc/alternatives/cassandrahome/bin/cqlsh-old beta-new.mydomain.com 9160
> --cqlversion="3.0.0"
>
> I'd appreciate any advice you  could spare on how to get around this error!
>
> Thanks
> Tim
>
> --
> GPG me!!
>
> gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
>
>