- 积分
- 16843
在线时间 小时
最后登录1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
[root@localhost ~]# systemctl status zabbix-agent2.service 2 s; R& {) z* |: `
● zabbix-agent2.service - Zabbix Agent 2
/ ~. r! J, y2 u5 g0 f Loaded: loaded (/usr/lib/systemd/system/zabbix-agent2.service; enabled; vendor preset: disabled)
6 d; t }5 |' M( T Active: activating (auto-restart) (Result: exit-code) since Wed 2024-12-11 17:05:53 CST; 2s ago
7 F$ |0 F' J/ M- P6 J9 s Process: 2540 ExecStart=/usr/sbin/zabbix_agent2 -c $CONFFILE (code=exited, status=127): a9 D, f. u! r' `6 Y8 \8 N9 G! \% \& i: Q
Main PID: 2540 (code=exited, status=127)
, ^4 T) w6 Z) n5 V+ W9 Q2 o& V% h$ @% t) p% t4 _7 x+ X
Dec 11 17:05:53 localhost.localdomain systemd[1]: zabbix-agent2.service: main process exited, code=exited, status=127/n/a
) C. E- H& M$ A6 {7 h+ F8 Q/ `$ bDec 11 17:05:53 localhost.localdomain systemd[1]: Unit zabbix-agent2.service entered failed state.9 O* K( b- |# J
Dec 11 17:05:53 localhost.localdomain systemd[1]: zabbix-agent2.service failed.' I% S& V# e6 S9 X2 r3 o- C
7 L' } a) S3 e$ P# M# u
查看message日志发现:
% P3 w/ D- k" v5 F- z" k: K" x/ w
3 Z1 ~; p: n! t! E7 J- r6 `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 directory8 u% l$ e, g" J( D2 C6 x) P
Dec 11 17:09:22 localhost systemd: zabbix-agent2.service: main process exited, code=exited, status=127/n/a4 u q' N. i& \) m
Dec 11 17:09:22 localhost systemd: Unit zabbix-agent2.service entered failed state.8 O: f" n; C) z3 a
Dec 11 17:09:22 localhost systemd: zabbix-agent2.service failed.
7 o9 W4 {/ P. \! \6 nDec 11 17:09:33 localhost systemd: zabbix-agent2.service holdoff time over, scheduling restart.6 _. e) u) c# @# ^, Q4 n6 g3 z
Dec 11 17:09:33 localhost systemd: Stopped Zabbix Agent 2.
5 O, {- t9 O( L7 a. ^+ @5 y$ `) BDec 11 17:09:33 localhost systemd: Started Zabbix Agent 2.3 F$ x! P4 l) b. B) t) B. X% f
Dec 11 17:09:33 localhost systemd: zabbix-agent2.service: main process exited, code=exited, status=127/n/a$ z* W4 T. B* a5 d
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
/ t& f5 D& H0 T4 lDec 11 17:09:33 localhost systemd: Unit zabbix-agent2.service entered failed state.
/ s' |( |# i+ \ ]5 DDec 11 17:09:33 localhost systemd: zabbix-agent2.service failed.- D% [* A/ b/ L+ f4 K2 i. b
: B7 {1 @3 c4 \, X6 e
( \3 j) C2 d3 y+ S[root@localhost ~]# vim /etc/zabbix/zabbix_agent2.conf
4 l3 A x* n- |- z3 b7 P0 L2 V: s[root@localhost ~]# systemctl restart zabbix-agent2.service
) q( F3 v: J* Z5 Q8 I2 I* U/ R. _; v! `) p! X7 @
原来是缺包:) K7 L6 o! X9 c% u8 H2 n
[root@localhost ~]# yum provides libpcre2-8.so.0
& @& t3 F0 W; y v8 |) c+ O! LLoaded plugins: fastestmirror$ K3 [% B. d, I
Loading mirror speeds from cached hostfile( b+ T7 ]& X N, I, P
* base: mirrors.aliyun.com) q! k7 `5 z- W
* extras: mirrors.aliyun.com$ h+ ?, U" ~4 E% U7 R8 p
* updates: mirrors.aliyun.com
! g% [0 w2 ?2 q% d: ^8 qpcre2-10.23-2.el7.i686 : Perl-compatible regular expression library
`/ s8 ?7 J) w( [, XRepo : base8 V* j4 W6 B0 e |& ]
Matched from:6 _# v& @( Z, z+ L
Provides : libpcre2-8.so.0/ e8 {7 O3 F5 d: }/ V" Z- \
& \# O! i& M/ |& X* X+ ~) ]& B; E; L
0 S: e& ^- y' F; u4 B5 J
& H/ h4 s9 f( S1 N' G接下来安装包吧:
' O( I* F3 |/ \8 p( u `: K; ~2 y* W: _7 @: r8 P1 ^' k y
[root@localhost ~]# yum install -y pcre2
3 v7 y) N: a# v, bLoaded plugins: fastestmirror; e1 J+ _! C' Z0 s3 w7 h3 b
Loading mirror speeds from cached hostfile
" Z7 V$ l8 _& d9 Y/ f' z * base: mirrors.aliyun.com1 b& C8 B& J9 Z( F- z
* extras: mirrors.aliyun.com- U( \% q, b- h
* updates: mirrors.aliyun.com
) b( }* r! r8 P$ D) P6 ]1 L. wResolving Dependencies
3 ] t8 O" S- T: b* t0 x--> Running transaction check2 l- A$ V% ~$ I+ G
---> Package pcre2.x86_64 0:10.23-2.el7 will be installed6 Y+ B2 U8 p5 m. R, _2 n
--> Finished Dependency Resolution
6 _4 V& b. Q1 p8 U6 \2 a# A" p0 ^5 `6 e' w. H7 g
Dependencies Resolved
/ R! L: m6 k9 Q4 a) T
, J7 S0 T8 m- U1 V9 y5 s/ g==================================================================================================================================================================================================
4 J. n. X* J( v' x/ J6 L' @ Package Arch Version Repository Size# F) i9 M' q- j X% o6 \
==================================================================================================================================================================================================' N- s9 ]3 | x$ V; q5 I
Installing:
: |, `% Y) m5 U4 ?. O2 H0 F' N# p: c& k pcre2 x86_64 10.23-2.el7 base 201 k; R0 i$ H, t3 S2 a# m8 G
, u: w) i5 {9 T: VTransaction Summary
" ?7 A* u4 ^( ] H9 B- G==================================================================================================================================================================================================/ u5 F N' M7 G/ O. W3 Q
Install 1 Package
Z3 S, u0 W; H1 ^5 j+ L2 O1 O% T, {
Total download size: 201 k
$ C- D( ]% U2 X3 `* {Installed size: 556 k
2 W9 a/ E9 b: q8 P" R4 XDownloading packages:
0 H( _ I- C( |4 Epcre2-10.23-2.el7.x86_64.rpm | 201 kB 00:00:00
! k) t% h" e2 _4 p V# CRunning transaction check, a @( [1 d* r$ U' t& c$ D
Running transaction test
' w7 n+ a' g1 c9 h+ f# @5 t' i7 g8 pTransaction test succeeded
. V6 N2 z9 e5 p& S* {Running transaction$ z" g% y1 t% O. O# Y' p5 N% a5 L
Warning: RPMDB altered outside of yum.
0 \% o& I! |3 @* j) H, d( S** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
4 Q. \% ~8 s! t3 N- E( Vzabbix-agent2-6.0.6-1.el7.x86_64 has missing requires of libpcre2-8.so.0()(64bit)
9 }% ~' _/ @: K% { Installing : pcre2-10.23-2.el7.x86_64 1/1
; ~7 o; Q$ I( ?2 q8 K, Y- k Verifying : pcre2-10.23-2.el7.x86_64 1/1
) Z7 ^9 m2 H8 ?" x' U' N9 r- W6 N- F( t% k/ _
Installed:
5 Z% M& e' l7 u* d3 { pcre2.x86_64 0:10.23-2.el7
4 W7 E/ k6 N, `+ h& i* ?( F) [9 h* w: R6 j5 s. c9 `) X1 U
Complete!) _) m% {/ R, _& b! w/ d, q3 G
[root@localhost ~]# systemctl status zabbix-agent2.service
4 c7 ^4 ]$ ~8 o+ Z● zabbix-agent2.service - Zabbix Agent 2, |; j5 E3 A+ P9 o6 v* o0 c
Loaded: loaded (/usr/lib/systemd/system/zabbix-agent2.service; enabled; vendor preset: disabled)1 r. v) r3 k) }/ b! e
Active: active (running) since Wed 2024-12-11 17:09:43 CST; 13s ago% E6 r( ~4 ]" c6 [
Main PID: 2635 (zabbix_agent2)* N& n& M: v) \2 r
CGroup: /system.slice/zabbix-agent2.service) W7 e2 U% @5 c
└─2635 /usr/sbin/zabbix_agent2 -c /etc/zabbix/zabbix_agent2.conf
( s! N/ M- i3 r+ \# i* ^* M
; D a1 u( e- I8 i; Q0 ?Dec 11 17:09:43 localhost.localdomain systemd[1]: Started Zabbix Agent 2.
/ G) s. K) o2 R0 _: jDec 11 17:09:43 localhost.localdomain zabbix_agent2[2635]: Starting Zabbix Agent 2 (6.0.6)0 |* d; E( G# C3 F5 f) @1 s
Dec 11 17:09:43 localhost.localdomain zabbix_agent2[2635]: Zabbix Agent2 hostname: [192.168.8.112]6 W; v% A0 O& S
Dec 11 17:09:43 localhost.localdomain zabbix_agent2[2635]: Press Ctrl+C to exit.
' \6 B" u7 p8 V[root@localhost ~]#
" \& J/ X; y7 ^* b+ M; C) c
4 P3 I4 Q, p- ?# U& R5 g% h3 o8 Q& c- Y1 G8 i O c0 e8 `
问题解决了。
o2 k, I" v! S. m: ^# T0 p! S6 p9 m2 A7 C9 Z7 }# x
( `8 v- C' N: H+ K" p1 Q |
|