将设为首页浏览此站
开启辅助访问 天气与日历 收藏本站联系我们切换到窄版

易陆发现论坛

 找回密码
 开始注册
查看: 48|回复: 1
收起左侧

记一次docker启动失败问题总结Cannot connect to the Docker daemon at unix:/var/run/docker.soc

[复制链接]
发表于 2022-6-22 11:51:13 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?开始注册

x
Jun 22 11:15:38 openstack dockerd: time="2022-06-22T11:15:38.688767002+08:00" level=info msg="Starting up"
) U- ~+ l' Y/ u  P( {Jun 22 11:15:38 openstack dockerd: time="2022-06-22T11:15:38.691966214+08:00" level=info msg="parsed scheme: \"unix\"" module=grpc/ S+ ^+ {3 X6 @$ [7 Z
Jun 22 11:15:38 openstack dockerd: time="2022-06-22T11:15:38.692007875+08:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc9 @6 ^, d- U7 X  [8 K2 A5 |
Jun 22 11:15:38 openstack dockerd: time="2022-06-22T11:15:38.692053506+08:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc9 n6 ^) {( S( x! q
Jun 22 11:15:38 openstack dockerd: time="2022-06-22T11:15:38.692095723+08:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc6 O5 \8 t( o# V- T7 L
Jun 22 11:15:38 openstack dockerd: time="2022-06-22T11:15:38.694155125+08:00" level=info msg="parsed scheme: \"unix\"" module=grpc
& y. ]/ T/ H/ aJun 22 11:15:38 openstack dockerd: time="2022-06-22T11:15:38.694200596+08:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
& _1 V+ _3 k0 V) E) S% N) P% t0 GJun 22 11:15:38 openstack dockerd: time="2022-06-22T11:15:38.694221675+08:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc
. s; j3 J. L! X( Q, ]- J5 wJun 22 11:15:38 openstack dockerd: time="2022-06-22T11:15:38.694237395+08:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
: _( ]" q; ~. @5 M4 l% F) Y: b4 FJun 22 11:15:38 openstack dockerd: time="2022-06-22T11:15:38.782587671+08:00" level=info msg="[graphdriver] using prior storage driver: overlay2"
) }$ z( y9 b* [( T8 F* xJun 22 11:15:38 openstack dockerd: time="2022-06-22T11:15:38.923229051+08:00" level=info msg="Loading containers: start."6 V, L8 G5 a) ?5 A" c
Jun 22 11:15:41 openstack dockerd: time="2022-06-22T11:15:41.746420451+08:00" level=error msg="ecd807d55b2549900134475d67ba42c6f692c0d2db9058c5acc43c5d1a3651fb cleanup: failed to delete container from containerd: no such container"
( G  [1 G6 l) T7 A
3 Y, f, Y) J7 M+ p0 Q* l9 x0 T1 ^# y+ o' B3 M/ H. E. S$ B
1、Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
答:
docker这种报错一般情况都是docker未启动对于这种情况只用重启docker就行了:
service docker restart  
还有一种情况则是docker配置文件出错按照提示查看报错,并找到相应位置进行更改:
systemctl status docker.service   或    journalctl -xn

1 u, m" v: `5 b. R; B" _' X$ @# }; e- f
" V  v: F& V* N+ y" n

- q3 ^( p  ]6 }, n
 楼主| 发表于 2022-6-22 12:44:35 | 显示全部楼层
解决过程:) |1 X9 t( I: m' I
编辑文件:
2 o; H( u/ J7 i[root@openstack ~]# vim /etc/docker/daemon.json
( G- m! ?- l7 G
! [& y: r% }+ F5 Y+ V{3 d/ Q: L/ ^1 c1 x
     "bip": "150.17.10.1/16"
+ I9 z& I" V! m8 r. U: z }
1 I0 G7 O5 i6 _7 h  t2 ~" \+ @1 I" ^5 U# P
[root@openstack ~]# vim /etc/systemd/system/docker.service.d/kolla.conf $ l; p9 Q5 c1 A

; ]* ~- `- o- V2 p[Service]
0 k) e% h! x( t0 p) V, zMountFlags=shared& w4 P$ r  Z  Q
ExecStart=. H0 D$ g* v" m* D
ExecStart=/usr/bin/dockerd --insecure-registry xx.xx.xx.xx:4000 --log-opt max-file=5 --log-opt max-size=50m3 t4 k( ~* B1 L& c9 E# h) v+ n

1 }+ i% O! n# y0 R系统重新reload* H9 y4 ?& }0 S! g* K4 O  c
systemctl daemon-reload% l: X) |, |  z  Z  f5 w8 F3 E
重启docker服务:
* |4 l0 g9 ]  l  ^ systemctl restart docker.service
+ m% O. G6 M7 r' M7 e$ c. R检查:/ K- x0 A1 q0 ]/ D
[root@openstack ~]# docker ps  & D: V" X/ v" y, B  O; S
CONTAINER ID   IMAGE                                                  COMMAND                  CREATED             STATUS                         PORTS     NAMES
9 S! w% s, T3 K, U* H9 T7 ]( Q, Q- U5 ^: x" K7 x
8 b0 H7 O  r/ R- N8 s
[root@openstack ~]#  docker info 2 u. N) Y5 M1 n* y, N' T
Client:2 e+ a7 ]. q6 G* }
Context:    default0 W/ S/ a, R1 S
Debug Mode: false1 q0 Z# `! J- C4 q' A
Plugins:
+ O; {& U0 s2 [  app: Docker App (Docker Inc., v0.9.1-beta3)
; q3 M: X/ ]9 r5 P$ b  buildx: Docker Buildx (Docker Inc., v0.8.2-docker)
8 X3 o# h5 W- Y9 J" \/ }9 w% q! v  scan: Docker Scan (Docker Inc., v0.17.0)
+ q- z$ O- H) \% T0 a2 u9 H6 i5 Q
+ c' u; A" b5 o* l! P, r0 AServer:
9 V1 p: R3 q3 }2 ` Containers: 31
9 T* K1 [& b& V+ t  Running: 30; H- R# m. X4 w  N2 E4 H
  Paused: 03 q2 ?. ?) Z0 x5 ?2 ~( C1 ]
  Stopped: 1# y' j" b% w( O+ h5 c4 D! O$ t% T
Images: 31
2 x: w% ^- O6 [5 \ Server Version: 20.10.17/ D! F' Y0 F& R" m) |2 O' D! b7 c
Storage Driver: overlay21 y* F  ?% `( z/ D* w0 L
  Backing Filesystem: xfs& i. t8 x8 S5 n# a4 J
  Supports d_type: true
/ ]% }0 {0 _3 J  u  Native Overlay Diff: true
8 ^3 I, D9 m  l0 i! `+ j& ]  userxattr: false
: w+ I% ]# ~/ y Logging Driver: json-file5 N& j- l% `1 b
Cgroup Driver: cgroupfs+ n' ~' G! t: A+ J) r' m
Cgroup Version: 1
$ ]5 b+ L. w9 ^+ \ Plugins:
. i8 w( h+ ~9 l" a. H  Volume: local
" c# K0 ?- a0 N( }  Network: bridge host ipvlan macvlan null overlay: c3 R! I& I5 B8 y$ T1 w
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog: W* n- ~4 f/ H6 o9 c0 K
Swarm: inactive9 h9 h" a. i5 o; i% n* P$ _
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc3 a: @3 p. e1 q( k9 @. W5 i% E
Default Runtime: runc
: S0 K3 s$ I' l; {, w  E Init Binary: docker-init. d) r( ]# K; G
containerd version: 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1. K- k! E2 Z. {5 a% R
runc version: v1.1.2-0-ga916309- s8 L% q& n; V: a# D
init version: de40ad0
5 t  T, V2 H% s: O9 J' ^ Security Options:+ k; s0 n1 d. [8 C; G
  seccomp3 J! ?  M+ l# n
   Profile: default
& F. E2 K3 t9 V% i! o8 v- ~ Kernel Version: 3.10.0-1160.el7.x86_64
- w8 d  q* t, s- Q2 X; L Operating System: CentOS Linux 7 (Core)
1 x& O" o) L& r* V OSType: linux. ~2 N7 t4 k4 t7 J/ Z' C
Architecture: x86_64
- d6 X: Y) Y) H: S# Z CPUs: 165 ^1 q& Z: c0 B# ~
Total Memory: 15.51GiB
! z$ y# g  }  u) z1 a; O( \0 b Name: openstack.novalocal% S4 `3 Z' M* z, G0 x/ N
ID: IL2Z:QYIC:CVO4:DKSU:RAVA:ONC2:ZSBT:JLHA:FBWV:JY7W:E7SS:W7AA
4 Y. m& B$ K" z  Q6 O Docker Root Dir: /var/lib/docker
7 \3 [& z9 {8 Z4 X1 R& a" ?  m" M Debug Mode: false6 W9 `. {7 H& o# M* e' {
Registry: https://index.docker.io/v1/& |2 o4 c+ K8 R0 W6 l1 m
Labels:- {; M5 j) Y% |
Experimental: false
9 R2 O  y7 g1 I. U6 ^ Insecure Registries:
+ g/ |( N8 f: f/ z4 n8 ?8 h  192.168.0.75:4000
$ [0 g+ i. N, W. m3 ^' T* T9 E  127.0.0.0/81 I( t+ C# p. I7 {  n
Live Restore Enabled: false
& a  p+ n* S& l! n% b3 L4 X0 L+ N8 R* |+ M1 ?
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

如有购买积分卡请联系497906712

QQ|返回首页|Archiver|手机版|小黑屋|易陆发现 点击这里给我发消息

GMT+8, 2022-7-4 11:08 , Processed in 0.042455 second(s), 22 queries .

Powered by LR.LINUX.cloud bbs168x X3.2 Licensed

© 2012-2022 Comsenz Inc.

快速回复 返回顶部 返回列表