quantum-fusion / springboot_swagger_example-master-cassandra

0 stars 0 forks source link

Datastax DevCenter upgrade, Cassandra 3.11.1 and unconfigured table schema_keyspaces" error #3

Closed quantum-fusion closed 6 years ago

quantum-fusion commented 6 years ago

Dear Alan, (alan.boudreault@datastax.com)

I am a development Datastax customer, and am currently using DevCenter 1.3.1 for MAC/OS, since 2014.

My goal, is to upgrade to the latest Cassandra, with the latest Datastax tools, and to support Docker with DataStax driver running internally. I can provide more information about my system test, however, wanted to get these basic things out of the way first, by describing the triage scenario here on MACOS with MacOS High Sierra version 10.13.1.

I know I can make all of these issues go away, by reverting back to cassandra version 2.1.5, which works on my system, without any of these errors, however, I would like to move forward here, and need assistance to upgrade. The actions, I took, were an upgrade to use 5.1.5, however I did not see the upgrade to DevCenter, and need to know where the download link is located.

I decided without the DevCenter upgrade, to do a standalone system test, with Docker, to help by debugging connectivity TransportExceptions I was seeing with port 9042 that is bound to 127.0.0.1 with cassandra running inside docker.

I recently upgraded to cassandra 3.11.1, and saw your post in the newsgroup(https://groups.google.com/a/lists.datastax.com/forum/#!msg/python-driver-user/cbY5YvSqX7A/WcuB_oQUEAAJ), about an issue I am having with Cassandra and Docker.

I executed this docker script, to get cassandra 3.11.1.

Step1: docker run --name cassandra -m 2g -p 127.0.0.1:9042:9042 -d cassandra

I then wanted to connect to the cassandra docker image, to see if I can get cqlsh, because I am seeing the same unconfigured table schema keyspaces error in DevCenter 1.3.1

Step2: docker exec -it cassandra cqlsh 172.17.0.2 Connected to Test Cluster at 172.17.0.2:9042. [cqlsh 5.0.1 | Cassandra 3.11.1 | CQL spec 3.4.4 | Native protocol v4] Use HELP for help. cqlsh> SELECT * FROM system.schema_keyspaces; InvalidRequest: Error from server: code=2200 [Invalid query] message="unconfigured table schema_keyspaces"

I looked at the datastax documentation, and did an upgrade to the cassandra-driver for python. (https://github.com/datastax/python-driver), and executed pip install cassandra-driver However, then found additional instructions, for upgrading (https://datastax.github.io/python-driver/installation.html), and after verifying installation, see "/usr/bin/python -c 'import cassandra; print cassandra.version' Traceback (most recent call last): File "", line 1, in ImportError: No module named cassandra"

I have a couple of questions here:

  1. Is there an upgraded version of DevCenter that I can get for MACOS that addresses and solves these problems?

  2. Do I really need the Python interpreter, I don’t really see why, since the error I am seeing is part of the cqsl interpreter "InvalidRequest: Error from server: code=2200 [Invalid query] message="unconfigured table schema_keyspaces””.

  3. Why am I seeing this error when in Cassandra 2.1.x I was not seeing this error at all previously?

The problem I am seeing in DevCenter in addition is, "The specified host(s) could not be reached. All host(s) tried for query failed (tried: /172.17.0.2:9042 (com.datastax.driver.core.TransportException: [/172.17.0.2:9042] Cannot connect)) [/172.17.0.2:9042] Cannot connect”, and I see the same problem within a SpringBoot app inside Docker with Datastax driver.

Basically, I need to get to the root of the issue here with DevCenter and CQLSH, since these issues, are fairly basic, and have to do with the installation and compatibility with Cassandra, and Datastax DevCenter. I also am seeing the errors, from the CQLSH command line, which tells me this has more to do with Cassandra 3.11.1.

Please advise.

quantum-fusion commented 6 years ago

See example for connecting to cassandra CQLSH interpreter within Docker:https://qiita.com/ir-shin1/items/250fc06df3215b5e6526

quantum-fusion commented 6 years ago

This executes successfully, from MACOS, however limits port bindings to 127.0.0.1 for local test only.

docker run -d --name main-cassandra -v main-cassandra-db:/var/lib/cassandra -p 127.0.0.1:9160:9160 -p 127.0.0.1:9042:9042 -m 1G cassandra:3.11.1

quantum-fusion commented 6 years ago

This executes successfully after starting cassandra 3.11.1 in Docker.

docker exec -it main-cassandra cqlsh 172.17.0.2 9042

See results, after initializing from REST Spring App, from command line.

Connected to Test Cluster at 172.17.0.2:9042. [cqlsh 5.0.1 | Cassandra 3.11.1 | CQL spec 3.4.4 | Native protocol v4] Use HELP for help. cqlsh> SELECT * FROM accounts.restaurants;

restaurantid | cuisine | seating --------------+---------+--------- ABC678 | french | 20

(1 rows) cqlsh>

Note: DevCenter is still down, and will not connect to Cassandra in Docker.

quantum-fusion commented 6 years ago

DevCenter when pointed to 172.17.0.2:9042, with cassandra 3.11.1, yields error: Unable to execute CQL script on connection0, unconfigured table schema_keyspaces))

quantum-fusion commented 6 years ago

This appears to be a DevCenter 1.3.1 incompatibility with Cassandra 3.11.1, and needs a DevCenter upgrade version available.

quantum-fusion commented 6 years ago

This is closed with the upgrade to DevCenter 1.6. (https://groups.google.com/a/lists.datastax.com/forum/#!topic/java-driver-user/4YpaLbXOcHQ)

quantum-fusion commented 6 years ago

This is closed with the upgrade to DevCenter 1.6.