找回密码
 注册
查看: 35|回复: 1

[ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: 问题解决

[复制链接]

70

主题

73

回帖

1201

积分

网站编辑

积分
1201
发表于 2024-9-15 10:34:17 | 显示全部楼层 |阅读模式
本帖最后由 1320503165 于 2024-9-15 10:51 编辑
$ L! M) P9 c% l/ I1 [% d
- y; u; @  a" F# @. y: }   [ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables does not exist
6 k4 r" b8 g) I2 k' W- ^7 v    [ERROR FileContent--proc-sys-net-ipv4-ip_forward]: /proc/sys/net/ipv4/ip_forward contents are not set to 1  ?0 Q$ \$ O: Y" k. y
, H7 ?4 {- T. E9 F& u6 P& {

) ]# _  M+ L) @% w7 U
, s% [7 M0 ]. H. x: N7 I/ J! T( U$ B/ F$ F! q2 i$ s
[root@kubernetes-master net]# vim /etc/sysctl.d/k8s.conf
: }* e/ ?% W* i; Z' Z6 X[root@kubernetes-master net]# modprobe br_netfilter% c" V) ]  M/ Y/ ?, m
[root@kubernetes-master net]# sysctl --system /etc/sysctl.d/k8s.conf / _0 S9 j( m1 h' H1 k2 A
* Applying /usr/lib/sysctl.d/00-system.conf ...; H$ r1 W) |; L# t
net.bridge.bridge-nf-call-ip6tables = 0
( q& y( l$ Q4 `' L2 p: mnet.bridge.bridge-nf-call-iptables = 0
7 E& ^" Y9 E7 w& Inet.bridge.bridge-nf-call-arptables = 0
! @5 O! c6 e5 w* z$ g* D4 W* Applying /usr/lib/sysctl.d/10-default-yama-scope.conf ...: O* V& v! y& [1 ?1 p0 ~
kernel.yama.ptrace_scope = 0
. C$ B5 x* t3 b$ C1 ?- S3 ^* Applying /usr/lib/sysctl.d/50-default.conf ...7 e8 X( |% m! h. i
kernel.sysrq = 16
5 E2 n# D6 ?% \! P) \1 ]# skernel.core_uses_pid = 1
& W2 B# _  i" M1 Wkernel.kptr_restrict = 1) U! J6 f) W7 J, E6 A/ }0 H+ K/ J( N
net.ipv4.conf.default.rp_filter = 16 Y- g8 M3 ^; ^$ O' Z: A* H
net.ipv4.conf.all.rp_filter = 1- m, u  ~( Y5 M' z) l
net.ipv4.conf.default.accept_source_route = 0
6 r- a) J3 [" Hnet.ipv4.conf.all.accept_source_route = 0" ^; r. P' e- o! }3 X5 g5 j
net.ipv4.conf.default.promote_secondaries = 1
0 L1 [9 \. g/ I& Qnet.ipv4.conf.all.promote_secondaries = 1
7 h. ]8 g$ G) efs.protected_hardlinks = 1+ u' d# J: `! [( Z
fs.protected_symlinks = 1$ W4 h# b" _/ g
* Applying /etc/sysctl.d/99-sysctl.conf ...& p3 Q- {7 K+ b8 i
kernel.pid_max = 316448
% t. j+ b* C" _* Applying /etc/sysctl.d/k8s.conf ...
& t' m6 A! d! ?* G' }" O# B$ ~! E9 P5 {net.bridge.bridge-nf-call-ip6tables = 1
5 Q/ a7 k& F# D* w7 hnet.bridge.bridge-nf-call-iptables = 1( l) K: y. v3 m6 \( z
* Applying /etc/sysctl.conf ...! A2 m6 U3 A+ R5 C7 n. Q+ @
kernel.pid_max = 3164486 U; n* I! ?! I9 F6 y
[root@kubernetes-master net]# kubeadm init --apiserver-advertise-address=192.168.8.190  --image-repository registry.aliyuncs.com/google_containers  --kubernetes-version v1.28.0 --service-cidr=10.177.100.0/12 --pod-network-cidr=10.233.0.0/16  --cri-socket=unix:///var/run/cri-dockerd.sock  
8 J% F. n& M) F; l- @4 X1 R! E[init] Using Kubernetes version: v1.28.0/ H5 K/ O, G) B( Y7 f; G
[preflight] Running pre-flight checks+ H- E/ s( g, e; z- {6 I0 O! h& j. p$ P
error execution phase preflight: [preflight] Some fatal errors occurred:
* L0 c3 q5 V/ z) n9 ]7 Z    [ERROR CRI]: container runtime is not running: output: E0915 10:46:46.870746    2864 remote_runtime.go:616] "Status from runtime service failed" err="rpc error: code = Unavailable desc = connection closed before server preface received"
! x* g1 E2 b6 N  V& U$ {2 utime="2024-09-15T10:46:46+08:00" level=fatal msg="getting status of runtime: rpc error: code = Unavailable desc = connection closed before server preface received"
/ i/ }& B7 _6 b, error: exit status 1
! Q( n8 F) G0 ]% G4 |# Z7 _8 I8 V    [ERROR FileContent--proc-sys-net-ipv4-ip_forward]: /proc/sys/net/ipv4/ip_forward contents are not set to 1' o. s( v& L! R0 l
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
' `1 u4 O+ g* W/ N1 k2 l  iTo see the stack trace of this error execute with --v=5 or higher
; D3 q* L5 ]; C! V3 u9 x[root@kubernetes-master net]# docker ps # t( L+ i1 C; G# c
6 |5 h8 h4 n0 k: r1 d  F
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
9 K* Y$ I+ e6 {# m[root@kubernetes-master net]#
7 q1 M# N- y' `$ k9 s: Z[root@kubernetes-master net]# systemctl restart docker.service 8 t1 [4 j/ M# M% P: y+ s
[root@kubernetes-master net]# docker ps
( m  x8 d+ r' L6 b6 M2 R( \) ?CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
5 J4 F  s! d0 P8 {+ l0 b8 N. X9 }[root@kubernetes-master net]# systemctl enable docker.service
8 m: y1 B: H. A2 W9 CCreated symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
, L  s, r2 V# O* i6 {5 Z[root@kubernetes-master net]# systemctl status cri-docker.service
# Q+ }4 Z3 ]" F, c● cri-docker.service - CRI Interface for Docker Application Container Engine8 M7 B) e* C0 F7 w5 M7 y( _8 _
   Loaded: loaded (/usr/lib/systemd/system/cri-docker.service; enabled; vendor preset: disabled)8 O3 O* e) Z1 x7 _6 H& Z
   Active: failed (Result: start-limit) since Sun 2024-09-15 10:46:51 CST; 1min 37s ago. J" H. ^3 ^- G& Q& J% N) Q: s
     Docs: https://docs.mirantis.com
3 j# b  z7 i9 |" i Main PID: 2909 (code=exited, status=1/FAILURE)
1 s1 x4 `. d. r: d4 g9 l
2 U' \2 w! `/ w4 kSep 15 10:46:49 kubernetes-master systemd[1]: Failed to start CRI Interface for Docker Application C...ne.3 E2 m/ ], t; M4 Z1 |/ M5 [( Q
Sep 15 10:46:49 kubernetes-master systemd[1]: Unit cri-docker.service entered failed state.
0 J6 y, F2 N+ z$ gSep 15 10:46:49 kubernetes-master systemd[1]: cri-docker.service failed.9 v) E5 G, {) b+ a7 \- S# e
Sep 15 10:46:51 kubernetes-master systemd[1]: cri-docker.service holdoff time over, scheduling restart.
! z- r. D& l% C. a) ?Sep 15 10:46:51 kubernetes-master systemd[1]: Stopped CRI Interface for Docker Application Container...ne.
7 Q6 j# c  ]- e) i7 ]  q1 B% rSep 15 10:46:51 kubernetes-master systemd[1]: start request repeated too quickly for cri-docker.service
" K! m* V3 D( f* I6 i: u5 }; }Sep 15 10:46:51 kubernetes-master systemd[1]: Failed to start CRI Interface for Docker Application C...ne." ~1 d, z# ?# {% f
Sep 15 10:46:51 kubernetes-master systemd[1]: Unit cri-docker.service entered failed state.
# \: A, l$ o; o0 t! u2 `Sep 15 10:46:51 kubernetes-master systemd[1]: cri-docker.service failed.
" @' r! o) |# @+ \! `; YHint: Some lines were ellipsized, use -l to show in full.8 e! [/ Z# g# S0 \$ D
[root@kubernetes-master net]# systemctl restart cri-docker.service
( R0 l6 n1 m% G* J2 ~% ][root@kubernetes-master net]# systemctl status cri-docker.service 2 b) b4 I* [8 E' d" E! V8 M% p* d
● cri-docker.service - CRI Interface for Docker Application Container Engine
$ v0 K: _9 m' G( R" F. B   Loaded: loaded (/usr/lib/systemd/system/cri-docker.service; enabled; vendor preset: disabled)" S& a& L9 C/ V* c: i
   Active: active (running) since Sun 2024-09-15 10:48:38 CST; 1s ago9 G* P- [6 [' H% X
     Docs: https://docs.mirantis.com
4 J! [% Z  o- X& w& ]) R" p/ [( y Main PID: 3339 (cri-dockerd)0 A8 t1 d# B5 r8 B
    Tasks: 8
1 Z0 `: B4 t: d8 v0 c   Memory: 16.2M
+ E7 \8 `: i" e4 Q8 V5 n   CGroup: /system.slice/cri-docker.service# l' E. U/ h$ z% @7 X! x  Q
           └─3339 /usr/bin/cri-dockerd --container-runtime-endpoint fd:// --pod-infra-container-image=r...
  h- F+ v/ p2 e) B0 T" q
. s7 H* P. b. t7 ASep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...0s"; h3 f9 t' R) E. _9 w: E# |# x
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...ne"
* b( r2 \3 ]& Z( eSep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...ni"3 o8 D( L2 p) b; n
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...ni"
+ j3 L" w6 U/ i; sSep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...ive
- `$ f$ d2 ]5 A" v. \  B! d. RSep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...fs"
. w* z5 C) r  ~" MSep 15 10:48:38 kubernetes-master systemd[1]: Started CRI Interface for Docker Application Container...ne.4 j+ o% s/ a7 \8 R& ~# w
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...,}"7 u( W. f1 I7 y' Y9 l' z
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...e."% [( q8 F7 r! K/ ~
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...nd"" H+ t/ l- u; n4 f
Hint: Some lines were ellipsized, use -l to show in full.$ ~$ Q, E0 k  D& u: }4 W6 C. u

! F0 f: C. K* B1 d

70

主题

73

回帖

1201

积分

网站编辑

积分
1201
 楼主| 发表于 2024-9-15 10:52:11 | 显示全部楼层
[root@kubernetes-master net]# kubeadm init --apiserver-advertise-address=192.168.8.190  --image-repository registry.aliyuncs.com/google_containers  --kubernetes-version v1.28.0 --service-cidr=10.177.100.0/12 --pod-network-cidr=10.233.0.0/16  --cri-socket=unix:///var/run/cri-dockerd.sock  
: k, u, t/ I# s# M5 Q4 r[init] Using Kubernetes version: v1.28.0
% \$ z4 d/ m9 Q  j: k, t[preflight] Running pre-flight checks, g- m7 H1 }, i6 m" Y: k% U
[preflight] Pulling images required for setting up a Kubernetes cluster3 M" V. P3 B& U9 G/ Z$ `* b) Q, X
[preflight] This might take a minute or two, depending on the speed of your internet connection
. {% u) }+ t: E[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
" t* S+ m- d$ L. ?
4 M! \, J: ^$ K# w7 T- v+ a8 j+ k4 F$ |
也就是说docker未启动就会报错
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 00:32 , Processed in 0.017476 second(s), 21 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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