- 积分
- 16843
在线时间 小时
最后登录1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
[root@localhost ~]# systemctl status zabbix-agent2.service
7 G% s0 E* R2 G● zabbix-agent2.service - Zabbix Agent 2
6 I& v0 e4 j) c! G Loaded: loaded (/usr/lib/systemd/system/zabbix-agent2.service; enabled; vendor preset: disabled)* _! d9 T) I: p! {; `: h
Active: activating (auto-restart) (Result: exit-code) since Wed 2024-12-11 17:05:53 CST; 2s ago
- `2 K1 T8 {0 L3 S) j }0 ~+ u Process: 2540 ExecStart=/usr/sbin/zabbix_agent2 -c $CONFFILE (code=exited, status=127) w7 q! V( z; i( D
Main PID: 2540 (code=exited, status=127): Q$ ^. d- D- K
+ N1 D( @8 m- C, @
Dec 11 17:05:53 localhost.localdomain systemd[1]: zabbix-agent2.service: main process exited, code=exited, status=127/n/a
; K6 J0 ~- J' h9 A& L: y3 }Dec 11 17:05:53 localhost.localdomain systemd[1]: Unit zabbix-agent2.service entered failed state.1 a' b( N7 P2 O
Dec 11 17:05:53 localhost.localdomain systemd[1]: zabbix-agent2.service failed.$ a8 ^6 c# D# w. }
0 v: U) p2 t5 a2 m, t7 i查看message日志发现:
) M8 t7 C9 N9 m! k8 Z( q# G" x$ {$ C, t# ^
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
* b8 ^& m d7 x) M4 V: t) VDec 11 17:09:22 localhost systemd: zabbix-agent2.service: main process exited, code=exited, status=127/n/a
- d, W3 A$ P1 ODec 11 17:09:22 localhost systemd: Unit zabbix-agent2.service entered failed state.( \5 M- H0 `- V, N3 `' j! l* w8 ^. x
Dec 11 17:09:22 localhost systemd: zabbix-agent2.service failed.3 ~: r7 w1 _( N l4 G
Dec 11 17:09:33 localhost systemd: zabbix-agent2.service holdoff time over, scheduling restart.
8 @# J9 c, C s+ \, _& BDec 11 17:09:33 localhost systemd: Stopped Zabbix Agent 2.
! h& q- P/ e2 B% j+ K' hDec 11 17:09:33 localhost systemd: Started Zabbix Agent 2.: b1 h- C, _: y) G7 s l
Dec 11 17:09:33 localhost systemd: zabbix-agent2.service: main process exited, code=exited, status=127/n/a
* |% U, H; `% BDec 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 directory9 j/ G% W) Q: Q5 c- q
Dec 11 17:09:33 localhost systemd: Unit zabbix-agent2.service entered failed state.
& U5 y+ G) q$ T* \& T6 d8 \' nDec 11 17:09:33 localhost systemd: zabbix-agent2.service failed.: Q9 t6 @' F7 h8 E+ u' } y8 R
' P5 f) s6 {* h; B/ N- k
$ N, X& u) y Q- y: `. m8 }" ?
[root@localhost ~]# vim /etc/zabbix/zabbix_agent2.conf
$ Y8 ]8 i3 r4 E4 p[root@localhost ~]# systemctl restart zabbix-agent2.service 2 D0 L) @7 p5 [# ~, Z
" X- i3 D9 g/ f* i
原来是缺包:
! g& W1 F, ~- l6 w# L, a: Z[root@localhost ~]# yum provides libpcre2-8.so.07 O7 \6 J7 G9 d
Loaded plugins: fastestmirror, G6 H% L+ b- c$ d$ Y6 Z$ ^
Loading mirror speeds from cached hostfile4 m4 t# z+ G( r0 X; }
* base: mirrors.aliyun.com
; J/ J7 b9 x" y% K) H9 @ * extras: mirrors.aliyun.com
5 f, p4 q6 G+ }4 a v7 l * updates: mirrors.aliyun.com
/ G) E8 p8 L9 O, l" A8 | ~# z Ipcre2-10.23-2.el7.i686 : Perl-compatible regular expression library4 F) A' E1 n8 |0 C& m" g
Repo : base
3 I+ i, [0 _# I# \7 a4 IMatched from:
' N) K6 z# f, G3 UProvides : libpcre2-8.so.0- X- t+ D0 u. |+ m% B, Z
! W% H7 z0 Q" t
, \7 U+ O% y; r" |, i/ Q* D/ [
" ~2 z' [9 k( g8 j( O" c7 a接下来安装包吧:6 S, u* e1 _ K& I' ~* P+ X+ g1 Y
5 h7 T3 k4 F+ T0 G2 M5 A H[root@localhost ~]# yum install -y pcre2! K X- F( ]7 S0 G2 K6 D( @
Loaded plugins: fastestmirror8 D; i+ W3 Q( k
Loading mirror speeds from cached hostfile
# x# G+ I/ y9 T5 ^) K* h * base: mirrors.aliyun.com
, n! x3 I! p0 R, I * extras: mirrors.aliyun.com
! a# n" W3 [" y" j: f5 u% @ B9 \ * updates: mirrors.aliyun.com# S7 G Z& e3 R$ A# W0 d
Resolving Dependencies2 P) P3 v/ x6 _; o
--> Running transaction check& A, k. e5 q, J" r
---> Package pcre2.x86_64 0:10.23-2.el7 will be installed
: v M8 e! ]- G' r" a0 [--> Finished Dependency Resolution
& \8 h# Q% h# W; X8 [2 g
0 ~8 J b5 W4 iDependencies Resolved
- V4 D9 T. e% G. J$ U. p
1 M6 }1 ?1 D5 n' J% L$ n8 L# p==================================================================================================================================================================================================
0 A4 s2 X- C3 }$ X% Y8 P Package Arch Version Repository Size9 K7 V3 F7 ~! Q ~* P6 o
==================================================================================================================================================================================================
+ l1 {9 {" N( ~+ _* bInstalling:& A: S1 N8 s0 {( W% s! [
pcre2 x86_64 10.23-2.el7 base 201 k$ S8 \; b [& s4 _/ O: M
4 E0 A& ~" m, b7 zTransaction Summary
" r1 P" z0 j. N& w: {& m3 y% w' u==================================================================================================================================================================================================
, \7 c6 [* T& MInstall 1 Package5 B. B5 Q$ ]6 O
; S" ]: O( u) u1 e ~& y
Total download size: 201 k. ^* {& F! A- j3 c
Installed size: 556 k
- c4 R" T# F8 \# b; |# IDownloading packages:
% A- r. X+ V3 I, \2 z& zpcre2-10.23-2.el7.x86_64.rpm | 201 kB 00:00:00
3 Q; s8 d7 v/ Z7 tRunning transaction check: D, ~9 z" I S* V
Running transaction test* k1 j) l& _) M
Transaction test succeeded/ Y/ u- Q( G- m- I1 u3 s
Running transaction: t$ H- a1 o4 B: ]
Warning: RPMDB altered outside of yum.
, p+ J; k+ V) M2 Z8 _0 G$ i5 C2 ]. |** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
, F* E- m' y4 B' x+ qzabbix-agent2-6.0.6-1.el7.x86_64 has missing requires of libpcre2-8.so.0()(64bit)
" T- F e9 {2 F O3 Q9 f Installing : pcre2-10.23-2.el7.x86_64 1/1 & j0 |7 y9 }0 R8 \2 g! w! U* E- R
Verifying : pcre2-10.23-2.el7.x86_64 1/1
8 [4 X7 S y0 S/ ^
) k& o. w+ a# L# O8 PInstalled:) j5 J1 J8 R4 I9 }) A" _4 T/ y! R. q
pcre2.x86_64 0:10.23-2.el7
+ \, I, j8 o; N3 ^, H
! x- ]/ s4 ~* v9 G% | O" }/ wComplete!7 e E4 H Y1 S, ]$ P
[root@localhost ~]# systemctl status zabbix-agent2.service
; E0 v3 y5 T: n; v7 g( U$ Y$ @● zabbix-agent2.service - Zabbix Agent 2 ]0 D* {& W9 w F" U6 g! W/ K% o' K/ g
Loaded: loaded (/usr/lib/systemd/system/zabbix-agent2.service; enabled; vendor preset: disabled)
) \# M/ a5 x2 ]/ Y! C Active: active (running) since Wed 2024-12-11 17:09:43 CST; 13s ago" k1 w9 {+ x. X* t6 E. A$ p/ w2 {
Main PID: 2635 (zabbix_agent2)! S6 ^" G1 z. b- A; [: Q6 ^& g3 X
CGroup: /system.slice/zabbix-agent2.service, C! e; q0 L2 w; J' R7 r
└─2635 /usr/sbin/zabbix_agent2 -c /etc/zabbix/zabbix_agent2.conf
2 o& m4 D6 m& j. Y3 F
& A @" w% z5 i# V. |* p* fDec 11 17:09:43 localhost.localdomain systemd[1]: Started Zabbix Agent 2.. l) v6 g3 z. \, z+ Z5 p8 F0 v
Dec 11 17:09:43 localhost.localdomain zabbix_agent2[2635]: Starting Zabbix Agent 2 (6.0.6)( n; H" w+ ~# J' c, [; H( W: R! @2 J. q
Dec 11 17:09:43 localhost.localdomain zabbix_agent2[2635]: Zabbix Agent2 hostname: [192.168.8.112]
* @" s5 |8 E/ w& I% FDec 11 17:09:43 localhost.localdomain zabbix_agent2[2635]: Press Ctrl+C to exit.; B" w- T" d+ w
[root@localhost ~]# 9 K+ g2 K! w) @ O+ F! u
0 f a6 T* P2 L; a( E7 V& m6 {3 t9 y
' f+ Z$ E( A5 F8 ?问题解决了。
6 |8 `: j. n* C9 F. L0 q
( p0 X/ ~0 T; k0 q7 x
* w* a4 ^% T" E |
|