找回密码
 注册
查看: 38|回复: 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 编辑
3 {) D* [5 I0 h% Q! |3 ]
! I; c8 w( d8 v   [ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables does not exist  X2 ^+ D, x6 w* a- J
    [ERROR FileContent--proc-sys-net-ipv4-ip_forward]: /proc/sys/net/ipv4/ip_forward contents are not set to 1/ u4 W: s$ w6 ~% l

5 I- Y' \' B# s  C1 p# s" y9 G
  _# I8 M$ b" R& f8 X

1 }  \8 T  t: C[root@kubernetes-master net]# vim /etc/sysctl.d/k8s.conf6 E$ S2 L' v$ S9 I! g8 q! [
[root@kubernetes-master net]# modprobe br_netfilter! p$ L9 Z. X  ~4 m
[root@kubernetes-master net]# sysctl --system /etc/sysctl.d/k8s.conf
! x+ d9 u' a8 X* Applying /usr/lib/sysctl.d/00-system.conf .../ ~5 Y0 k$ T9 e7 n5 s
net.bridge.bridge-nf-call-ip6tables = 0. G' ~* l4 v3 |1 V6 \
net.bridge.bridge-nf-call-iptables = 0" \. S3 C& b& t  o) F$ H
net.bridge.bridge-nf-call-arptables = 0
2 a9 Z, j- l1 p* Applying /usr/lib/sysctl.d/10-default-yama-scope.conf ...* C/ L' o* d: Q7 ^( J' |
kernel.yama.ptrace_scope = 0& {" w/ D' s( ?) I  o1 o
* Applying /usr/lib/sysctl.d/50-default.conf ...
8 H/ P2 ?  g* g/ z' x+ V5 G) q( F, g) i$ Qkernel.sysrq = 16  w0 x+ f/ |& `
kernel.core_uses_pid = 1' T/ _( W2 {2 c. k- g
kernel.kptr_restrict = 1* g! V/ D1 N$ q
net.ipv4.conf.default.rp_filter = 1
5 t2 b) g" ~' znet.ipv4.conf.all.rp_filter = 19 M  m" W) Z9 B' ^) z
net.ipv4.conf.default.accept_source_route = 0! @. G% G2 J1 J
net.ipv4.conf.all.accept_source_route = 0. a6 N" E  k; d+ o. W
net.ipv4.conf.default.promote_secondaries = 1
$ o8 _( ^! f8 o  I! ]+ V+ P3 y- Tnet.ipv4.conf.all.promote_secondaries = 1
9 D# s4 b! u+ j' pfs.protected_hardlinks = 1
/ J/ Z' @. ]' c: z! ^) b, Gfs.protected_symlinks = 1% }' c" A- H7 v3 [
* Applying /etc/sysctl.d/99-sysctl.conf ...4 }# P- }' t( c$ ~4 N
kernel.pid_max = 316448
* V- k6 G7 B2 b8 @/ H" r* Applying /etc/sysctl.d/k8s.conf ...0 Z( L% ~4 E. j' ]$ q+ H0 d' U1 L) J
net.bridge.bridge-nf-call-ip6tables = 1
/ ~6 ]/ d/ y; p- _5 t3 T2 H  }net.bridge.bridge-nf-call-iptables = 1
% K6 _& B/ m/ y9 }) A0 q* Applying /etc/sysctl.conf ...
# D8 e. _/ C% f- l3 wkernel.pid_max = 316448: Q& d  B- ?6 t' Y" F, d
[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  
* p$ e2 X1 c( |3 U/ ]5 V  b[init] Using Kubernetes version: v1.28.0' T, |, W" ^6 [4 v
[preflight] Running pre-flight checks0 P" g, q: ~. y4 R& v
error execution phase preflight: [preflight] Some fatal errors occurred:% V6 F0 a% Q; b/ `, h
    [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": n3 v, `: i' @$ @, h% }; d
time="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"
) Z1 _/ V8 T  U) ?/ K, error: exit status 1
( @$ I& {& Y  L( z) e, k" f    [ERROR FileContent--proc-sys-net-ipv4-ip_forward]: /proc/sys/net/ipv4/ip_forward contents are not set to 1' C/ m. L. q( N0 A1 Z- ?  {: k) }. M
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
( h' w8 G) l, f. G( |0 JTo see the stack trace of this error execute with --v=5 or higher
6 t( `/ I6 ^, ~[root@kubernetes-master net]# docker ps 1 D7 C3 O1 Y% V3 ]
2 @+ A; R! K& m% Y" X( f; {$ V- @
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
! S& W8 x" U+ {* m[root@kubernetes-master net]#
: I9 O! K  O! @- b5 ~1 k[root@kubernetes-master net]# systemctl restart docker.service
5 Z7 N2 [. F6 @. j2 [[root@kubernetes-master net]# docker ps   n5 w; m) ?, L7 z+ d& j+ m
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
( }4 w3 W1 E# w0 R[root@kubernetes-master net]# systemctl enable docker.service
7 H& P) h' G/ V& e& L* [. VCreated symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.' @' j3 v% m' M" F
[root@kubernetes-master net]# systemctl status cri-docker.service
$ W) A& ]% H) p● cri-docker.service - CRI Interface for Docker Application Container Engine4 V! ~& F: [/ Y
   Loaded: loaded (/usr/lib/systemd/system/cri-docker.service; enabled; vendor preset: disabled)
8 {$ Y! V& x. r0 \% i% i   Active: failed (Result: start-limit) since Sun 2024-09-15 10:46:51 CST; 1min 37s ago
2 x  s. ~2 b- {5 }$ g( \/ M+ g     Docs: https://docs.mirantis.com+ z4 C' c6 E) ~
Main PID: 2909 (code=exited, status=1/FAILURE)( F- I& T7 T" U6 o! @

, |2 p- s: ~4 z3 L( m5 @6 M( cSep 15 10:46:49 kubernetes-master systemd[1]: Failed to start CRI Interface for Docker Application C...ne.. ^% V8 _; q0 S8 z
Sep 15 10:46:49 kubernetes-master systemd[1]: Unit cri-docker.service entered failed state./ O$ M' V3 ~! j$ H, {* u
Sep 15 10:46:49 kubernetes-master systemd[1]: cri-docker.service failed.
1 k; T( G) B: N+ f& N7 C. R( jSep 15 10:46:51 kubernetes-master systemd[1]: cri-docker.service holdoff time over, scheduling restart.  r7 Q5 g& g; j* z: N4 ^
Sep 15 10:46:51 kubernetes-master systemd[1]: Stopped CRI Interface for Docker Application Container...ne.
6 o. d4 c6 P/ X6 {# n/ e: ~Sep 15 10:46:51 kubernetes-master systemd[1]: start request repeated too quickly for cri-docker.service
+ w7 ]  O1 \, c; O( T; qSep 15 10:46:51 kubernetes-master systemd[1]: Failed to start CRI Interface for Docker Application C...ne.
. u. B9 p, h' k1 S+ Q* tSep 15 10:46:51 kubernetes-master systemd[1]: Unit cri-docker.service entered failed state.
5 V) T9 u" G6 ~; {% p) K; g. mSep 15 10:46:51 kubernetes-master systemd[1]: cri-docker.service failed.& O' ?8 G, i& l
Hint: Some lines were ellipsized, use -l to show in full.  q5 P* U5 Q0 \' [6 y. ^
[root@kubernetes-master net]# systemctl restart cri-docker.service
7 {4 J$ G$ h  d, e: r. K4 H9 {. W[root@kubernetes-master net]# systemctl status cri-docker.service 8 }( O% J" H0 j
● cri-docker.service - CRI Interface for Docker Application Container Engine
7 I) q! C9 b' C; ^# X  J7 S   Loaded: loaded (/usr/lib/systemd/system/cri-docker.service; enabled; vendor preset: disabled)
3 u0 q$ B- e# O1 y3 T* n: B  Y   Active: active (running) since Sun 2024-09-15 10:48:38 CST; 1s ago
& @; O; S- d# B6 w* |     Docs: https://docs.mirantis.com+ Y( p" q# B) ?! C) o- i% Y
Main PID: 3339 (cri-dockerd)% \+ }9 h! c: G7 T
    Tasks: 87 k. b$ u+ I/ U9 `8 Q" m
   Memory: 16.2M( K$ D$ m( s" \  o* r0 z7 J
   CGroup: /system.slice/cri-docker.service
  X- A5 d$ N' G' D: D+ b           └─3339 /usr/bin/cri-dockerd --container-runtime-endpoint fd:// --pod-infra-container-image=r...
* n- B% t# E8 p: h3 q3 q% n$ L2 G; H/ w) S
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...0s"' }  A' Z1 U7 W
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...ne"6 @- X  o9 ?  L, q
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...ni"" K2 b0 R0 F( f$ C
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...ni"
# U$ ?; v* b0 O6 Y9 n2 R; E% a& P5 G& _Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...ive
( i' `" a8 F0 B0 w. n1 {5 v: zSep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...fs"8 l/ X; P- K8 B, f. o
Sep 15 10:48:38 kubernetes-master systemd[1]: Started CRI Interface for Docker Application Container...ne.
0 b8 ]1 b* y1 I3 ]- W& i; ESep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...,}"/ ?: }6 U8 \9 P; u
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...e."' N( a2 R1 q* k2 ^- m/ }! m1 W
Sep 15 10:48:38 kubernetes-master cri-dockerd[3339]: time="2024-09-15T10:48:38+08:00" level=info msg...nd"
* c3 b$ l# X- M6 eHint: Some lines were ellipsized, use -l to show in full.
. x- U2 Q" a6 q( W7 J1 Q! d1 `! W, ^' v9 q

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  
$ u1 e0 ~  d. m( v- f" F[init] Using Kubernetes version: v1.28.0) f+ {( _" c3 x
[preflight] Running pre-flight checks
2 ]$ J$ M( l) `* e0 M% \[preflight] Pulling images required for setting up a Kubernetes cluster/ s3 C0 @5 r+ {: F0 [- {
[preflight] This might take a minute or two, depending on the speed of your internet connection
( j3 _7 A( R9 K" t/ [) g+ Z& ~. g[preflight] You can also perform this action in beforehand using 'kubeadm config images pull', f8 D1 S9 t# H+ k

" [7 S% ~2 u9 S7 ?1 H( x2 L6 }. {5 f2 i& o4 \4 n
也就是说docker未启动就会报错
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 01:35 , Processed in 0.017316 second(s), 21 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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