Cassandra CQL Shell opens and closes

Asked

Viewed 410 times

0

I started studying about Cassandradb, but I am using Windows. When I start the service 'Datastax DDC Server 3.9.0' I get an error. Looking at the logs, you have the error:

Arquivo: datastax_ddc_server-stderr.xxx.log:  
2018-10-19 10:32:28 Commons Daemon procrun stderr initialized  
Invalid yaml: file:/C:/Program%20Files/DataStax-DDC/apache-cassandra/conf/cassandra.yaml  
Error: while scanning a double-quoted scalar; found unknown escape character D(68);  in 'reader', line 168, column 40:  
     ... og_directory: "C:\Program Files\DataStax-DDC\data\commitlog" 

In the archive datastax_ddc_server-stdout.xxx.log:

2018-10-19 10:32:28 Commons Daemon procrun stdout initialized  
INFO  13:32:29 Configuration location: file:/C:/Program%20Files/DataStax-DDC/apache-cassandra/conf/cassandra.yaml  
Exception (org.apache.cassandra.exceptions.ConfigurationException) encountered during startup: Invalid yaml: file:/C:/Program%20Files/DataStax-DDC/apache-cassandra/conf/cassandra.yaml  
Error: while scanning a double-quoted scalar; found unknown escape character D(68);  in 'reader', line 168, column 40:  
         ... og_directory: "C:\Program Files\DataStax-DDC\data\commitlog" 
                                         ^
ERROR 13:32:29 Exception encountered during startup: Invalid yaml: file:/C:/Program%20Files/DataStax-DDC/apache-cassandra/conf/cassandra.yaml
 Error: while scanning a double-quoted scalar; found unknown escape character D(68);  in 'reader', line 168, column 40:
     ... og_directory: "C:\Program Files\DataStax-DDC\data\commitlog" 

2 answers

0

There are two ways to start the Database server, the first is by setting the location of the Database bin folder within the system variable PATH and just after opening the command prompt and simply typing cassandra.

The second way is to navigate the command prompt to the folder of the folder and then into the bin folder using the command cd. After entering the bin folder of the folder just type cassandra.bat -f.

After running the command the server would be turned on and you should keep the command prompt window open. If you close the command prompt window the server will be turned off.

To be able to manage the database you have two options, the first one is to download the Datastax Devcenter and work with everything via graphical interface. The second option is to use the cqlsh command at the command prompt. If you have done the scheme of adding the system variable just use cqlsh at the command prompt, otherwise just navigate into the bin simply again and run the command cqlsh.bat.

Remember that depending on your windows you may need to run a command that will release the use of scripts files. external bat (which are the files from the database).

0

I have not been able to solve the problem yet, but I have managed to get around it. Inside the directory of the Folder has a file called 'Cassandra.bat', I surrounded this file and then started the shell cql of the Database, after that I was able to work normally with the database.

I haven’t had time to analyze the.bat file yet, but my solution will be there, at least its direction.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.