My nodes Digital Ocean are UNREACHABLE from docker cloud - docker

I have worked with docker cloud for a month. My nodes are created as described at https://docs.docker.com/docker-cloud/infrastructure/link-do/ for a Digital Ocean account. But I've decided to update the operating system of the node (I access through ssh):
$ sudo apt update && sudo apt upgrade
Then increase the swap memory as described here: https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04
I finally reboot the system:
$ Sudo reboot
But after this my system is already inaccessible from Docker cloud, status nodes is UNREACHABLE
When running
$ docker version
I get:
Docker version
Client:
Version: 1.11.2-cs5
API version: 1.23
Go version: go1.5.4
Git commit: d364ea1
Built: Tue Sep 13 15:26:43 2016
OS / Arch: linux / amd64
Can not connect to the Docker daemon. Is the docker daemon running on this host?
How can I recover these nodes? I appreciate your help.

Related

Issue: Cannot connect to the Docker daemon at unix:///home/tonton/.docker/desktop/docker.sock. Is the docker daemon running?

Hello Guys when I run docker version
My docker compose version is : docker compose version
Docker Compose version v2.2.2
Client: Docker Engine - Community
Version: 20.10.18
API version: 1.41
Go version: go1.18.6
Git commit: b40c2f6
Built: Thu Sep 8 23:11:43 2022
OS/Arch: linux/amd64
Context: desktop-linux
Experimental: true
Cannot connect to the Docker daemon at unix:///home/tonton/.docker/desktop/docker.sock. Is the docker daemon running?
I am using ubuntu 22.04 version.
In my case:
I had installed docker desktop by apt in ubuntu20.04 before, but removed it later .
And when I try to check sudo docker images today there is the same issue.
Restarting docker, chown socket and some other strange ways don't work.
Suddenly I discover that there is no such socket file in docker/desktop/, but in the default location /var/run. Then trying to restore docker default context by docker context use default makes everything come back to normal.
So I think that the remained docker-desktop context takes the responsibility.....

get Docker error each time I reboot my machine: "Cannot connect to the Docker daemon at unix:///var/run/docker.sock."

I'm running on ubuntu 18.04 with docker version:
>> docker version
Client: Docker Engine - Community
Version: 19.03.6
API version: 1.40
Go version: go1.12.16
Git commit: 369ce74a3c
Built: Thu Feb 13 01:27:48 2020
OS/Arch: linux/amd64
Experimental: false
each time I reboot my machine and try to use docker (e.g docker ps), I get an error:
>> docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
after I run:
>> service docker stop
>> service docker start
everything is back to normal..
any ideas how to solve it?
you should run
sudo systemctl enable docker
it will configure the system to start the service at reboot

Can't get docker start on Ubuntu?

This is what I have:
suyashdew#DESKTOP-DPRQ445:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial
suyashdew#DESKTOP-DPRQ445:~$ docker version
Client:
Version: 18.09.1
API version: 1.39
Go version: go1.10.6
Git commit: 4c52b90
Built: Wed Jan 9 19:35:23 2019
OS/Arch: linux/amd64
Experimental: false
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
I am new to *nix systems and I am trying to work on it. Please help!
Note: I have tried
sudo service docker start
* Starting Docker: docker
sudo service docker status
* Docker is not running
I have tried several ways mentioned in other threads but nothing worked. One of the ways broke the docker-ce and I had to remove it from the package and then re-install it. And it still can't fix it.
You probably can't connect because you're not the root user and you're not in the docker group. Make sure to follow the Linux post-install instructions, and don't forget to re-start your computer after adding yourself to the docker group.
You can verify whether this is the problem or not before trying all of that - does sudo docker version work?
might be a permission issue.
This are the postinstallation steps for linux:
docker post installation
you could try with sudo.
if you've the same issue with sudo, try
service docker status
and
service docker start

How do enable Experimental Docker daemon in Azure Pipelines on hosted Ubuntu agent

I want to be able to use the --squash switch when building docker images as this shaves several MB of the result image.
This requires experimental features enabled for docker.
Executing a docker --version confirms (as it should) experimental features to be off on hosted Azure Pipelines agents.
Server:
Engine:
Version: 18.03.1-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:15:30 2018
OS/Arch: linux/amd64
Experimental: false
Linux agents are running
Kernel Version: 4.15.0-1022-azure
Operating System: Ubuntu 16.04.4 LTS
OSType: linux
Architecture: x86_64
I've tried altering /etc/systemd/system/docker.service.d/docker.conf and /etc/docker/daemon.json to start with/include experimental flags, but didn't succeed in enabling it.
docker.conf
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// --experimental=tr
or
daemon.json
{
"experimental": true
}
But don't unsure if I can restart the daemon on a hosted agent.
Currently doing yaml builds invoking docker from bash, but didn't see anything around experimental in the web interface either.
If i spin up my own Ubuntu VM and host an agent on that, experimental works, but want to avoid cost and maintenance by using the hosted agents.
In the Ubuntu Image you can simply restart the docker service, after the daemon.json is updated. I use a script with two lines:
echo '{ "experimental": true }' | sudo tee /etc/docker/daemon.json
sudo service docker restart
Enabled it using the following script before the docker build task in my pipeline.
- script: |
echo '{ "experimental": true }' | sudo tee /etc/docker/daemon.json
sudo service docker restart
displayName: 'Enable docker experimental features for squashing '

FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host?

docker version
Client version: 1.4.1
Client API version: 1.16
Go version (client): go1.3.3
Git commit (client): 5bc2ff8/1.4.1
OS/Arch (client): linux/amd64
FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host?
please lte me know y it is giving this error .i m using rhel 6.4
As comments suggested probably Docker daemon is not running. AFAIK, docker is not supported for RHEL 6.4. Check Docker documentation:
Red Hat Enterprise Linux 6.5 Installation
You will need 64 bit RHEL 6.5 or later, with a RHEL 6 kernel version
2.6.32-431 or higher as this has specific kernel fixes to allow Docker to work.
Docker is available for RHEL6.5 on EPEL. Please note that this package
is part of Extra Packages for Enterprise Linux (EPEL), a community
effort to create and maintain additional packages for the RHEL
distribution. Kernel support
RHEL will only support Docker via the extras channel or EPEL package
when running on kernels shipped by the distribution. There are things
like namespace changes which will cause issues if one decides to step
outside that box and run non-distro kernel packages.
Warning: Please keep your system up to date using yum update and rebooting your system. Keeping your system updated ensures critical security vulnerabilities and severe bugs (such as those found in kernel 2.6.32) are fixed.
with a fresh installation: (notice the sudo at the beginning)
$ sudo service docker start
$ sudo docker run hello-world
worked for me

Resources