Gentoo Archives: gentoo-user

From: David Rosenbaum <rosenbaumd181@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Docker installation issues
Date: Fri, 16 Dec 2022 18:56:14
Message-Id: CAL+8heNfr3c8f1SpmkAV1QoQ42c04KjMbD1CHQSM-66o3RGq_g@mail.gmail.com
In Reply to: Re: [gentoo-user] Docker installation issues by Mansour Al Akeel
1 Thank u
2
3 Dave
4
5 On Sat, Dec 10, 2022, 3:51 PM Mansour Al Akeel <mansour.alakeel@×××××.com>
6 wrote:
7
8 > Andreas,
9 >
10 > Thank you very much. In fact I didn't go that deep yet, and not sure if I
11 > should. I just found that the url is not accessible even from a browser.
12 > Googling a bit, tells me there is no clear URL for docker-registry and
13 > possibly this one is outdated. I will continue looking around to confirm
14 > what the current default repo should be. If you have any suggestions,
15 > please let me know.
16 >
17 >
18 > localhost in ~
19 > ○ → curl -k -v https://registry-1.docker.io/v2/
20 > * Trying 34.228.211.243:443...
21 >
22 > * connect to 34.228.211.243 port 443 failed: Connection timed out
23 > * Failed to connect to registry-1.docker.io port 443 after 129401 ms:
24 > Couldn't connect to server
25 > * Closing connection 0
26 > curl: (28) Failed to connect to registry-1.docker.io port 443 after
27 > 129401 ms: Couldn't connect to server
28 >
29 >
30 >
31 >
32 >
33 > On Sat, Dec 10, 2022 at 1:32 PM Andreas Fink <finkandreas@×××.de> wrote:
34 >
35 >> On Sat, 10 Dec 2022 12:30:40 -0500
36 >> Mansour Al Akeel <mansour.alakeel@×××××.com> wrote:
37 >>
38 >> > I am using Openrc
39 >> >
40 >> > This was my initial /etc/conf.d/docker
41 >> > DOCKER_OPTS="--storage-driver overlay2 --data-root /srv/var/lib/docker"
42 >> >
43 >> > when I try:
44 >> >
45 >> > $ docker pull hello-world
46 >> >
47 >> > Error response from daemon: Get "https://registry-1.docker.io/v2/":
48 >> > net/http: request canceled while waiting for connection (Client.Timeout
49 >> > exceeded while awaiting headers)
50 >> >
51 >> > Trying to troubleshoot:
52 >> >
53 >> > localhost /home/mansour # tail -n 20 /var/log/docker.log
54 >> > time="2022-12-10T12:17:03.473550705-05:00" level=info msg="scheme
55 >> \"unix\"
56 >> > not registered, fallback to default scheme" module=grpc
57 >> > time="2022-12-10T12:17:03.473566413-05:00" level=info
58 >> > msg="ccResolverWrapper: sending update to cc:
59 >> > {[{unix:///run/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>}"
60 >> > module=grpc
61 >> > time="2022-12-10T12:17:03.473573787-05:00" level=info msg="ClientConn
62 >> > switching balancer to \"pick_first\"" module=grpc
63 >> > time="2022-12-10T12:17:03.474530993-05:00" level=info msg="parsed
64 >> scheme:
65 >> > \"unix\"" module=grpc
66 >> > time="2022-12-10T12:17:03.474545549-05:00" level=info msg="scheme
67 >> \"unix\"
68 >> > not registered, fallback to default scheme" module=grpc
69 >> > time="2022-12-10T12:17:03.474563752-05:00" level=info
70 >> > msg="ccResolverWrapper: sending update to cc:
71 >> > {[{unix:///run/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>}"
72 >> > module=grpc
73 >> > time="2022-12-10T12:17:03.474571186-05:00" level=info msg="ClientConn
74 >> > switching balancer to \"pick_first\"" module=grpc
75 >> > time="2022-12-10T12:17:03.478908716-05:00" level=warning msg="Your
76 >> kernel
77 >> > does not support cgroup blkio weight"
78 >> > time="2022-12-10T12:17:03.478927115-05:00" level=warning msg="Your
79 >> kernel
80 >> > does not support cgroup blkio weight_device"
81 >> > time="2022-12-10T12:17:03.479037897-05:00" level=info msg="Loading
82 >> > containers: start."
83 >> > time="2022-12-10T12:17:03.495743563-05:00" level=info msg="failed to
84 >> read
85 >> > ipv6 net.ipv6.conf.<bridge>.accept_ra" bridge=docker0
86 >> > syspath=/proc/sys/net/ipv6/conf/docker0/accept_ra
87 >> > time="2022-12-10T12:17:03.518761943-05:00" level=info msg="Default
88 >> bridge
89 >> > (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option
90 >> --bip
91 >> > can be used to set a preferred IP address"
92 >> > time="2022-12-10T12:17:03.518886881-05:00" level=info msg="failed to
93 >> read
94 >> > ipv6 net.ipv6.conf.<bridge>.accept_ra" bridge=docker0
95 >> > syspath=/proc/sys/net/ipv6/conf/docker0/accept_ra
96 >> > time="2022-12-10T12:17:03.534616741-05:00" level=info msg="Loading
97 >> > containers: done."
98 >> > time="2022-12-10T12:17:03.541080189-05:00" level=info msg="Docker
99 >> daemon"
100 >> > commit=a89b84221c graphdriver(s)=overlay2 version=20.10.17
101 >> > time="2022-12-10T12:17:03.541122352-05:00" level=info msg="Daemon has
102 >> > completed initialization"
103 >> > time="2022-12-10T12:17:03.549888103-05:00" level=info msg="API listen on
104 >> > /var/run/docker.sock"
105 >> > time="2022-12-10T12:17:27.025622231-05:00" level=warning msg="Error
106 >> getting
107 >> > v2 registry: Get \"https://registry-1.docker.io/v2/\": net/http:
108 >> request
109 >> > canceled while waiting for connection (Client.Timeout exceeded while
110 >> > awaiting headers)"
111 >> > time="2022-12-10T12:17:27.025667054-05:00" level=info msg="Attempting
112 >> next
113 >> > endpoint for pull after error: Get \"https://registry-1.docker.io/v2/\
114 >> ":
115 >> > net/http: request canceled while waiting for connection (Client.Timeout
116 >> > exceeded while awaiting headers)"
117 >> > time="2022-12-10T12:17:27.026851821-05:00" level=error msg="Handler for
118 >> > POST /v1.41/images/create returned error: Get \"
119 >> > https://registry-1.docker.io/v2/\": net/http: request canceled while
120 >> > waiting for connection (Client.Timeout exceeded while awaiting headers)"
121 >> >
122 >> > time="2022-12-10T12:15:42.036053086-05:00" level=info msg="loading
123 >> plugin
124 >> > \"io.containerd.internal.v1.tracing\"..." type=io.containerd.internal.v1
125 >> > time="2022-12-10T12:15:42.036068412-05:00" level=error msg="failed to
126 >> > initialize a tracing processor \"otlp\"" error="no OpenTelemetry
127 >> endpoint:
128 >> > skip plugin"
129 >> > time="2022-12-10T12:15:42.036100189-05:00" level=info msg="loading
130 >> plugin
131 >> > \"io.containerd.grpc.v1.cri\"..." type=io.containerd.grpc.v1
132 >> > time="2022-12-10T12:15:42.036390695-05:00" level=info msg="Start cri
133 >> plugin
134 >> > with config {PluginConfig:{ContainerdConfig:{Snapshotter:overlayfs
135 >> > DefaultRuntimeName:runc DefaultRuntime:{Type: Path: Engine:
136 >> > PodAnnotations:[] ContainerAnnotations:[] Root: Options:map[]
137 >> > PrivilegedWithoutHostDevices:false BaseRuntimeSpec:
138 >> NetworkPluginConfDir:
139 >> > NetworkPluginMaxConfNum:0} UntrustedWorkloadRuntime:{Type: Path: Engine:
140 >> > PodAnnotations:[] ContainerAnnotations:[] Root: Options:map[]
141 >> > PrivilegedWithoutHostDevices:false BaseRuntimeSpec:
142 >> NetworkPluginConfDir:
143 >> > NetworkPluginMaxConfNum:0} Runtimes:map[runc:{Type:io.containerd.runc.v2
144 >> > Path: Engine: PodAnnotations:[] ContainerAnnotations:[] Root:
145 >> > Options:map[BinaryName: CriuImagePath: CriuPath: CriuWorkPath: IoGid:0
146 >> > IoUid:0 NoNewKeyring:false NoPivotRoot:false Root: ShimCgroup:
147 >> > SystemdCgroup:false] PrivilegedWithoutHostDevices:false BaseRuntimeSpec:
148 >> > NetworkPluginConfDir: NetworkPluginMaxConfNum:0}] NoPivot:false
149 >> > DisableSnapshotAnnotations:true DiscardUnpackedLayers:false
150 >> > IgnoreRdtNotEnabledErrors:false}
151 >> > CniConfig:{NetworkPluginBinDir:/opt/cni/bin
152 >> > NetworkPluginConfDir:/etc/cni/net.d NetworkPluginMaxConfNum:1
153 >> > NetworkPluginConfTemplate: IPPreference:} Registry:{ConfigPath:
154 >> > Mirrors:map[] Configs:map[] Auths:map[] Headers:map[]}
155 >> > ImageDecryption:{KeyModel:node} DisableTCPService:true
156 >> > StreamServerAddress:127.0.0.1 StreamServerPort:0
157 >> StreamIdleTimeout:4h0m0s
158 >> > EnableSelinux:false SelinuxCategoryRange:1024 SandboxImage:
159 >> > k8s.gcr.io/pause:3.6 StatsCollectPeriod:10 SystemdCgroup:false
160 >> > EnableTLSStreaming:false X509KeyPairStreaming:{TLSCertFile: TLSKeyFile:}
161 >> > MaxContainerLogLineSize:16384 DisableCgroup:false DisableApparmor:false
162 >> > RestrictOOMScoreAdj:false MaxConcurrentDownloads:3
163 >> DisableProcMount:false
164 >> > UnsetSeccompProfile: TolerateMissingHugetlbController:true
165 >> > DisableHugetlbController:true DeviceOwnershipFromSecurityContext:false
166 >> > IgnoreImageDefinedVolumes:false NetNSMountsUnderStateDir:false
167 >> > EnableUnprivilegedPorts:false EnableUnprivilegedICMP:false}
168 >> > ContainerdRootDir:/var/lib/containerd
169 >> > ContainerdEndpoint:/run/containerd/containerd.sock
170 >> > RootDir:/var/lib/containerd/io.containerd.grpc.v1.cri
171 >> > StateDir:/run/containerd/io.containerd.grpc.v1.cri}"
172 >> > time="2022-12-10T12:15:42.036530498-05:00" level=info msg="Connect
173 >> > containerd service"
174 >> > time="2022-12-10T12:15:42.036627681-05:00" level=info msg="Get image
175 >> > filesystem path
176 >> > \"/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs\""
177 >> > time="2022-12-10T12:15:42.036896077-05:00" level=error msg="failed to
178 >> load
179 >> > cni during init, please check CRI plugin status before setting up
180 >> network
181 >> > for pods" error="cni config load failed: no network config found in
182 >> > /etc/cni/net.d: cni plugin not initialized: failed to load cni config"
183 >> > time="2022-12-10T12:15:42.036986623-05:00" level=info msg="Start
184 >> > subscribing containerd event"
185 >> > time="2022-12-10T12:15:42.037028034-05:00" level=info msg="Start
186 >> recovering
187 >> > state"
188 >> > time="2022-12-10T12:15:42.037035874-05:00" level=info msg=serving...
189 >> > address=/run/containerd/containerd.sock.ttrpc
190 >> > time="2022-12-10T12:15:42.037068181-05:00" level=info msg=serving...
191 >> > address=/run/containerd/containerd.sock
192 >> > time="2022-12-10T12:15:42.037085346-05:00" level=info msg="containerd
193 >> > successfully booted in 0.015889s"
194 >> > time="2022-12-10T12:15:42.037072303-05:00" level=info msg="Start event
195 >> > monitor"
196 >> > time="2022-12-10T12:15:42.037107987-05:00" level=info msg="Start
197 >> snapshots
198 >> > syncer"
199 >> > time="2022-12-10T12:15:42.037119126-05:00" level=info msg="Start cni
200 >> > network conf syncer for default"
201 >> > time="2022-12-10T12:15:42.037127266-05:00" level=info msg="Start
202 >> streaming
203 >> > server"
204 >> >
205 >> >
206 >> > Looking at resolv.conf
207 >> >
208 >> > localhost /home/mansour # cat /etc/resolv.conf
209 >> > # Generated by dhcpcd from wlp3s0.dhcp
210 >> > # /etc/resolv.conf.head can replace this line
211 >> > domain Home
212 >> > nameserver 192.168.1.1
213 >> > # /etc/resolv.conf.tail can replace this line
214 >> >
215 >> > So, I added the following to my /etc/dhcpcd.conf
216 >> > static domain_name_servers=8.8.8.8 8.8.4.4 192.168.1.1
217 >> >
218 >> > And restarted dhcpcd:
219 >> >
220 >> > localhost /home/mansour # cat /etc/resolv.conf
221 >> > # Generated by dhcpcd from wlp3s0.dhcp
222 >> > # /etc/resolv.conf.head can replace this line
223 >> > domain Home
224 >> > nameserver 8.8.8.8
225 >> > nameserver 8.8.4.4
226 >> > nameserver 192.168.1.1
227 >> > # /etc/resolv.conf.tail can replace this line
228 >> >
229 >> >
230 >> > docker.log still shows the same error:
231 >> > time="2022-12-10T12:28:16.519126445-05:00" level=warning msg="Error
232 >> getting
233 >> > v2 registry: Get \"https://registry-1.docker.io/v2/\": net/http:
234 >> request
235 >> > canceled while waiting for connection (Client.Timeout exceeded while
236 >> > awaiting headers)"
237 >> > time="2022-12-10T12:28:16.519173944-05:00" level=info msg="Attempting
238 >> next
239 >> > endpoint for pull after error: Get \"https://registry-1.docker.io/v2/\
240 >> ":
241 >> > net/http: request canceled while waiting for connection (Client.Timeout
242 >> > exceeded while awaiting headers)"
243 >> > time="2022-12-10T12:28:16.520489790-05:00" level=error msg="Handler for
244 >> > POST /v1.41/images/create returned error: Get \"
245 >> > https://registry-1.docker.io/v2/\": net/http: request canceled while
246 >> > waiting for connection (Client.Timeout exceeded while awaiting headers)"
247 >> >
248 >> > I am not able to login with "docker login"
249 >> >
250 >> > Where do I look further for additional troubleshooting hints? Google
251 >> didn't
252 >> > help a lot.
253 >> >
254 >> > Thank you.
255 >>
256 >>
257 >> Hello,
258 >> my first step would be checking if there is some inherent network
259 >> problem reaching registry-1.docker.io/v2, e.g. via
260 >> curl -v https://registry-1.docker.io/v2/
261 >>
262 >> If that runs successfully, you could try if there is an MTU problem. I
263 >> remember that I had to set MTU to 1450 in some virtualized environment,
264 >> otherwise docker would not run correctly, i.e. I had in
265 >> /etc/conf.d/docer
266 >> DOCKER_OPTS="--mtu=1450"
267 >>
268 >> Hope that gives you an idea what to look for.
269 >>
270 >> If both does not help, there is wireshark, to watch your network, very
271 >> low-level, but might give some hints.
272 >>
273 >> Cheers
274 >> Andreas
275 >>
276 >>