How do I download and install Apache Cassandra?
Assuming that you've already done this, but here's the Apache Cassandra download page: https://cassandra.apache.org/_/download.html
Following the links to download the current GA release should put an Apache Cassandra tarball in your ~/Downloads directory. I'd recommend moving that:
cd ~
mv ~/Downloads/apache-cassandra-4.0.6-bin.tar.gz .
Next, untar it:
tar -zxvf apache-cassandra-4.0.6-bin.tar.gz
That will create a directory containing Apache Cassandra. To start Cassandra cd into that directory and execute the cassandra binary.
cd apache-cassandra-4.0.6
bin/cassandra -p cassandra.pid
You should see several messages, but this indicates a successful start:
StorageService.java:2785 - Node localhost/127.0.0.1:7000 state jump to NORMAL
Running Cassandra like this with the -p option will put the process ID into the cassandra.pid file and run it in the background. To stop Cassandra, simply run a kill on the contents of the file.
kill `cat cassandra.pid`
Powershell script execution unavailable. Please use 'powershell Set-ExecutionPolicy Unrestricted' on this user-account to run cassandra with fully featured functionality on this platform. Starting with legacy startup options JAVA_HOME environment variable must be set!
Ahh... You're trying to run Cassandra on Windows! That's an important detail to mention. Cassandra used to ship with Powershell scripts for this purpose...which were removed with version 4.0. Your options:
Run Apache Cassandra 3.11, which still has the Powershell scripts.
Run Apache Cassandra 4.0 using local virtualization/containerization.
Last year I posted a video on how run Cassandra 4.0 locally on Windows using Minikube: Setting up Cassandra 4.0 locally on a Windows Machine
You can also use the official Cassandra container image on Docker Hub, assuming your company allows it, and you don't mind it missing important things like security.
Related
I'm trying to install DataStax Bulk Loader on my Windows machine in order to import json file to Cassandra databse. I just follow the installation instructions from the official webstie. It's just unpack the folder. Printing dsbulkfrom any catalogue into cmd prints the following result: "dsbulk" is not internal or external command, executable program, or batch file. However I added C:\DSBulk\dsbulk-1.7.0\bin into PATH variables. Anyone who faced with this problem what did you do? Thanks :D
Change into the bin/ directory where you unzipped the package. For example:
C:> cd C:\DSBulk\dsbulk-1.7.0\bin
Then run the dsbulk.cmd from there.
NOTE: Make sure you have both the classpath and Java home set in your environment. Cheers!
I have Datastax community edition 2.2.11 Cassandra with 90 nodes in a cluster.
I am trying to migrate to Apache Cassandra 2.2.11
First I would like to try in my test environment but couldn't find any documentation Is there a pattern or a way that I should do the migration?
Anybody who has experience?
Steps:
Alter the keyspaces using "EverywhereStrategy" to "SimpleStrategy". "EverywhereStrategy" is not supported by Apache cassandra.
There's one or two keyspaces that uses it, dse_system is one of them.
Run nodetool drain before shutting down the existing Cassandra service.
Stop cassandra services.
Back up your Cassandra configuration files from the old installation.
Update java version if needed.
Install the binaries (via tarball, apt-get, yum, etc...) for the apache Cassandra.
Configure the new product.
Compare, merge and update any modifications you have previously made into the new configuration files for the apache version (cassandra.yaml, cassandra-env.sh, etc.).
Start the cassandra services.
Check the logs for warnings, errors, and exceptions.
tail -f /var/logs/cassandra/system.log # or path where you set your logs.
Run nodetool upgradesstables
"nodetool upgradesstables"
(The upgradesstables step can be run on each node after the nodes done with migration.)
Check the logs for warnings, errors, and exceptions.
tail -f /var/logs/cassandra/system.log # or path where you set your logs.
Check the status of the cluster
nodetool status
Repeat theses upgrade steps on each node in the cluster.
Question: How can I confirm whether or not my "Dedicated Server" is running properly?
Background: I am working to get a 'Dedicated CoreNLP Server' running on a stand-alone Linux system. This system is a laptop running CentOS 7. This OS was chosen because the directions for a Dedicated CoreNLP Server specifically state that they apply to CentOS.
I have followed the directions for the Dedicated CoreNLP Server step-by-step (outlined below):
Downloaded CoreNLP 3.7.0 from the Stanford CoreNLP website (not GitHub) and placed/extracted it into the /opt/corenlp folder.
Installed authbind and created a user called 'nlp' with super user privileges and bind it to port 80
sudo mkdir -p /etc/authbind/byport/
sudo touch /etc/authbind/byport/80
sudo chown nlp:nlp /etc/authbind/byport/80
sudo chmod 600 /etc/authbind/byport/80
Copy the startup script from the source jar at path edu/stanford/nlp/pipeline/demo/corenlp to /etc/init.d/corenlp
Give executable permissions to the startup script: sudo chmod a+x /etc/init.d/corenlp
Link the script to /etc/rc.d/: ln -s /etc/init.d/corenlp /etc/rc.d/rc2.d/S75corenlp
Completing these steps is supposed to allow me to run the command sudo service corenlp start in order to run the dedicated server. When I run this command in the terminal I get the output "CoreNLP server started" which IS consistent with the the start up script "corenlp". I then run the start command again and get this same response, which is NOT consistent with the start up script. From what I can tell, if the server is actually running and I try to start it again I should get the message "CoreNLP server is already running!" This leads me to believe that my server is not actually functioning as it is intended to.
Is this command properly starting the server? How can I tell?
Since the "proper" command was not functioning as I thought it should, I used the command sudo systemctl *start* corenlp.service and checked the service's status with sudo systemctl *status* corenlp.service. I am not sure if this is an appropriate way in which to start and stop a 'Dedicated CoreNLP Server' but I can control the service. I just do not know if I am actually starting and stopping my dedicated server.
Can I use systemctl command to operate my Dedicated CoreNLP Server?
Please read the comments below the originally posted question. This was the back and forth between #GaborAngeli and myself which lead my question/problem being solved.
The two critical steps I took in order to get my instantiation of the CoreNLP server running locally on my machine after following all the directions on how to setup a dedicated server, which are outlined on Stanford CoreNLP's webpage, are as follows:
Made two modifications to the "corenlp" start-up script. (1) added sudo to the beginning because the user "nlp" needs permissions to certain files on the system (2) changed the first folder path from /usr/local/bin/authbind to /usr/bin/authbind. authbind installation must've changed since the start up script was written.
nohup su "$SERVER_USER" -c "sudo /usr/bin/authbind --deep java -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir_"$CORENLP_DIR" -cp "$CLASSPATH" -mx15g edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 80"
If you were to attempt to start the server with the change above you would not successfully run server because sudo usage requires a password input. In order to allow sudo privileges without a required password entry you need to edit the sudoers file (I did this under the root user b/c you need permissions to change or even view this document). my sudoers file was located in /etc. There is a part that says ## Allows people in group wheel to run all commands and below that is a section that says ##Same thing without a password. You just need to remove the comment mark (#) form in front of the next line which says %wheel ALL+(ALL) NOPASSWD: ALL. Save this file. BE CAREFUL IN EDITING THIS FILE AS IT MAY CAUSE SERIOUS ISSUES. MAKE ONLY THE NECESSARY CHANGE OUTLINED ABOVE
Those two steps allowed me to successfully run my dedicated server. My system runs on CentOS 7.
HELPFUL TIP: From my discussion with #GaborAngeli I learned that within the 'corenlp' folder (/opt/corenlp if you followed the directions correctly) you can open the stderr.log file to help you in trouble shooting your server. This outputs what you would see if you were to run the server in the command window. If there is an error it is output here too, which is extremely helpful.
I'm running Cassandra 2.0.9 with Java 1.7.0 on Windows. I can run nodetool normally from the Windows command line, but I'm not able to run it from the Git Bash (directly from terminal or through a sh script) or Cygwin when running .sh files that call NodeTool (but otherwise can run it).
The exact error I get is:
Error: Could not find or load main class org.apache.cassandra.tools.NodeCmd
I haven't done any kind of extra configuration outside of the recommended changes Datastax recommends, and I haven't had any other issues with Cassandra. I don't think I have any environment screw ups (but who knows what could be wrong). Has anyone else run into this issue before? Thanks!
I'm new to Sonar, and i was trying to install Sonar 2.8 on my server (Linux 64 on HP-UX)
When i tried to launch it (sonar.sh start) i got the following message
[myHomeDirectory]/sonar/2.8/bin/linux-x86-64/./wrapper: Execute permission denied.
what drives me crazy is that i've putthe whole package on 777 permissions, so i really don't understand what's exactly happening.
Can anyone help with this please ?
Thanks in advance !
I hit a similar issue hence why I came to this post. I was attempting to install SonarQube's scanner in a Docker container but when I was running it, I was getting something along the lines of:
/root/sonar-scanner-2.6.1/bin//sonar-scanner: 103: exec: : Permission denied
I had given the whole /root/ folder all permissions so I was curious about the permission denied. In the end for me it wasn't anything to do with permissions. I simply needed to RTFM.
Sonar-scanner needs a JRE to run and my Docker container didn't have one installed. So if anyone else does the same thing as me, I hope this saves you a few minutes of head scratching.
Not really convinced in the way you are launching it. To get Sonar running I recommend running it on tomcat, providing you just want to use the default database that comes with Sonar. The steps would be:
Install Tomcat
Navigate to your /war directory within your sonar instance and run the command: $] ./build-war.sh.
When this finishes you should see a sonar.war file in the same directory.
Rename the war file ROOT.war instead of sonar.war: $] mv sonar.war ROOT.war
This ensures that sonar runs on tomcat's default port.
Move the war file into the tomcat webapps directory: $] mv ROOT.war /tomcathome/webapps
Navigate to the tomcat /bin folder and run the command $] ./catalina.sh start
Type your server hostname in your browser with a port :8080 at the end and you should see sonar running.
These steps will have sonar running on the default database, though. If you want a MySQL database i'd look at sonar tutorials on how to do that.
I finally came out with the conclusion that the binary file (wrapper) is simply not compiled to run under HP-UX
when launching a file command on wrapper under a Linux i get : <ELF-64 executable object file> which doesn't match the <ELF-64 executable object file - IA64> required by HP-UX running on a Itanium processor
Please check if you have java installed on the machine. Java should be installed on the machine before running sonar-runner.
Use this to check java : java -version