How to troubleshoot Cassandra not starting from Homebrew? - macos

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.

Related

"Failed creating Java" when using Windows Services to start Cassandra

I have had Cassandra 3.11.1 up and running correctly with no Java issues. I've been trying to set it up as a service using Apache Commons Daemon as recommended in the install guide. I was able to install it as a service, but when I attempt to start the service through Windows Services Manager it fails. The log reads:
Commons Daemon procrun (64-bit) started
Running 'cassandra' service...
Starting Service...
Failed creating Java
ServiceStart returned 1
Run Service finished.
Through cassandra config I am pointing to the 64 bit daemon prunsrv application.
Since cassandra seems to be working perfectly on its own it seems like it's a problem with prunsrv, but I have no idea how to track that down. I've seen similar problems, but it always seems to be a 32 vs 64 bit issue or the wrong environment paths for cassandra. Those seem fine for me.
Thank you!

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

Cassandra Detected unreadable sstables(data not caches)

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

Can't add an admin in elasticsearch Shield [Error]: Could not find or load main class org.elasticsearch.shield.authc.esusers.tool.ESUsersTool

Good Morning
I am trying since yesterday to add an admin account to the elasticsearch 2.4 shield plugin. I am using Ubuntu 14.04 on one node and Ubuntu 16.04 on the two other nodes.
I have installed the Shield plugin on my Logstash Server and there it worked. On my Elasticsearch Server I have installed the Java Version:
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
I tried the command:
sudo /usr/share/elasticsearch/bin/shield/esusers useradd esadm -r admin
I am always getting the error:
Could not find or load main class org.elasticsearch.shield.authc.esusers.tool.ESUsersTool
I installed the Shield Plugin on all three Nodes and restarted the elasticsearch service on all nodes and I also rebooted all three nodes :)
Anyone an Idea?
PS: I have done the steps of the question: Can't add admin in Shield Elasticsearch - [Error]Could not find or load main class org.elasticsearch.shield.authc.esusers.tool.ESUsersTool and it's still not working.
Did you add path.plugins to your elasticsearch.yml? I have the same problem with you. And after I removed path.plugins, it works.

import neo4j database from windows to ubuntu

I have created a neo4j database on my windows machine.
I have transferred the content of the database directory to my linux machine. This is because I have the community edition which does not support the backup functions.
mtt#mttPC:/var/lib/neo4j/data/log$ sudo service neo4j-service start
WARNING: Max 1024 open files allowed, minimum of 40 000 recommended. See the Neo4j manual.
WARNING! You are using an unsupported Java runtime.
* Please use Oracle(R) Java(TM) 7 to run Neo4j Server. Download "Java Platform (JDK) 7" from:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
* Please see http://docs.neo4j.org/ for Neo4j Server installation instructions.
Using additional JVM arguments: -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled
Starting Neo4j Server...WARNING: not changing user
process [21498]... waiting for server to be ready..... Failed to start within 120 seconds.
Neo4j Server may have failed to start, please check the logs.
The file messages.log in the database directory says nothing.
Any idea? Are the windows and linux neo4js compatible? Thank you.
Edit
I have made a fresh install of neo4j on my ubuntu machine.
Now I finally get some logs:
2014-05-16 20:01:10.958+0000 ERROR [o.n.k.EmbeddedGraphDatabase]: Startup failed: Component 'org.neo4j.kernel.impl.transaction.XaDataSourceManager#25984c63' was successfully initialized, but failed to start. Please see attached cause exception.: Component 'org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource#3d34dcb' was successfully initialized, but failed to start. Please see attached cause exception.: 'neostore' has a store version number that we cannot upgrade from. Expected 'NeoStore v0.A.0' but file is version 'NeoStore v0.A.2'.
2014-05-16 20:01:10.958+0000 INFO [o.n.k.EmbeddedGraphDatabase]: Shutdown started
I should be related to this but I am not sure how to proceed. Is the issue related to the fact that when I copied the database, I just stopped neo4j on my windows machine from the neo4j window?
There is no reason why a Neo4j database should not be transferable between operating systems. Can you please provide the output of data/log/console.log? First thought is that you may have permission issues. The files should be read/write for the user the Neo4j process will run as.

Resources