Connecting to cqlsh from remote fails, where as from localhost it connects? - cassandra

Installed DSE on CentOS7 and saw no errors, I'm able to connect to cqlsh from the local machine and and I'm able to also do a telnet on the port.
However the problem is that when the same is done from a remote machine I get the below error
cqlsh XX.XXX.XX.XX 3389
Connection error: ('Unable to connect to any servers', {'10.223.61.49': ConnectionShutdown('Connection to 10.223.61.49 was closed',)})
To check the connectivity I did a telnet on this and see the below error
telnet XX.XXX.XX.XX 3389
Invalid or unsupported protocol version (13); supported versions are (3/v3, 4/v4, 5/v5-beta, 65/dse-v1)
I tried updating the Python version, also few tweaks to change the py script also didn't help

Related

How to install MongoDB Enterprise 4.4 on remote redhat server?

I followed the instructions listed here, https://docs.mongodb.com/manual/tutorial/install-mongodb-enterprise-on-red-hat/, and tried to install on a remote server from my local machine. I ssh from my local machine into the server and performed the steps for installation.
I'm not sure if there are additional steps that need to be completed or whether you have to set Directory Paths that are not the default ones since you are using a server instead of local machine. My current error is when I run mongo from my terminal and I get this error
Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :
connect#src/mongo/shell/mongo.js:374:17
#(connect):2:6
exception: connect failed
exiting with code 1
[h699972#csc2cxp00020938 ~]$ mongo --host
sudo vim /etc/mongod.conf and setting bindIp: 0.0.0.0 did not work. Any help would be appreciated.

Not able to run Cassandra locally using brew

I am trying to run Cassandra on my machine. Tying cqlsh gives me this error,
Connection error: ('Unable to connect to any servers', {'127.0.0.1:9042': error(61, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})
Running cassandra -f hangs.
I installed cassandra using brew install cassandra.
Also I have done all of the followings:
Killed docker instance
Uninstall and reinstall Cassandra (deleted all the Cassandra data and filles from my machine)
Restarted my machine
Purged docker data
I don't know why still I am running into this. Running brew services list shows:
Name Status User Plist
cassandra started aanish /Users/aanish/Library/LaunchAgents/homebrew.mxcl.cassandra.plist
mysql stopped
mysql#5.7 started aanish /Users/aanish/Library/LaunchAgents/homebrew.mxcl.mysql#5.7.plist
postgresql stopped
The cqlsh connection error indicates that localhost is not listening on port 9042 (Cassandra's CQL client port). The most likely reason is that the Cassandra process is not running.
You can confirm whether the Java process is listening on port 9042 if you run the following command in a terminal:
$ sudo lsof -nPi -sTCP:LISTEN
You will need to review the system.log (typically in /var/log/cassandra) to figure out what is going on with Cassandra.
Note that if you set rpc_address in cassandra.yaml to the IP of your mac, you need to specify that address when you connect with cqlsh. For example:
$ cqlsh 10.1.2.3

unable to access CQLSH from .cmd locally on VM

I am trying to connect with my Cassandra DB resides in a Windows VM but while executing the command cqlsh on Local command window. I am getting an exception:
Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(10061, "Tried connecting to [('127.0.0.1', 9042)]. Last error: No connection could be made because the target machine actively refused it")})
I'm able to connect this cassandra cluster from my cloud platform 'Databricks' with it's public ip using Spark but on local system it is throwing the error.
Can anyone please help me on this?
in Cassandra configs, Check on which ip address you've bind your rpc calls to ?
if it's not localhost/127.0.0.1 then specify on which interface's ip you've bind it to..
then connect with specifying ip address -
cqlsh <ip address for rpcs calls>

DBeaver(3.8.5) unable to connect to Cassandra 2.1.2 (NoHostAvailableException)

My DBeaver Enterprise Edition is unable to connect to a remote Cassandra store (2.1.2) on a Unix machine in the same network.It's throwing a NoHostAvailableException- All host(s) tried for query failed. The firewall is down on the Unix machine,the tcp port in cassandra.yaml is 9042 & I am using the same port in the DBeaver Connection configuration. I am also using SSH tunnel in the configuration to connect to the Unix machine.
I could use some help on fixing this problem.

cqlsh Connection refused

When ever you get a Cassandra cqlsh Connection error as follows:
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")})
You can also connect without using the IP address - just use the hostname:
cqlsh ‘hostname -I’
Another solution, type cqlsh <listen_address> [<port>] if it is not set to 127.0.0.1 or localhost
I was having the same issue with Cassandra 3.11.0, anytime I changed the address of rpc or listen address cqlsh wouldn't work. I had to add the same local ip to seeds
So after trial and error my cassandra.yml looked like:
class-name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
-seeds: "192.168.0.30"
listen_adress: 192.168.0.30
rpc_address: 192.168.0.30
then running
cqlsh 192.168.0.30 9042
When I installed Cassandra 3.11.1, I came across this problem.
I also found if I ran
service cassandra status
, there is a
cassandra dead but pid file exists
problem. It indicates that the Cassandra service does not start
I checked the
/var/log/cassandra/cassandra.log
and found this error:
Exception encountered during startup...
.It is a bug and already reported. The original post link https://issues.apache.org/jira/browse/CASSANDRA-14173.
The solution is to downgrade Cassandra to 3.0
download Cassandra rpm
curl -O
https://www.apache.org/dist/cassandra/redhat/30x/cassandra-3.0.15-1.noarch.rpm
or
wget
https://www.apache.org/dist/cassandra/redhat/30x/cassandra-3.0.15-1.noarch.rpm
rpm -ivh cassandra-3.0.15-1.noarch.rpm
service cassandra start
service cassandra status # check cassandra status, it should say
cassandra (pid 1234) is running...
cqlsh #start cassandra
Hope this helps you

Resources