Hi Im new on cassandra and I running ubuntu OS. How do I set up cassandra in ubuntu 20?. Why Im I getting so many errors? This is the last one I come across, I have tried everything
cassandra
.....
ERROR org.apache.cassandra.db.Directories - Doesn't have write permissions for /var/lib/cassandra/data directory
before that one I got this one
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")})
The error indicates that the default cassandra user does not have permissions on the data directory.
Ordinarily for package installations, it will automatically create the directories for you with the correct permissions but if you manually created directories before running the installation, there's a possibility that you created them as root so Cassandra can't access them.
If so, you will need to reset the permissions to the cassandra user for all the directories and subdirectories in /var/lib/cassandra.
For details, see the Installation instructions I wrote in the official Apache Cassandra website. Cheers!
Related
I am getting error when I try to datastax cassandra instance.
bin/cqlsh -u admin -p PASSWORD -b BUNDLE_ZIP_PATH
Connection error: ('Unable to connect to any servers', \
{'xxx:xxx:xxx': ValueError('No host_id to create the SniEndPoint',)} \
)
Have anyone seen this error? This is a to a cloud managed datastax instance on IBM Cloud and the connection used to work before.
The error is generated by the embedded Python driver that cqlsh uses to connect to clusters. It indicates that it couldn't get the host from the secure bundle.
The most likely cause is that the secure bundle you're using is corrupted so I'd suggest downloading it from the source again. Cheers!
For my 6 node cluster, I am unable to cqlsh <ip> to the cluster. It gives me :
Connection error: ('Unable to connect to any servers', {'192.168.19.2': ProtocolError("cql_version '3.3.1' is not supported by remote (w/ native protocol). Supported versions: [u'3.4.4']",)})
But, I checked nodetool status, all my nodes are up and running. Also, I am able to contact the cluster via client.
For the cassandra.yaml on each node, I set the following parameters:
listen_address: node's ip
broadcast_address: node's ip
rpc_address: node's ip
broadcast_address: left blank
seed node: same two ips in each nodes
What seems to be the issue?
Update:
I am able to cqlsh from other nodes but not from the first nodes. I can observe that while working on the first node, I somehow messed up with its cqlsh version. Is it possible to change it?
Connection error: ('Unable to connect to any servers',
{'192.168.19.2': ProtocolError("cql_version '3.3.1' is not supported
by remote (w/ native protocol). Supported versions: [u'3.4.4']",)})
You do have different versions of cassandra installed or using the wrong driver. You want to upgrade to your drivers for connecting to your cluster as 3.4 seems to be a 3.10.x cluster while your driver only supports 3.0.x.
I am new to cassandra.
These are the resources with theirs' respected versions that i have used to set up cassandra.
java : jdk1.8.0.111
cassandra : 3.10
ubuntu : 15.10
I have intsalled cassandra and made changes in the cassandra.yaml file. when i run cqlsh from editor then it shows following error:
Connection error: ('Unable to connect to any servers', {'127.0.0.1': AuthenticationFailed('Remote end requires authentication.',)})
I tried my best to look at the issue but couldn't resolve it.
can someone please help me in this.
It seems you have enabled Authentication in your cassandra.yaml file. Login in cqlsh with default username and password 'cassandra'.
cqlsh <listen address> <cql port> -u cassandra -p cassandra
try below code
from cassandra.cluster import Cluster
from cassandra.auth import PlainTextAuthProvider
auth_provider = PlainTextAuthProvider(username ='<<username>>', password='<<password>>')
cluster=Cluster(['<<some ip or url >>'], auth_provider=auth_provider)
Just installed 64 bit DevCenter 1.5.0 on my Windows 7x64 pc. Now I am trying to connect DevCenter to our Apache Cassandra installation on a remote server. Within DevCenter, I'm getting an error when I try to connect to a remote Cassandra installation. The message from the error log is
!ENTRY Connection # open 4 0 2016-05-19 08:03:02.529
!MESSAGE com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: host.domain.com/###.##.##.###:9042 (com.datastax.driver.core.TransportException: [host.domain.com/###.##.##.###:9042] Cannot connect))
I can however connect command line using cqlsh and it shows
cqlsh 5.0.1 | Cassandra 2.1.14 | CQL spec 3.2.1 | Native protocol v3.
In my cqlshrc file - I have to specify [cql] version = 3.2.1 and the certificate to make the connection function.
From what I have read - to make DevCenter connect - I had to do a couple of things
1) Create a truststore for the certificate and reference it in the connection properties with the password - and that seems to be ok I believe (info from the DataStax site)
2) The second thing I needed to do was change the cassandra.yaml file in C:\Program Files\DataStax-DDC\apache-cassandra\conf - change the rpc_address to the host.domain.com and verify start_native_transport: true (StackOverflow)
I am not sure what I am missing - to successfully connect DataStax DevCenter on my windows 7 machine to the apache cassandra installation on a remote server (host.domain.com).
I am unable to connect to to the cassandra. By this I mean that when I try cassandra-CLI, or pycassaShell I get the following error:
Exception connecting to localhost/9160. Reason: Connection refused.
I have tried using a few non-defaul ports but to no joy.
I am running cassandra version 1.0.7
I have tried bounding the service, using restart, stop, start, and force-restart.
Run jps command under root user and kill CassandraDaemon if you will see it. After this you will start Cassandra again.
My problem was cassandra was not even starting. Solution was to start Cassandra!
I had the same issue in cassandra, After rename var/lib/cassandra/data to var/lib/cassandra/data1 then cassandra is working fine, If cassandra alloted maximum memory is full then it will throw connection refuse exception