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
Related
I've installed Minikube to use along with Docker on Windows Server 2019. However, when I try to start with minikube start, it shows the follow errors:
Failed to start hyperv VM. Running "minikube delete" may fix it: Error loading existing host.
Hyper-V\Start-VM minikube
CategoryInfo : NotSpecified: (:) [Start-VM], VirtualizationException
FullyQualifiedErrorId : OperationFailed,Microsoft.HyperV.PowerShell.Commands.StartVM
minikube delete does not fix it.
When I start with minikube start --driver=hyper-v, it shows:
Exiting due to DRV_UNSUPPORTED_OS: The driver 'hyper-v' is not supported on windows/amd64
I already made an external switch on HyperV, as suggested in some videos, but it also did not work.
How can I fix it?
Have you enabled hyper-v?
On sv2019 you can practice k8s by enabling it on docker desktop, it's much easier and simpler.
I'm having a .Net Framework and .NetCore Containers and I would like to run them in Kubernetes. I have Docker Desktop for Windows installed and Kubernetes with it. How can I run these Windows Containers in Kubernetes?
This Documentation specifies how to create a Windows Node on Kubernetes, but it is very confusing. As I am on windows machine and I see linux based commands in there (And no mention of what OS you need to run all those). I am on Windows 10 Pro Machine. Is there a way to run these containers on Kubernetes?
When I try to create a Pod with Windows Containers, it fails with the following error message "Failed to pull image 'imagename'; rpc error: code = Unknown desc = image operating system 'windows' cannot be used on this platform"
Welcome on StackOverflow Srinath
To my knowledge you can't run Windows Containers on local version of Kubernetes at this moment. When you enable Kubernetes option in your Docker Desktop for Windows installation, the Kubernetes cluster is simply run inside Linux VM (with its own Docker Runtime for Linux containers only) on Hyper-V hypervisor.
The other solution for you is to use for instance a managed version of Kubernetes with Windows nodes from any of popular cloud providers. I think relatively easy to start is Azure (if you don't have an Azure subscription, create a free trial account, valid for 12 months).
I would suggest you to use an old way to run Kubernetes on Azure, a service called Azure Container Service aka ACS, for one reason, it has been verified by me to be working well with Windows Containers, especially for testing purposes (I could not achieve the same with its successor, called AKS):
Run following commands in Azure Cloud Shell, and your cluster will be ready to use in few minutes.
az group create --name azEvalRG --location eastus
az acs create -g azEvalRG -n k8s-based-win -d k8s-based-win --windows --agent-count 1 -u azureuser --admin-password 'YourSecretPwd1234$' -t kubernetes --location eastus
OS : OSX (mac)
Docker : 18.06.0-ce (edge)
Kubernetes : 1.10.3
I use Kubernetes for the first time.
I tried Google but could not find the manual for Kubernetes, which operates on the Mac.
Running kubectl version outputs The connection to the
server localhost:8080 was refused - did you specify the right host or port?
I came across this issue when changing from minikube to the Docker Desktop supplied Kubernetes. For me, the issue was caused by a stale .kube configuration. Posting my workaround here as this was the first result I found on google when looking to troubleshoot the issue.
1. Uninstall Minikube
I had originally installed with homebrew: brew uninstall minikube. If installed using other methods, go back to your install source for uninstall info.
After minikube was uninstalled, I restarted my machine which may or may not have been necessary but it is what I did.
2. Disable Kubernetes in docker Desktop
Open Docker Desktop preferences, click Kubernetes menu
De-select 'Enable Kubernetes' checkbox. Click Apply & Restart
3. Remove old kube and minikube config
Open terminal to your home directory.
Check for settings directories: ls -al and look for .kube and .minikube.
Remove .kube settings: rm -rf ./.kube.
Remove .minikube settings: rm -rf ./.minikube.
Confirm: ls -al and make sure the .kube and .minikube directories have been deleted.
If everything looks good, close terminal.
4. Re-enable Kubernetes in Docker Desktop
Open Docker Desktop preferences, click Kubernetes menu
Select 'Enable Kubernetes' checkbox. Click Apply & Restart
Open new terminal window and run kubectl version. You should see info for Client Version and Server Version if everything worked.
When you run kubectl, the .kube/config file is read in your home directory, thus telling which cluster you want to connect to using --context=<cluster-name>
What your error output is telling you is that it is unable to find a listening kubernetes API endpoint upon which to run those commands. It is looking for a cluster at localhost:8080
This endpoint will vary depending on how and where you installed Kubernetes. How are you running Kubernetes?
Are you using the bundled Docker/Kubernetes for Mac as mentioned here? - Docker for Mac Kubernetes or are you using a tool like MiniKube? - MiniKube
You might notice this error The connection to the server localhost:8080 was refused - did you specify the right host or port? because of your local minikube server might be down.
You have to start the existing minikube instance using - minikube start (I'm assuming your local minikube configured with docker driver earlier like: minikube start --driver=docker)
If not working above step then you have to delete the existing minikube then start it again:
minikube delete
minikube start --driver=docker
I had faced the same issue and my user id did not had the admin privileges, once the chown is done, Kubernetes started working.Hope this helps
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
I'm very new to kubernetes and trying to conceptualize it as well as set it up locally in order to try developing something on it.
There's a confound though that I am running on a windows machine.
Their "getting started" documentation in github says you have to run Linux to use kubernetes.
As docker runs on windows, I was wondering if it was possible to create a kubernetes instance as a container in windows docker and use it to manage the rest of the cluster in the same windows docker instance.
From reading the setup instructions, it seems like docker, kubernetes, and something called etcd all have to run "in parallel" on a single host operating system... But part of me thinks it might be possible to
Start docker, boot 'default' machine.
Create kubernetes container - configure to communicate with the existing docker 'default' machine
Use kubernetes to manage existing docker.
Pipe dream? Wrongheaded foolishness? I see there are some options around running it in a vagrant instance. Does that mean docker, etcd, & kubernetes together in a single VM (which in turn creates a cluster of virtual machines inside it?)
I feel like I need to draw a picture of what this all looks like in terms of physical hardware and "memory boxes" to really wrap my head around this.
With Windows, you need docker-machine and boot2docker VMs to run anything docker related.
There is no (not yet) "docker for Windows".
Note that issue 7428 mentioned "Can't run kubernetes within boot2docker".
So even when you follow instructions (from a default VM created with docker-machine), you might still get errors:
➜ workspace docker run --net=host -d -v /var/run/docker.sock:/var/run/docker.sock gcr.io/google_containers/hyperkube:v0.14.2 /hyperkube kubelet --api_servers=http://localhost:8080 --v=2 --address=0.0.0.0 --enable_server --hostname_override=127.0.0.1 --config=/etc/kubernetes/manifests
ee0b490f74f6bc9b70c1336115487b38d124bdcebf09b248cec91832e0e9af1d
➜ workspace docker logs -f ee0b490f74f6bc9b70c1336115487b38d124bdcebf09b248cec91832e0e9af1d
W0428 09:09:41.479862 1 server.go:249] Could not load kubernetes auth path: stat : no such file or directory. Continuing with defaults.
I0428 09:09:41.479989 1 server.go:168] Using root directory: /var/lib/kubelet
The alternative would be to try on a full-fledge Linux VM (like the latest Ubuntu), instead of a boot2docker-like VM (based on a TinyCore distro).
All k8s components can be raised up with hyperkube, which helps you bring up a containerized one.
If you're able to run docker on windows, it would probably work. I haven't tried it on windows personally.