Cassandra Detected unreadable sstables(data not caches) - amazon-ec2

ERROR [main] 2017-08-04 13:24:21,949 CassandraDaemon.java:638 - Detected unreadable sstables /opt/cassandra/data/some_key_space/ep_lc_events-adc44160dbe611e6953689bcd3ed73aa/mc-547-big-Summary.db, and many others...
That has happened after I upgraded Cassandra to 3 version and after a while downgraded it to 2nd version.
When I run this command: sudo service cassandra status
I have got such message:
could not access pidfile for Cassandra
In /var/log/cassandra/system.log I have logs which I wrote at the beginning.
PS: let me pay your attention that everything is happening on EC2 Amazon instance.

Well, I have just upgraded back to 3rd version, used cassandra-unloader to export all data, then downgraded back to 2nd version and used cassandra-loader to import all data. But if you were lucky and had backups and snapshots it would not be an obstacle for you.
PS. Afterwards, I had to run this command nodetool resetlocalschema to reset local schema and resynchronize.
PPS. This you can find how to do that.
https://github.com/brianmhess/cassandra-loader

I also got the same error, but it was due to switching between cassandra 4.0.0 and version 3.11 and back again while using docker.
Update the version to the right one for the ssltable, or delete the data volume:
docker-compose logs cassandra
docker volumes ls
docker ps
docker-compose down
docker volume rm testapp_cassandra
docker volume ls
docker-compose up

Related

Unable to install Cassandra on Windows

Hey Guys I'm unable to install Cassandra on my PC. I'm getting an error like this
"cassandra : The term 'cassandra' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name,
or if a path was included, verify that the path is correct and try again.
At line:1 char:1
cassandra
+ CategoryInfo : ObjectNotFound: (cassandra:String) [], Command
NotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Suggestion [3,General]: The command cassandra was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\cassandra". See "get-help about_Command_Precedence" for more details."
I'm attaching all the screenshots, pleaseenter image description here let me know where I'm gone wrong!
Windows support was completely dropped in Cassandra 4.0 (CASSANDRA-16171). There are several known issues with running Cassandra on Windows so support was limited even in earlier versions of Cassandra.
The recommended workarounds are:
Deploy Cassandra in Docker
Deploy Cassandra in a VM using
software like VirtualBox
Deploy Cassandra in a Kubernetes cluster
with K8ssandra.io
Otherwise if you just want to learn how to build apps on Cassandra, Astra DB has a free tier and you can launch a cluster in 5 clicks. Cheers!
As another possible method of achieving this, I recommend running Cassandra on Minikube. I did a video on this recently, and have a Git repository full of scripts and steps to help folks get this running.
Here are the high-level steps (from the repo):
Download & install Minikube: https://minikube.sigs.k8s.io/docs/start/
Clone my repo:
git clone git#github.com:aar0np/cassandra_minikube.git
Start Minikube, limiting it to 3GB and 2 CPUs:
minikube start --memory 3072 --cpus=2
Create a Kubernetes "service"
minikube kubectl -- apply -f cassandra-service.yaml
Create a Kubernetes "StatefulSet"
minikube kubectl -- apply -f cassandra-minikube_1node.yaml
Set up and run a port-forward
minikube kubectl -- port-forward service/cassandra 9042:9042

How to troubleshoot Cassandra not starting from Homebrew?

When I try to start Cassandra with brew services start cassandra, I get a message that it has been successfully started. However, when I do brew services list, the Cassandra status is started but the started text is orange (not green).
It seems that Cassandra is not running at all. I am unable to connect to it with cqlsh and get no results when I run ps aux | grep cass.
Any suggestions how to troubleshoot Cassandra not starting from Homebrew?
This is a problem with Java version - existing releases of the Cassandra do work only with Java 8. Support for Java 9,10,11, ... is added only in Cassandra 4.0 that isn't released yet. You need to install Java 8 and point Cassandra to it.
You can read more about the changes in following blog post.

SolrCore is loading running as Windows Service

Logged into Windows Server 2016 as Administrator, I can run Solr from the command line: bin\solr.cmd start -p 8983 -f
I have configured a Solr to run as a Windows Service - running as the same user, with the same command, same startup directory, etc. - however under load, the following error comes back from the upstream application (Sitecore xConnect, though this shouldn't make a difference)
{metadata={error-class=org.apache.solr.common.SolrException,root-error-class=org.apache.solr.common.SolrException},msg=SolrCore is loading,code=503}
To reiterate, everything works fine when Solr is started from the command line, only when it's run as a Windows Service does it error.
Solr version: 6.6.3
Windows version: Server 2016
Environment: AWS (m5.large EC2 instance)
Sitecore compatibility table says to use Solr 6.6.1 with Sitecore, You should still use 6.6.2 as it fixes a bug in Solr 6.6.1 that can affect the installation of SIF. Read here
I recommend you try again with Solr 6.6.2
It turns out that the service was configured to run without the -f flag. So the process would continually stop and re-spawn.

Upgrade MariaDB Cluster 10.1 to 10.2

I'm planning to upgrade MariaDB Galera cluster from 10.1 to 10.2. Does anyone have details for steps to upgrade? My idea is something
Backup
Shutdown cluster
Uninstall 10.1 from each node
Install 10.2 to each node
Run mysql_upgrade at node which going to started first
Configure the first node and start
Configure rest of nodes and start them
I have three node cluster with maxscale loadbalancing.
You can upgrade the cluster in a rolling fashion, i.e. one node at a time without shutting down the others. That is one of the benefits of Galera cluster.
Make sure to avoid 10.2.9 or be ready to edit mysqld_safe, see here.
For each node:
maxadmin: set server $node-name maintenance
Backup databases and config files
Shutdown the mysqld instance
Uninstall 10.1. On Redhat use rpm -e --nodeps rather than yum remove to avoid uninstalling packages such as postfix and cronie.
Install 10.2
Copy back config files, change any mariadb-10.1 sections to mariadb-10.2
Startup the mysqld instance
If you're on Redhat, CentOS or Fedora run mysql_upgrade
maxadmin: clear server $node-name maintenance

Is the latest version of docker from Amazon on ec2 broken?

As of last night all our new docker deployments started failing because the latest version of docker (docker-1.3.2-1.0.amzn1.x86_64) in the amazon repo fails to start up.
Steps to reproduce are:
## Launch instance with default amazon AMI
yum install docker-1.3.2-1.0.amzn1.x86_64
service docker restart
### Get the following error in /var/log/docker
2014/11/26 05:14:16 docker daemon: 1.3.2 c78088f/1.3.2; execdriver: native; graphdriver:
[8f6d7cfb] +job serveapi(unix:///var/run/docker.sock)
[info] Listening for HTTP on unix (/var/run/docker.sock)
docker: relocation error: docker: symbol dm_task_get_info_with_deferred_remove,
version Base not defined in file libdevmapper.so.1.02 with link time reference
If I downgrade back to docker-1.3.1-1.0.amzn1.x86_64 everything seems to be fine.
Is the AWS package actually broken, or is it just our setup?
Is there a work around other than downgrading?
Yes, it is broken for me too.
Downgrading has been the solution yet.
The same error was by me on a centos VM provisioned at my workplace - a yum update resolved it.
I suspect a build was broken but went out, and has been fixed subsequently.

Resources