start cassandra on google cloud on debian vm - google-cloud-platform

I have created a Debian VM and followed the steps to install cassandra on it. In the end, when I ran sudo apt update
sudo apt install cassandra
cassandra was installed and also automatically started.
However, cassandra wasn't added to PATH. I stopped cassandra using ps -aux|grep cassandra and kill pid. Now when I am trying to start it again using cassandra -f, I am getting several permission denied errors. eg
/usr/sbin/cassandra -f
OpenJDK 64-Bit Server VM warning: Cannot open file /var/log/cassandra/gc.log due to Permission denied
I can try using -R option and start Cassandra as root but it is not recommended. How can I start cassandra as normal user?

Related

Permission denied (publickey,gssapi-keyex,gssapi-with-mic). GCP

I launched a VM with CentOS 7. I configured a GUI and a xrdp with the next .sh file:
#!/bin/sh
#Install​ EPEL and nux Desktop repository rpms
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
#Install​ xfce desktop to get the graphical user interface
yum groupinstall -y "Xfce"
#command​ to change the reboot from CLI to GUI
ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
#create xfce clients
echo "xfce4-session" > ~/.Xclients
chmod a+x ~/.Xclients
#Install​ the xrdp
yum -y install xrdp tigervnc-server
#start​ the xrdp service
systemctl start xrdp.service
#enable​ the xrdp service
systemctl enable xrdp.service
Everything works fine, i can reach that VM via rdp from my computer, but when i'm in the vm and i try to acces to another vm's in the same project this error appear:
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
But it only happens when i try with the vm terminal, if i access from the google ssh client i can access to the other virtual machines without problem.
Another thing: I access to the VM rdp with root user, this could be the problem?
Any ideas?

Unable to start VM - Minikube

I am trying to start the minikube using the minikube start command and this is the error i am getting. Even installed the latest version of virtual box but still it gives me this error.
Can someone please tell me why this is happening?
Follow the advice of the error message. Did you try installing virtualbox-dkms and the linux headers?
$ sudo apt update
$ sudo apt install virtualbox-dkms linux-headers-generic
Follow the instructions in the docs, if you aren't already: https://kubernetes.io/docs/tasks/tools/install-minikube/
First of all I would recomend you to install newest version of Minikbue (currently it is 1.5.2) and Kubectl.
Second thing check if your machine is supporting virtualization. It can bo done via command egrep -q 'vmx|svm' /proc/cpuinfo && echo yes || echo no.
If it is no you have to:
If you are running within a VM, your hypervisor does not allow nested virtualization. You will need to use the None (bare-metal) driver.
If you are running on a physical machine, ensure that your BIOS has hardware virtualization enabled.
Minikube set VirtualBox as default driver, but you can use other. Here under Hypervisor Setup you might find that you can also use KVM or None as driver for Linux OS.
Solutions:
1. As Minikube output advised, try to install
- $ sudo apt-get install virtualbox-dkms linux-headers-generic
- run $ sudo modprobe vboxdrv
- reinstall VirtualBox
2. If there is no virtualization option on your Laptop you can use Minikube with --vm-driver=none flag.
$ sudo minikube start --vm-driver=none
If you would use this option, you might need to specify --cpus=X and --memory=XXXX as default is requesting less resources.
Another think is that none driver provides limited isolation and may reduce system security and reliability. More info can be found here.
$ minikube start
😄 minikube v1.5.2 on Ubuntu 18.04
🔥 Creating virtualbox VM (CPUs=2, Memory=2000MB, Disk=20000MB)
...
$ sudo minikube start --vm-driver=none
😄 minikube v1.5.2 on Ubuntu 18.04
🤹 Running on localhost (CPUs=2, Memory=7470MB, Disk=9749MB) ...
After successfull installation, don't forget to execute mentioned commands.
▪ sudo mv /home/<your_user>/.kube /home/<your_user>/.minikube $HOME
▪ sudo chown -R $USER $HOME/.kube $HOME/.minikube

sudo: stop: command not found

I'm running a shiny app on an amazon web services instance using shiny-server. I wanted to stop the shiny-server in order to set up password protection but when I was following a protocol that said to type sudo stop shiny-server I got this error sudo: stop: command not found.
I tried to look into it and tried to install sudo apt-get install upstart-sysv but now my error is stop: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused.
the aws instance is ubuntu 16.04, any help is appreciated
You should use sudo systemctl stop shiny-server
Most major Linux distros, including Ubuntu 15.04+, now use systemd for management and configuration.
Earlier versions of Ubuntu used upstart (where the command was sudo stop shiny-server).
For more, see shiny-server documentation.

RDP into Linux Instance AWS

I am new to AWS.
I created a Linux free tier instance and its up and running as i am able to access it via ssh putty as i am a windows user.
Now, I wanted to RDP the Linux Instance to see the interface but i am unable to do so. I am unable to find any option for that.
As per my understanding by reading online forms, it is not possible to RDP LinuxInstance on AWS.
If anyone can give there expert opinion if it is possible to RDP the Linux Instance? If not then Is there any way I can access the graphical interface for Linux Instance in AWS or I just have to work with command line interface from my local machine?
Amazon had a page that described how to do this with various linux versions but they took it down. Here are the steps for Linux 16.04. I just did this on a new ubuntu ec2 instance and it worked fine.
sudo apt update && sudo apt upgrade
sudo sed -i 's/^PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config
sudo /etc/init.d/ssh restart
sudo passwd ubuntu
sudo apt install xrdp xfce4 xfce4-goodies tightvncserver -y
echo xfce4-session> /home/ubuntu/.xsession
sudo cp /home/ubuntu/.xsession /etc/skel
sudo sed -i '0,/-1/s//ask-1/' /etc/xrdp/xrdp.ini
sudo service xrdp restart
RDP is a proprietary protocol developed by Microsoft, Linux servers do not come in with GUI, you need to SSH into Linux box and then install packages to enable desktop GUI functionality
Here is an article from AWS
https://aws.amazon.com/premiumsupport/knowledge-center/connect-ec2-centos-windows/
Note: Amazon Linux does not provide any desktop GUI functionality
try install GNOME packages i.e.,
$sudo yum -y groupinstall "Server with GUI"
$sudo systemctl enable xrdp; systemctl start xrdp
now try login from your windows machine using "windows remote desktop or any vnc client

Cassandra - ubuntu 16.04 :: Failed to start cassandra.service: Unit cassandra.service not found

I'm using ubuntu 16.04.I was trying to install Cassandra. But I'm getting some unknown issues. Could you please help me to solve it.
I followed the Apache-Cassandra Instructions to install Cassandra 3.6
I installed python 2.7 on this machine.
When I use the command to see the status.
sudo service cassandra status
I'm getting this error
Cassandra.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
I'm pretty sure, I was not doing as root.
I installed Cassandra in ubuntu 14.04 before one year without any problem. And worked well on different projects. Now getting these issues.
If I use the following command
sudo service cassandra start
I'm getting this error.
Failed to start cassandra.service: Unit cassandra.service not found.
Is there any problem with python and Cassandra version? Please help to solve these issues. Please suggest me the best way.
Try to reinstall Cassandra via next commands:
sudo apt-get purge cassandra
then
sudo apt-get update
sudo apt-get install cassandra
And use the latest version of Cassandra - 3.9, because the previous has a problem with cqlsh if you have Python 2.7.11+.