I'm using minikube/ kubectl on Ubuntu 16.04, trying to keep minikube cluster from running at startup. Is there a service I can disable for the same?
Try systemctl disable kubelet.service
I use the same setup on Ubuntu 18.04 and had the same issue.
After starting minikube without virtualization using sudo minikube start --vm-driver=none I can stop it with sudo minikube stop but after reboot the cluster is up again.
For me it was kubelet running on my machine that would start the cluster on reboot.
systemctl disable kubelet.service fixed the issue.
You can check if kubelet is enabled on your machine by running systemctl is-active kubelet
If you have installed minikube you could try to disable it in rc.conf
sudo update-rc.d minikube disable
or
sudo update-rc.d minikube remove
For further detail look at the man page for update-rc.d by typing the command man update-rc.d
Related
I have an ubuntu 18.04 running on a metal server. My docker working good but one day i can not build new docker image, my build script hang without showing any error (the script working good before).
I tried to restart docker engine by: sudo systemctl restart docker but docker service can not active, the command: sudo systemcle stop docker not working too.
Then i rebooted my server then docker go back.
What log files should i check to know what make my docker service hang?
You can view the docker service logs using:
sudo journalctl -fu docker.service
I'm unable to start docker service in ubuntu 18.04.
How do I install docker, and how do I start the start docker service?
When running systemctl start docker I got this error:
System has not been booted with systemd as init system (PID 1). Can't operate.
This is the error related to Ubuntu Linux service error, not by Docker
You Can Use
sudo service docker start/status/stop instead of systemctl
Instead, use: sudo service docker start
Docker doesn't require any explicit commands to start its service.
Kindly use steps shared in below like for Setting up docker in Debian i.e Linux machine
https://docs.docker.com/engine/install/debian/
you can get rid of using sudo for every command by doing this Manage Docker as a non-root user
I am new to docker and I exited the container's shell using exit and then used sudo docker stop ABC to kill the container. However, systemctl is-active docker still shows that docker is active. Is there any way to kill docker as well or would it remain active on my system forever?
I am using Ubuntu 18.
Docker daemon is supposed to keep running in background even if you exit and remove the container. This is because in case if you want to start a new container and docker daemon is not running then you won't be able to do it.
In case if you want to, then you can do sudo systemctl stop docker to stop the docker daemon completely. But after this if you do docker run -it someimage then you'll get an error - and to fix that you'll have to restart the docker daemon - sudo systemctl start docker
Hope that clarifies everything!
I've been going through the docker tutorial at https://docs.docker.com/v17.12/get-started/part3/#take-down-the-app-and-the-swarm and am up to the part where we're setting up our initial docker swarm.
I had this working at first, but then had to reconcile differences between a snap install docker and apt install docker on my system. Following this, when I try to run docker swarm init I'm told:
Error response from daemon: manager stopped: failed to listen on remote API address: listen tcp 0.0.0.0:2377: bind: address already in use
I have no other docker images or services running, so I'm fine killing or deleting anything, but I can't seem to figure out how to clear up this port so that I can initialize a new swarm.
Is there a way to either A) Kill the running swarm, or B) List the available swarms so that I can join it and then kill it from there as a swarm master?
Thanks!
Seems like you have installed docker from both snap/apt and you must uninstall one of the two (one is running in swarm mode and the docker client is connecting to the one that isn't).
To find the process running swarm use the following:
sudo ss --tcp --listening --processes --numeric | grep ":2377"
This will list the processes listening on the port 2377, on my case i find:
LISTEN 0 128 *:2377 *:* users:(("dockerd",pid=1229,fd=24))
Now using the pid you can find the process location:
sudo readlink -f /proc/1229/exe
If the process comes from a snap then you know that you must stop it and remove the snap so it only leaves the inastallation from apt-get (or viseversa if you want to keep the snap installation).
On my machine, I had to restart docker:
systemctl restart docker
And then it started to work again.
After removing the snap package with sudo snap remove docker I got the error docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
After trouble shooting, the solution was to uninstall, reinstall the apt docker packages and then restart the docker service with systemctl restart docker I confirmed it worked with journalctl -xe and sudo docker run hello-world
Hello I'm stuck with an issue with docker. After forcing my laptop to shut down, docker which was working fine before now spits out the following error
docker-compose build && docker-compose up
dev_db uses an image, skipping
Building dev_server
ERROR: Couldn't connect to Docker daemon - you might need to run docker-machine start default.
I get an error on running docker-machine start default (both with sudo and without), and as I try to create a new machine with docker-machine create default, I run into the following. docker itself is still installed as I can see the commands as I enter docker.
Running pre-create checks...
Error with pre-create check: "VBoxManage not found. Make sure VirtualBox > is installed and VBoxManage is in the path"
sudo service docker restart results in the following
Failed to restart docker.service: Unit docker.service not found.
and sudo docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
and systemctl status docker.service
Unit docker.service could not be found.
I also tried restarting my laptop and logging in and out again. I'm really puzzled by this and I'd appreciate any help!
Docker is installed but the daemon is not!
There are many reasons why the devil may not be running
Maybe is storage driver
Try this steps first
Disable Docker service: sudo systemctl stop docker.service
And then start Docker Daemon (overlay driver): sudo docker daemon -s overlay
Then edit /etc/default/docker file and add the option:
DOCKER_OPTS="-s overlay"