|
|
[root@localhost ~]# systemctl status zabbix-agent2.service
$ Z0 h) T3 K9 j& h+ K● zabbix-agent2.service - Zabbix Agent 2, m" K: M( W% h7 E0 l% I6 q
Loaded: loaded (/usr/lib/systemd/system/zabbix-agent2.service; enabled; vendor preset: disabled)
) h, M. j2 N) P Active: activating (auto-restart) (Result: exit-code) since Wed 2024-12-11 17:05:53 CST; 2s ago
# A* R) N" Z9 E8 K Process: 2540 ExecStart=/usr/sbin/zabbix_agent2 -c $CONFFILE (code=exited, status=127)
& |, ^+ M; t: N q Main PID: 2540 (code=exited, status=127)1 B, g/ m+ \- F# `, {
- M1 x, z8 w3 j2 L4 |' `7 ?Dec 11 17:05:53 localhost.localdomain systemd[1]: zabbix-agent2.service: main process exited, code=exited, status=127/n/a
0 c- i+ t7 j) ]0 Z1 ~Dec 11 17:05:53 localhost.localdomain systemd[1]: Unit zabbix-agent2.service entered failed state.$ H, P3 S6 @( R; {$ ]2 f- g
Dec 11 17:05:53 localhost.localdomain systemd[1]: zabbix-agent2.service failed.
8 o9 h3 I! V3 Y; y6 @8 P. a0 i! u# v
查看message日志发现:1 a0 T/ y7 t6 H- G& |' u+ x8 D( T1 L- X
9 w7 k! h Q5 e
Dec 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
4 p& P3 h& Z4 Q2 Z* X! x. ^Dec 11 17:09:22 localhost systemd: zabbix-agent2.service: main process exited, code=exited, status=127/n/a. i+ h) x& E- l1 ]/ ~2 d
Dec 11 17:09:22 localhost systemd: Unit zabbix-agent2.service entered failed state.( J8 N1 n3 \# G2 {% {8 D5 a
Dec 11 17:09:22 localhost systemd: zabbix-agent2.service failed.
) ~. k1 w, V+ F- sDec 11 17:09:33 localhost systemd: zabbix-agent2.service holdoff time over, scheduling restart.
) L" P! s4 @( I+ J/ L* MDec 11 17:09:33 localhost systemd: Stopped Zabbix Agent 2.
& L: }6 R- ? r/ I+ ?! dDec 11 17:09:33 localhost systemd: Started Zabbix Agent 2.2 ^. M" N+ r+ S+ F2 f7 ?0 J* M `
Dec 11 17:09:33 localhost systemd: zabbix-agent2.service: main process exited, code=exited, status=127/n/a# \ S3 M& `7 e
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
8 _* |/ b' j. c8 _7 x' SDec 11 17:09:33 localhost systemd: Unit zabbix-agent2.service entered failed state.
% v) `+ r9 l2 v" ^' n2 s; BDec 11 17:09:33 localhost systemd: zabbix-agent2.service failed.& |* V( W# j) y2 k% V3 l# L
# i2 {/ E t9 y% e9 b; b2 H B, { S. _+ Q2 y
[root@localhost ~]# vim /etc/zabbix/zabbix_agent2.conf / Y3 s& T; e: I0 `; _* O, ]. x
[root@localhost ~]# systemctl restart zabbix-agent2.service / E9 X1 q5 u+ S" h1 \
2 u3 X3 w+ i8 Y6 f原来是缺包:
. J) E3 ^! K! ?3 U' e[root@localhost ~]# yum provides libpcre2-8.so.06 V# R U0 ~8 C# K. u H- f
Loaded plugins: fastestmirror
6 I$ x! A8 V# ?4 T. vLoading mirror speeds from cached hostfile8 @# M# \( @) {; T$ v; d% j
* base: mirrors.aliyun.com
* F) @ N6 H" p9 f * extras: mirrors.aliyun.com
7 |; n& H1 t+ Z7 K * updates: mirrors.aliyun.com4 X1 }& n+ y6 S, u# {
pcre2-10.23-2.el7.i686 : Perl-compatible regular expression library6 y. n1 A- f* _3 H( X4 ?' [
Repo : base2 h2 t# ?/ q# L! r& L2 L
Matched from:
; ~" |1 X8 J' x& Y7 [Provides : libpcre2-8.so.04 {: M' c8 [# t% t3 t
' W. h" u( w% i) l2 F- [& L& ~8 \- v9 f
- `7 g$ W1 c. w: D! [
接下来安装包吧:+ G. z7 p" L" y. T. B
9 z! }8 J- f, s" }7 q9 `$ C1 m! T[root@localhost ~]# yum install -y pcre2
+ J$ g1 v% L& ?; ~3 d( y2 PLoaded plugins: fastestmirror
# F- h$ p- _$ hLoading mirror speeds from cached hostfile7 I6 E z1 M( b1 D# V4 `
* base: mirrors.aliyun.com
2 d" E* \: n# _5 O0 M- w4 T * extras: mirrors.aliyun.com
5 M/ o' o: B6 ~% A/ t. s7 d: M. ? * updates: mirrors.aliyun.com
- C9 O' n. [# \8 r' b& X7 LResolving Dependencies
& J$ j9 u' ?: _. O) g' P--> Running transaction check }) `$ V. t, m5 J4 [$ T
---> Package pcre2.x86_64 0:10.23-2.el7 will be installed$ f7 D* _% M; ^7 l4 w( X
--> Finished Dependency Resolution% t# r' B7 y: h3 V
. w7 @* {7 k4 v9 v( U
Dependencies Resolved
2 q9 [) P: a$ p$ s( p& D+ W
* {' x& `3 m; K& e==================================================================================================================================================================================================1 { [ [" U4 ^7 f
Package Arch Version Repository Size; p. v% V& ]0 K/ Q) g
==================================================================================================================================================================================================
7 P& G# _6 _9 }Installing:
: ^3 a2 W5 d% W' ~ pcre2 x86_64 10.23-2.el7 base 201 k
; s# _+ t( Z2 P8 x( c
) B4 e( V' K+ i7 TTransaction Summary( ]: Z S" K* R2 y. R" V
==================================================================================================================================================================================================0 [5 {0 {. ` I; Q+ [/ f% I
Install 1 Package
0 Y% |2 i" J$ a n
8 ^* z+ H) N/ fTotal download size: 201 k" n. U1 @4 u/ z9 E/ _
Installed size: 556 k& o$ [. K$ e+ R' C# B. p1 T
Downloading packages:
4 `/ Q% m; B6 @$ a3 E8 opcre2-10.23-2.el7.x86_64.rpm | 201 kB 00:00:00
. h' y( E' G$ X& @# b8 h6 N* d' M$ nRunning transaction check
1 M9 x; p( n7 e% rRunning transaction test
/ P0 I+ q2 o3 o0 D3 q. y$ LTransaction test succeeded
; |" c; K7 b L4 W/ @( R b4 l- b: VRunning transaction9 W- |8 u$ C: k: g' D# I
Warning: RPMDB altered outside of yum.4 b0 V) V* \3 G7 k1 f
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
4 I0 E0 D' Q, A' V% Ozabbix-agent2-6.0.6-1.el7.x86_64 has missing requires of libpcre2-8.so.0()(64bit)
* E& I( a1 Q& ~ Installing : pcre2-10.23-2.el7.x86_64 1/1
$ d% d# d( l2 L, L- Q1 A1 D& x; S Verifying : pcre2-10.23-2.el7.x86_64 1/1 + T; e a% S8 M: k- `: e- y
0 g \- u- ^) S- j0 E# J
Installed:
( C; W6 @- p9 A pcre2.x86_64 0:10.23-2.el7
- Y0 U1 G4 m) n2 v- q2 V3 `2 g0 _4 ]" N; G4 \" B% }7 G& R+ y* J4 v3 s
Complete!% V" y; q$ C& Z) t9 g. U
[root@localhost ~]# systemctl status zabbix-agent2.service
- v8 m3 m. {9 X+ r2 c i● zabbix-agent2.service - Zabbix Agent 2
, v( Y4 x' \1 L5 q" t' ]. E Loaded: loaded (/usr/lib/systemd/system/zabbix-agent2.service; enabled; vendor preset: disabled)4 W* r; b2 j8 J$ g$ p/ v
Active: active (running) since Wed 2024-12-11 17:09:43 CST; 13s ago# T8 M5 R+ @( \' @1 |) r* V: U
Main PID: 2635 (zabbix_agent2)4 N. _- Z; {6 z5 H" `
CGroup: /system.slice/zabbix-agent2.service8 T; C* |/ l4 K$ V0 J
└─2635 /usr/sbin/zabbix_agent2 -c /etc/zabbix/zabbix_agent2.conf9 {/ n7 z" Y6 @3 G* J
" |- ]; D/ M+ x7 s$ N
Dec 11 17:09:43 localhost.localdomain systemd[1]: Started Zabbix Agent 2.; k5 p4 b- D- Z9 r$ `
Dec 11 17:09:43 localhost.localdomain zabbix_agent2[2635]: Starting Zabbix Agent 2 (6.0.6)* V% a2 R- M" l; I) x. Q+ n8 I
Dec 11 17:09:43 localhost.localdomain zabbix_agent2[2635]: Zabbix Agent2 hostname: [192.168.8.112]
% B/ f* E4 l6 L9 S. @- I4 `Dec 11 17:09:43 localhost.localdomain zabbix_agent2[2635]: Press Ctrl+C to exit.& f2 K4 d. _, f/ e$ V( X: Y% ?( b. u
[root@localhost ~]#
! @0 ^1 }( e% \. D& |+ e; }8 {4 h0 e# O/ k* A
7 S5 G& T! g% j3 H6 G5 G9 l
问题解决了。/ s. t4 H' B; G4 i8 j/ o
% g) @; G. i1 \1 ^5 Q7 x) N' A, k: f* I
" j8 d& Z! z/ y( F |
|