Cassandra-3.10 on Ubuntu 14.04 malfunctions on machine restart - cassandra

Here's what I have:
- I installed a cassandra 3.10 version on my Ubuntu 14.04.
- I have it running as a service.
- I've modified cassandra.yaml file to listen to my node
- I have a single node.
Everything was working fine; until I had to restart my machine. I hit the command:sudo service cassandra stop (I tried restarting my machine without stopping cassandra as well), then restarted my machine. When i got back, and tried to access through cqlsh, I get the following error:
Connection error: ('Unable to connect to any servers', {'192.168.2.202': error(111, "Tried connecting to [('192.168.2.202', 9042)]. Last error: Connection refused")})
When I look for nodetool status, instead of a valid Host ID, I see null. I tried nodetool refresh, but no luck.
Can anyone tell me what's wrong?

The issue is now resolved.
I was going through Cassandra's download instructions to check if I had messed something up during my installation.
Then I came across this information: "Even numbered versions are bug fixes and new releases and features, possibly buggy (with existing bugs from new features); odd numbered versions are bug fixes to its immediate predecessor".
Apparently, this is something called the "tick-tock" release.
I believe that was the problem - a bad version. I just checked it out with the now-latest Cassandra version - 3.11 (odd == less buggy), and it's working perfectly. Lesson learned - never deploy the latest Cassandra version in production if the version is even!
References:
https://www.datastax.com/dev/blog/cassandra-2-2-3-0-and-beyond
https://www.pythian.com/blog/cassandra-version-production/

Related

Database 'neo4j' is unavailable. Cannot reset neo4j database

I have my community 4.1.1 neo4j service installed on the ubuntu commandline running on my windows machine. I have been using neo4j steadily for a month or two now, just recently it has prevented me from accessing the neo4j database, it will say this in neo4j browser:
Database 'neo4j' is unavailable. Run :sysinfo for more info.
I have tried uninstalling neo4j and reinstalling but that has not worked either. I tried playing around with the default listen address previously, but now with the reinstall all config data is back to normal. Running ./neo4j-community-4.1.1/bin/cypher-shell under bin does not work. It says:
Unable to establish connection in 3000ms
If I run ./neo4j-community-4.1.1/bin/cypher-shell -a 192.168.0.19 it says:
Database 'neo4j' is unavailable
When I run ./neo4j-community-4.1.1/bin/neo4j-admin check-consistency --database=neo4j it also states:
.2020-08-18 22:12:16.868+0000 WARN [o.n.c.ConsistencyCheckService] Index was dirty on startup which means it was not shutdown correctly and need to be cleaned up with a successful recovery. Index file: /home/thomp105/neo4j-community-4.1.1/data/databases/neo4j/neostore.relationshipgroupstore.db.id.
I would love to reset everything from scratch but I am unsure how
At this point I cannot even access the browser at localhost:7474. It hangs indefinitely trying to load.
I am truly stumped. Anyone have any advice on how I navigate this issue?
It's not easy to guess the issue without seeing your system, but may I ask if you can try to delete your default database, i.e. neo4j physically from the disk (e.g. rm -rf /home/thomp105/neo4j-community-4.1.1/data/databases/neo4j/), and then try to create another database with different name instead (open neo4j.conf, search for dbms.active_database, which point out on default database, and change it to some other name)?
I had this problem running on a linux server. The server was up but got this error on any query: Database 'neo4j' is unavailable. To troubleshoot I ran sudo neo4j console and the problem went away. When I ran the console as user ne04j the problem came back.
$ /usr/share/neo4j/bin/neo4j console
Directories in use:
home: /var/lib/neo4j
config: /etc/neo4j
logs: /var/log/neo4j
plugins: /var/lib/neo4j/plugins
import: /var/lib/neo4j/import
data: /var/lib/neo4j/data
certificates: /var/lib/neo4j/certificates
run: /var/run/neo4j
So I tried: sudo chown -R neo4j:neo4j /var/lib/neo4j/data and the problem went away. Apparently when I'd done a restore of the database I'd run the neo4j server as root and when the system runs neo4j it does it as the user neo4j so couldn't read any of its data. It seems that an error like this would warrant an easy to parse error message but verbosity is not the neo4j way.

why am I receiving error starting microclimate on macos stating TLS handshake timeout

I've successfully completed the ./install.sh command. When I run the next "~/mcdev start -o" I receive this error: "Starting Microclimate
Pulling microclimate-file-watcher (ibmcom/microclimate-file-watcher:1809)...
ERROR: Get https://registry-1.docker.io/v2/ibmcom/microclimate-file-watcher/manifests/1809: net/http: TLS handshake timeout
Error starting Microclimate"
I have running on my pc:
git version 2.17.1 (Apple Git-112); Docker version 18.06.1-ce; MacOS
High Sierra v 10.13.6; latest Microclimate v18.09
My network is up and I don't have any proxy.
What am I missing or doing wrong?
I got this to work by changing to a different wifi \ internet connection. Still not sure why my home wifi, with no restrictions that I'm aware of, will 'block' the dependency downloads upon start of Microclimate.
If anybody has additional info to help find the root cause please feel free to share.
This docker error generally shows up when your internet connection is too slow for Docker, as it times out performing the TLS handshake. This would also explain why moving to another network fixes the issue.

Could not connect to cassandra with cqlsh

I want to connect to cassandra but got this error:
$ bin/cqlsh
Connection error: ('Unable to connect to any servers', {'192.168.1.200': error(10061, "Tried connecting to [('192.168.1.200', 9042)]. Last error: No connection could be made because the target machine actively refused it")})
Pretty simple.
The machine is actively refusing it because your system does not have cassandra running on it. Follow the following steps to completely get rid of this trouble :
Install Cassandra from DataStax (Datastax-DDC; Cassandra version 3).
Go to ~\installation\path\DataStax-DDC\apache-cassandra\bin.
Open up cmd there. (Use Alt+F+P to open it if you are on windows 8 or later).
type cassandra -f this will generate a lot of stuff on the window and you must get the last line as INFO 11:32:31 Created default superuser role 'cassandra'
Now open another cmd window in the same folder.
Type cqlsh
This should give you a prompt, without any error.
I also discovered that this error doesn't pop up if I use cassadra v2.x found here Archived version of Cassandra. I don't know why :( (If you find out please comment).
So, if the above steps do not work, you can always go back to Cassandra v2.x.
Cheers.
Check if you have started Cassandra server, then provide the host and port as the arguments.
$ bin/cqlsh 127.0.0.1 4092
I run into the same problem. This worked for me.
Go to any directory for example E:\ (doesn't have to be the same disc as the cassandra installation)
Create the following directories
E:\cassandra\storage\commitlogs
E:\cassandra\storage\data
E:\cassandra\storage\savedcaches
Then go to your cassandra installations conf path. In my case.
D:\DataStax-DDC\apache-cassandra\conf
Open cassandra.yaml. Edit the lines containing: data_file_directories, commitlog_directory, saved_caches_directory to look like the code below (change paths accordingly to where you created the folders)
data_file_directories:
- E:\cassandra\storage\data
commitlog_directory: E:\cassandra\storage\commitlog
saved_caches_directory: E:\cassandra\storage\savedcaches
Then open the cmd (I did it as administrator, but didn't check if it is necessary) to your cassandra installations bin path. In my case.
D:\DataStax-DDC\apache-cassandra\bin
run cassandra -f
Lots of stuff will be logged to your screen.
You should now be able to run cqlsh and all other stuff without problems.
Edit: The operating system was windows10 64bit
Edit2: If it stops working after a while check if the service is till running using nodetool status. If it isn't follow this instruction.
I also faced the same problem on a Win32 windows 7 machine.
Check if you have JAVA installed correctly and JAVA_HOME variable set.
Once you have checked the java installation and set JAVA_HOME, uninstall Cassandra and install it again.
Hopefully this would solve the problem. Mine was solved after applying the above two steps.
You need to mention host, user, password for cassandra cqlsh connection. Default cassandra cqlsh user is cassandra and password is cassandra.
$ bin/cqlsh <host> -u cassandra -p cassandra
I also had same problem. I applied many methods given on google and youtube but none of them worked in my case. Finally, I applied the following 3 steps and it worked in my case:-
Create a folder without any space in C or D whichever is your system drive. eg:- C:\cassandra
Install Cassandra in this folder instead of installing in"Program Files".
After installation, it will be like this- C:\cassandra\apache-cassandra-3.11.6
Copy python 2.7 installed in bin folder i.e.,C:\cassandra\apache-cassandra-3.11.6\bin
Now your program is ready for work.
There is no special method to connect cqlsh it simple as below:-
$ bin/cqlsh 127.0.0.1(host IP) 9042 or $ bin/cqlsh 127.0.0.1(host IP) 9160 (if older version of Cassandra)
Don't forget to check port connectivity if you are connecting cqlsh to remote host. Also you can use username/password if you enabled by default it is disabled.

DataStax OpsCenter - can't connect with agents

I've installed DataStax OpsCenter (Apache Cassandra) and in OpsCenter, there is an error: "0 of 1 agents connected". When I click "fix", enter credentials and try to install nodes, i get error:
Unable to SSH to some of the hosts
Unable to SSH to 127.0.0.1:
global name 'get_output' is not defined
Does anyone have any ideas how to fix it?
I fixed the problem with instruction from stackoverflow
The reason is OpsCenter could not find correct cassandra config file (cassandra.yaml).
In my case I installed cassandra to "D:\DataStax" instead of default location "C:\Program Files\DataStax Community". Add conf_location to opscenter\conf\clusters\local.conf solved my problem.
This is my final setting:
conf_location = [DataStax Install Dir]\apache-cassandra\conf\cassandra.yaml

Host Inspector message while installing CDH 4 - expected hostname and actual hostname

I am trying to install CDH 4 on Ubuntu 10.x. Everything worked fine. But the Host Inspector gave the following message.
host hadoop.ubuntu.com expected to have name hadoop.ubuntu.com, but resolved (InetAddress.getLocalHost().getHostName()) to Ubuntu-64bit.
This is how the entry in the hosts file looks
192.168.56.101 hadoop.ubuntu.com Ubuntu-64-bit
So I have two queries
1. Is the syntax of specifying hostname in the line - 192.168.56.101 hadoop.ubuntu.com Ubuntu-64-bit, incorrect and what is the proper way?
2. If I let CDH 4 run with this message, will any functioning get affected?
The cluster (single node though) started fine without any issues so far. So looks like this host inspector warning did not cause any problems. Also changing the syntax of the line of IP address in the hosts file causes more issues. So I am closing this question for now.

Resources