LFD254 Lab 3.1-3.10 on Ubuntu 20.04
Hi Dears Masters!
For this Lab 3.1-3.10 from the LFD254, I am trying to install the Docker Architecture using docker-machine to create the drivers from DigitalOcean account to configure the dockerhost.
Unfortunately, always when I am running the command docker-machine came out saying that the dockerhost already existed; despite I have deleted each time before I regenerated new token still not working even the token is new, but the name have to be the same: dockerhost.
So, I am thinking that Cloud's DigitalOcean isn't respond proper due some mistaken I did on started the Lab whenI I generate new Token to export it to be using by docker-machine to create the dockerhost of the Docker Architecture. I think when I deleted on client side, the Ubuntu server side, registry, ... has to be the deleted too and update the information on my account. So, look like that your server remote side is not helping me.
I appreciate your help!
Many Thanks!
Please see the ScreenShot:
Comments
-
Hello Same problem... do you get an update ?
-1 -
Hi @There!
LFD254
Yes, I deleted, destroyed and i did new setup updating everything on my system, which is Ubuntu 20.04, but this step: Create a Docker Host on DigitalOcean using docker-machine, where dockerhost is our Docker Host name, such docker host is controlling by DigitalOcean server, which I believe has to be delete, destroy, or refresh and update too, so I can create a new image token and drivers to be used with the dockerhost, which will work.
If you can, please take a look on Lab LFD254 - 3.31-3.10, so you have a better idea on this issue.
These are the first 3 commands:
1) $ curl -L
https://github.com/docker/machine/releases/download/v0.10.0/docker-machine-uname-s
-uname -m
>/tmp/docker-machine &&
chmod +x /tmp/docker-machine &&
sudo cp /tmp/docker-machine /usr/local/bin/docker-machine2) $ export DO_TOKEN='14c91a0f332370bc89d9.......'
3) docker-machine create --driver digitalocean --digitalocean-access-token=$DO_TOKEN dockerhost
If it works the have to be like this:
Creating CA: /root/.docker/machine/certs/ca.pem
Creating client certificate: /root/.docker/machine/certs/cert.pem
Running pre-create checks...
Creating machine...
(dockerhost) Creating SSH key...
(dockerhost) Creating Digital Ocean droplet...
(dockerhost) Waiting for IP address to be assigned to the Droplet...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...Waiting for SSH to be available...
Detecting the provisioner...Provisioning with ubuntu(systemd)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...As the daemon, server side did not install, when I ran the docker version, it comes like that:
docker version
Client: Docker Engine - Community
Version: 20.10.7
API version: 1.41
Go version: go1.13.15
Git commit: f0df350
Built: Wed Jun 2 11:56:38 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http:///var/run/docker.sock/v1.24/version: dial unix /var/run/docker.sock: connect: permission denied.So, when I ran the docker-machine ls, as it is not getting installed , it comes like that:
docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
7611bfb91b1db6a956806a8c28ed827e8216a12ff957edd3633daa53db513a6a - digitalocean Error Unknown dropletID is invalid because cannot be less than 1
dockerhost - digitalocean Error Unknown dropletID is invalid because cannot be less than 1
helio-nyc1 - digitalocean Error Unknown dropletID is invalid because cannot be less than 1Regards!
0 -
LFD254 LAB 3.1-3.10
Hi There!
The problems above I fixed by using docker-machine commands. Unfortunately, now I have this one:docker-machine create --driver digitalocean --digitalocean-access-token=$DO_TOKEN dockerhost
Running pre-create checks...
Creating machine...
(dockerhost) Creating SSH key...
(dockerhost) Creating Digital Ocean droplet...
Error creating machine: Error in driver during machine creation: POST https://api.digitalocean.com/v2/droplets: 422 You specified an invalid image for Droplet creation.I will appreciate your mastering on that!
Helio0 -
Hi
I got the same error as Helio,
docker-machine create --driver digitalocean --digitalocean-access-token=$DO_TOKEN dockerhost
Creating CA: /root/.docker/machine/certs/ca.pem
Creating client certificate: /root/.docker/machine/certs/cert.pem
Running pre-create checks...
Creating machine...
(dockerhost) Creating SSH key...
(dockerhost) Creating Digital Ocean droplet...
Error creating machine: Error in driver during machine creation: POST https://api.digitalocean.com/v2/droplets: 422 You specified an invalid image for Droplet creation.I will appreciate any help
Guy0 -
LFD254 Lab 3.1-3.10
Hi @Instructor Neependra Khare!
I have completed many Linux Courses on this Foundation with other Instructors successfully basically without problems.
Unfortunately, I got many problems to set up and run your Course LFD254. Which I have to run the docker-machine to create the drivers to setup the dockerhost with docker-machine tool to do these Labs.I got other problems before, but I fixed them. This one I believe do not depend only on my system, but on your Cloud system.
So, this is the error:
Then, when I ran docker-machine create --driver ...
...
....
...
...
...
(dockerhost) Creating Digital Ocean droplet...
Error creating machine: Error in driver during machine creation: POST https://api.digitalocean.com/v2/droplets: 422 You specified an invalid image for Droplet creation.Respectful,
Helio.0 -
Hi @Helio,
The driver is attempting to provision a digital ocean droplet with an invalid image - which may no longer be available (based on the error message). You may customize your droplet's image by adding the
--digitalocean-image ubuntu-18-04-x64
flag orubuntu-20-04-x64
to thedocker-machine create ...
command.Another option would be to edit the
/etc/systemd/system/docker.service.d/10-machine.conf
file and add the desired image value.Regards,
-Chris1 -
Thanks!
0 -
Hi @There
Error 422 has been resolved but I get this error now:
root@ubuntu-s-1vcpu-1gb-intel-nyc3-01:~# docker-machine create --driver digitalocean --digitalocean-image ubuntu-20-04-x64 --digitalocean-access-token=$DO_TOKEN dockerhost
Creating CA: /root/.docker/machine/certs/ca.pem
Creating client certificate: /root/.docker/machine/certs/cert.pem
Running pre-create checks...
Creating machine...
(dockerhost) Creating SSH key...
(dockerhost) Creating Digital Ocean droplet...
(dockerhost) Waiting for IP address to be assigned to the Droplet...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with ubuntu(systemd)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Error creating machine: Error running provisioning: Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceededI will appreciate any help!
Guy0 -
Hi @guyab,
Can you manually validate that the Docker Daemon is running and listening on the newly created Docker Host?
Regards,
-Chris0 -
The following steps were performed:
- curl -fsSL https://get.docker.com |sh
- curl -L https://github.com/docker/machine/releases/download/v0.16.0/docker-machine-$(uname -s)-$(uname -m) >/tmp/docker-machine
- sudo mv /tmp/docker-machine /usr/local/bin/docker-machine
- chmod +x /usr/local/bin/docker-machine
- export DO_TOKEN=f877526d63c6b8836af37a6066f494a783b64681ae5517b9551284b985678a7a
- docker-machine create --driver digitalocean --digitalocean-image ubuntu-20-04-x64 --digitalocean-access-token=$DO_TOKEN dockerhost
Error creating machine: Error running provisioning: Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceeded
- Manually validate that the Docker Daemon
root@ubuntu-s-1vcpu-1gb-nyc3-01:~# dockerd
INFO[2021-07-20T20:50:45.904317399Z] Starting up
failed to start daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid
root@ubuntu-s-1vcpu-1gb-nyc3-01:~# rm -rf /var/run/docker.pid
root@ubuntu-s-1vcpu-1gb-nyc3-01:~# dockerd
INFO[2021-07-20T20:55:03.083220408Z] Starting up
INFO[2021-07-20T20:55:03.086518815Z] detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf
INFO[2021-07-20T20:55:03.087825207Z] parsed scheme: "unix" module=grpc
INFO[2021-07-20T20:55:03.088130600Z] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2021-07-20T20:55:03.088368669Z] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 }] } module=grpc
INFO[2021-07-20T20:55:03.088534259Z] ClientConn switching balancer to "pick_first" module=grpc
INFO[2021-07-20T20:55:03.093751712Z] parsed scheme: "unix" module=grpc
INFO[2021-07-20T20:55:03.093989510Z] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2021-07-20T20:55:03.094107297Z] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 }] } module=grpc
INFO[2021-07-20T20:55:03.094210074Z] ClientConn switching balancer to "pick_first" module=grpc
INFO[2021-07-20T20:55:03.129850933Z] [graphdriver] using prior storage driver: overlay2
failed to start daemon: error while opening volume store metadata database: timeout
root@ubuntu-s-1vcpu-1gb-nyc3-01:~#root@ubuntu-s-1vcpu-1gb-nyc3-01:~# systemctl stop docker
root@ubuntu-s-1vcpu-1gb-nyc3-01:~# dockerd
INFO[2021-07-20T21:02:41.569179294Z] Starting up
INFO[2021-07-20T21:02:41.571445041Z] detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf
INFO[2021-07-20T21:02:41.572811363Z] parsed scheme: "unix" module=grpc
INFO[2021-07-20T21:02:41.573031350Z] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2021-07-20T21:02:41.573202859Z] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 }] } module=grpc
INFO[2021-07-20T21:02:41.573337989Z] ClientConn switching balancer to "pick_first" module=grpc
INFO[2021-07-20T21:02:41.577281803Z] parsed scheme: "unix" module=grpc
INFO[2021-07-20T21:02:41.577435455Z] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2021-07-20T21:02:41.577533666Z] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 }] } module=grpc
INFO[2021-07-20T21:02:41.577612032Z] ClientConn switching balancer to "pick_first" module=grpc
INFO[2021-07-20T21:02:41.604048369Z] [graphdriver] using prior storage driver: overlay2
WARN[2021-07-20T21:02:41.607183594Z] Your kernel does not support swap memory limit
WARN[2021-07-20T21:02:41.607462328Z] Your kernel does not support CPU realtime scheduler
WARN[2021-07-20T21:02:41.607610083Z] Your kernel does not support cgroup blkio weight
WARN[2021-07-20T21:02:41.607722256Z] Your kernel does not support cgroup blkio weight_device
INFO[2021-07-20T21:02:41.608253450Z] Loading containers: start.
INFO[2021-07-20T21:02:41.739161188Z] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address
INFO[2021-07-20T21:02:41.776841735Z] Loading containers: done.
INFO[2021-07-20T21:02:41.803702061Z] Docker daemon commit=b0f5bc3 graphdriver(s)=overlay2 version=20.10.7
INFO[2021-07-20T21:02:41.804092294Z] Daemon has completed initialization
INFO[2021-07-20T21:02:41.836954811Z] API listen on /var/run/docker.sockAm I missing something? steps 1-6 according LFD254-Labs.pdf
(my OS is Ubuntu 20.04.2)Guy
0 -
0
-
Hi @guyab,
After receiving the same error, I was still able to validate that docker was running on the dockerhost VM, and I followed thru the steps to run the
alpine
container on the dockerhost VM and it all worked as expected.Run the
eval
command as instructed and try to listls
your machines, then run a few containers on yourdockerhost
.Regards,
-Chris0 -
In Fine!
Great News!
Look That:docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
dockerhost * digitalocean Running tcp://45.55.40.76:2376 v20.10.7 .Thanks To Be Nice!
Helio0 -
root@ubuntu-s-1vcpu-1gb-nyc3-01:~# eval $(docker-machine env dockerhost)
root@ubuntu-s-1vcpu-1gb-nyc3-01:~# docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
dockerhost * digitalocean Running tcp://165.227.218.147:2376 v20.10.7Thank you!!!
Guy0
Categories
- All Categories
- 167 LFX Mentorship
- 219 LFX Mentorship: Linux Kernel
- 795 Linux Foundation IT Professional Programs
- 355 Cloud Engineer IT Professional Program
- 179 Advanced Cloud Engineer IT Professional Program
- 82 DevOps Engineer IT Professional Program
- 127 Cloud Native Developer IT Professional Program
- 112 Express Training Courses
- 112 Express Courses - Discussion Forum
- 6.2K Training Courses
- 48 LFC110 Class Forum - Discontinued
- 17 LFC131 Class Forum
- 35 LFD102 Class Forum
- 227 LFD103 Class Forum
- 14 LFD110 Class Forum
- 39 LFD121 Class Forum
- 15 LFD133 Class Forum
- 7 LFD134 Class Forum
- 17 LFD137 Class Forum
- 63 LFD201 Class Forum
- 3 LFD210 Class Forum
- 5 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 1 LFD233 Class Forum
- 2 LFD237 Class Forum
- 23 LFD254 Class Forum
- 697 LFD259 Class Forum
- 109 LFD272 Class Forum
- 3 LFD272-JP クラス フォーラム
- 10 LFD273 Class Forum
- 152 LFS101 Class Forum
- 1 LFS111 Class Forum
- 1 LFS112 Class Forum
- 1 LFS116 Class Forum
- 1 LFS118 Class Forum
- LFS120 Class Forum
- 7 LFS142 Class Forum
- 7 LFS144 Class Forum
- 3 LFS145 Class Forum
- 1 LFS146 Class Forum
- 3 LFS147 Class Forum
- 1 LFS148 Class Forum
- 15 LFS151 Class Forum
- 1 LFS157 Class Forum
- 33 LFS158 Class Forum
- 8 LFS162 Class Forum
- 1 LFS166 Class Forum
- 1 LFS167 Class Forum
- 3 LFS170 Class Forum
- 2 LFS171 Class Forum
- 1 LFS178 Class Forum
- 1 LFS180 Class Forum
- 1 LFS182 Class Forum
- 1 LFS183 Class Forum
- 29 LFS200 Class Forum
- 736 LFS201 Class Forum - Discontinued
- 2 LFS201-JP クラス フォーラム
- 14 LFS203 Class Forum
- 102 LFS207 Class Forum
- 1 LFS207-DE-Klassenforum
- 1 LFS207-JP クラス フォーラム
- 301 LFS211 Class Forum
- 55 LFS216 Class Forum
- 48 LFS241 Class Forum
- 42 LFS242 Class Forum
- 37 LFS243 Class Forum
- 15 LFS244 Class Forum
- LFS245 Class Forum
- LFS246 Class Forum
- 50 LFS250 Class Forum
- 1 LFS250-JP クラス フォーラム
- LFS251 Class Forum
- 154 LFS253 Class Forum
- LFS254 Class Forum
- LFS255 Class Forum
- 5 LFS256 Class Forum
- 1 LFS257 Class Forum
- 1.3K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 111 LFS260 Class Forum
- 159 LFS261 Class Forum
- 41 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 20 LFS267 Class Forum
- 24 LFS268 Class Forum
- 29 LFS269 Class Forum
- 1 LFS270 Class Forum
- 199 LFS272 Class Forum
- 1 LFS272-JP クラス フォーラム
- LFS274 Class Forum
- 3 LFS281 Class Forum
- 9 LFW111 Class Forum
- 260 LFW211 Class Forum
- 182 LFW212 Class Forum
- 13 SKF100 Class Forum
- 1 SKF200 Class Forum
- 1 SKF201 Class Forum
- 782 Hardware
- 198 Drivers
- 68 I/O Devices
- 37 Monitors
- 96 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 83 Storage
- 743 Linux Distributions
- 80 Debian
- 67 Fedora
- 15 Linux Mint
- 13 Mageia
- 23 openSUSE
- 143 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 348 Ubuntu
- 461 Linux System Administration
- 39 Cloud Computing
- 70 Command Line/Scripting
- Github systems admin projects
- 90 Linux Security
- 77 Network Management
- 101 System Management
- 46 Web Management
- 64 Mobile Computing
- 17 Android
- 34 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 371 Off Topic
- 114 Introductions
- 174 Small Talk
- 19 Study Material
- 507 Programming and Development
- 285 Kernel Development
- 204 Software Development
- 1.8K Software
- 211 Applications
- 180 Command Line
- 3 Compiling/Installing
- 405 Games
- 309 Installation
- 97 All In Program
- 97 All In Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)