question

sibi.revi_190654 avatar image
sibi.revi_190654 asked sibi.revi_190654 commented

How do I start cqlsh in the Academy course DS220 VM?

As per the tutorial the path is set for cqlsh but it is not. I couldn't find where the node is installed. After the fresh import of the VM into Virtual box I am unable to find from where the cqlsh command is to be run. Did a search to find the path but couldn't. Please help.

academyds220
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

bettina.swynnerton avatar image
bettina.swynnerton answered

Hi @sibi.revi_190654 ,

as the command is in your path, you should be able run cqlsh anywhere.

However, I have tested this with a new download of the DS220 VM, and out of the box you are probably getting connection errors with cqlsh, as the DSE instance on the VM is not started successfully. The DSE instance cannot be started as it is configured for an IP address that is unavailable on your VM.

Please see the workarounds suggested in the answer to a similar question: https://community.datastax.com/questions/4166/ds220-vm-cannot-start-cassandra-instance.html

I will let the DataStax Academy team know that this is still an issue, thank you for your patience.

Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

saverio.guzzo.1992_190690 avatar image
saverio.guzzo.1992_190690 answered sibi.revi_190654 commented

Hey @sibi.revi_190654! Try to run `dse nodetool status` in the terminal and check if the node/s is/are UP normally; if not, you can always start-up cassandra by running `dse cassandra`.
If still you cannot connect, run `service dse start` and `service dse status` to verify the status. You should be good to go now!

1 comment Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

sibi.revi_190654 avatar image sibi.revi_190654 commented ·

Thanks for the answer. I did the work around mentioned by bettina. The commands to start service in this reply helped to check status and proceed. It is working. Thanks.

1 Like 1 ·
Erick Ramirez avatar image
Erick Ramirez answered sibi.revi_190654 commented

The path to cqlsh is set in the ubuntu user's profile:

ubuntu@ds220-node1:~$ which cqlsh
/usr/bin/cqlsh

However DSE is not configured correctly and is not running so when you try to run cqlsh, it can't connect to the cluster and the error should have been a clue:

$ cqlsh
Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})

Hopefully after having completed DS201 (and possibly DS210), you would have learned enough to figure out what the problem was. Notice in the error message that cqlsh is connecting to localhost.

DSE can't start because cassandra.yaml is configured with a non-existent IP address that DSE cannot bind to:

listen_address: 10.0.2.15
          - seeds: "10.0.2.15"

As Bettina already pointed out, I've provided the fix in question #4166. Cheers!

1 comment Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

sibi.revi_190654 avatar image sibi.revi_190654 commented ·

Thanks Erick. The solution works.

0 Likes 0 ·