|
|
[root@localhost ~]# systemctl status zabbix-agent2.service * M% x7 ^& { {' F& d
● zabbix-agent2.service - Zabbix Agent 2
1 Y; S6 f, W8 B/ @5 A- C- S5 B Loaded: loaded (/usr/lib/systemd/system/zabbix-agent2.service; enabled; vendor preset: disabled)9 g/ B# g& K% Y% o
Active: activating (auto-restart) (Result: exit-code) since Wed 2024-12-11 17:05:53 CST; 2s ago7 j; o" C7 x+ c/ l4 m, F3 z; F
Process: 2540 ExecStart=/usr/sbin/zabbix_agent2 -c $CONFFILE (code=exited, status=127)! F# d C/ w& R# }$ m8 m
Main PID: 2540 (code=exited, status=127)" D( |# m! A: e5 K4 r" s
E& X8 a2 E8 Q
Dec 11 17:05:53 localhost.localdomain systemd[1]: zabbix-agent2.service: main process exited, code=exited, status=127/n/a
. m9 i4 N1 H1 Y' ?. lDec 11 17:05:53 localhost.localdomain systemd[1]: Unit zabbix-agent2.service entered failed state.
9 D7 D" T1 B% L& I1 M1 `Dec 11 17:05:53 localhost.localdomain systemd[1]: zabbix-agent2.service failed.
& D! v5 P+ n6 B- H- e1 E# L* I8 x |' k# c) p+ t$ r3 K& y+ {# ~
查看message日志发现:1 f: W& B' T9 k1 ~- n
$ L% z# L3 k( R- KDec 11 17:09:22 localhost zabbix_agent2: /usr/sbin/zabbix_agent2: error while loading shared libraries: libpcre2-8.so.0: cannot open shared object file: No such file or directory/ [% F% S I! b9 y) A n9 U. t9 t
Dec 11 17:09:22 localhost systemd: zabbix-agent2.service: main process exited, code=exited, status=127/n/a9 v- c9 a0 p6 y3 D5 y2 P" S" ?
Dec 11 17:09:22 localhost systemd: Unit zabbix-agent2.service entered failed state.5 `) s/ B# T' U9 i8 H3 P2 g& \7 B
Dec 11 17:09:22 localhost systemd: zabbix-agent2.service failed.
& Y3 ~. q6 R1 a9 w( ?; BDec 11 17:09:33 localhost systemd: zabbix-agent2.service holdoff time over, scheduling restart.
' u" e) o1 ~- }/ nDec 11 17:09:33 localhost systemd: Stopped Zabbix Agent 2.' ]/ s5 w3 n2 ~( h7 r
Dec 11 17:09:33 localhost systemd: Started Zabbix Agent 2.4 g$ O- {# E0 ^2 x6 k
Dec 11 17:09:33 localhost systemd: zabbix-agent2.service: main process exited, code=exited, status=127/n/a
( v/ g$ j6 i8 @" P( N( ~Dec 11 17:09:33 localhost zabbix_agent2: /usr/sbin/zabbix_agent2: error while loading shared libraries: libpcre2-8.so.0: cannot open shared object file: No such file or directory' D! H* a2 W, E
Dec 11 17:09:33 localhost systemd: Unit zabbix-agent2.service entered failed state.
2 }" k. M' `/ f% X9 jDec 11 17:09:33 localhost systemd: zabbix-agent2.service failed.
. V. u" s2 v. z) I
* ?+ N v1 Y. y, D
7 i! {( n' y. q! e! C$ `[root@localhost ~]# vim /etc/zabbix/zabbix_agent2.conf
& a: P* _; C) b# P[root@localhost ~]# systemctl restart zabbix-agent2.service 8 A( V8 s# q; `8 m
$ a* n9 O& d1 h7 T% W! g/ M
原来是缺包:, p1 m5 U2 z4 K
[root@localhost ~]# yum provides libpcre2-8.so.07 B1 I4 q. L( }7 S% }9 F$ z
Loaded plugins: fastestmirror0 F& J; X2 M3 ^/ x+ `( O% z
Loading mirror speeds from cached hostfile7 H4 e3 g* U4 z, @2 `1 L! C
* base: mirrors.aliyun.com4 o# H! |$ S6 j+ @- Z
* extras: mirrors.aliyun.com( \1 {0 ~3 x- ^# Q, W1 H- H6 J3 g9 i
* updates: mirrors.aliyun.com, M {" k8 G. v& h
pcre2-10.23-2.el7.i686 : Perl-compatible regular expression library, S4 |- X' b) L9 r
Repo : base5 ?% A+ T9 C. ^$ m$ Q- j
Matched from:0 V" v5 a3 d. g8 d z
Provides : libpcre2-8.so.0
8 R; |9 ]' a7 l" C1 W/ P9 r7 S0 \, e; z
8 t4 H: N9 b z h
5 P- \, P' h) \3 K8 Q- D- S, [4 ]
接下来安装包吧:
g+ x, |" j' ]# t. ?& z7 y' K( ^
5 ^7 V; S$ N8 p; b: f \! t[root@localhost ~]# yum install -y pcre2, {3 b* f; K, u9 d# t
Loaded plugins: fastestmirror
8 f7 Q/ ^' e( T4 r0 k2 f [Loading mirror speeds from cached hostfile: ^1 ]2 |8 Q* k5 u! y* k( `
* base: mirrors.aliyun.com
6 K2 R' e- i4 R' d * extras: mirrors.aliyun.com( M. Z+ o; S" U3 S& n
* updates: mirrors.aliyun.com# P- M/ ^! C) m) ^% {8 g
Resolving Dependencies" ~% p7 V3 U' C
--> Running transaction check$ U, ~& _6 u9 G5 V4 b4 A" [
---> Package pcre2.x86_64 0:10.23-2.el7 will be installed
$ i0 a: e' B$ `: z4 J; ]8 G--> Finished Dependency Resolution
( b8 q/ E% Q# k6 J2 S" v( {. P
) }2 X/ t+ Y; \/ i4 Z* ~) gDependencies Resolved
5 |1 e9 s: k$ F9 l" I
5 p# r, P! E* r8 ^# D==================================================================================================================================================================================================
9 T. m3 F$ Z# C( s0 N1 | Package Arch Version Repository Size
- g- [+ {7 M5 h( C+ _==================================================================================================================================================================================================' S2 F% l8 |, _& d A2 c" ?
Installing:
( w! { y8 { C) v; Y pcre2 x86_64 10.23-2.el7 base 201 k/ x9 b: ]* h9 e% g: G# W& w
- b# t1 m$ b zTransaction Summary" Z& |1 P* C, e, `
==================================================================================================================================================================================================) S4 O: o0 k2 a
Install 1 Package
* m) J( K0 s! _7 F
^2 h+ w2 C$ {' t8 K VTotal download size: 201 k
$ Q5 a5 K( L% A) M9 tInstalled size: 556 k
, t" l$ A- _9 {' x' b1 JDownloading packages:/ W1 o6 M. Y/ {* n1 L
pcre2-10.23-2.el7.x86_64.rpm | 201 kB 00:00:00 4 q4 u* g* ~3 b- U' d4 W4 O, I
Running transaction check
( r/ Y4 e; N5 V. o. D" U: yRunning transaction test
6 E0 P K1 j; S% FTransaction test succeeded/ _3 V/ m5 x& P: f% a4 R
Running transaction
: r5 s5 S x& uWarning: RPMDB altered outside of yum.3 F* p' n3 X, E' M* F" d: f
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:/ @+ {, u7 P1 e1 r/ Q! Q6 r& d% ?2 Y
zabbix-agent2-6.0.6-1.el7.x86_64 has missing requires of libpcre2-8.so.0()(64bit)" X2 j% e+ i- c7 T. l5 k/ _
Installing : pcre2-10.23-2.el7.x86_64 1/1 , d* {; }4 ~0 D J- W" W
Verifying : pcre2-10.23-2.el7.x86_64 1/1
- u+ t; ]* l# ?0 l5 X+ x6 J
% `, x+ p( D- Y8 TInstalled:3 c7 g1 o" A/ j% ]0 _/ Y
pcre2.x86_64 0:10.23-2.el7 * n6 {4 e- z) O3 c# F1 M
6 X$ W( {& Z' c9 y( k# M/ @' a; ^Complete!
% Q( k/ e# e% \: U- q/ c$ N0 a1 K[root@localhost ~]# systemctl status zabbix-agent2.service
! I- h; I @& e a/ t● zabbix-agent2.service - Zabbix Agent 2
2 O3 w3 \) O) |6 [ Loaded: loaded (/usr/lib/systemd/system/zabbix-agent2.service; enabled; vendor preset: disabled)
$ L% ~: Z/ g( a @* R2 u Active: active (running) since Wed 2024-12-11 17:09:43 CST; 13s ago
5 h# v) q% i2 J2 P2 R Main PID: 2635 (zabbix_agent2)0 [3 C6 A+ j# k9 G; G. K3 ~- L' m
CGroup: /system.slice/zabbix-agent2.service6 S" W' C0 i$ G) |% E3 y. C. y6 E
└─2635 /usr/sbin/zabbix_agent2 -c /etc/zabbix/zabbix_agent2.conf, @( q7 ~6 f5 \
" D K9 e4 O: X9 |
Dec 11 17:09:43 localhost.localdomain systemd[1]: Started Zabbix Agent 2.
/ A U( S' b5 Q; `8 m4 rDec 11 17:09:43 localhost.localdomain zabbix_agent2[2635]: Starting Zabbix Agent 2 (6.0.6)
! S2 t2 b$ [; CDec 11 17:09:43 localhost.localdomain zabbix_agent2[2635]: Zabbix Agent2 hostname: [192.168.8.112]
) v7 E4 b3 g0 l" j/ F+ z* YDec 11 17:09:43 localhost.localdomain zabbix_agent2[2635]: Press Ctrl+C to exit.
1 {. C7 Y# T0 K+ n[root@localhost ~]#
7 y' X* V' B% c4 k8 J+ g; Q4 X
/ t# B: z" |: y2 }; ~0 ~0 ^! y3 I2 W2 l3 X. D
问题解决了。 C* H; {2 w0 d! Z
+ i. \6 E: s4 T3 C' G0 @
p9 N" f0 E' C3 A; X1 ] |
|