易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 4583|回复: 3
收起左侧

pacemaker的服务都正常,但是报'unknown error

[复制链接]
发表于 2017-12-28 23:21:27 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
Failed Actions:" [  b* Q3 d1 `1 B0 D- I$ u/ h2 A
* controller_start_0 on controller1 'unknown error' (1): call=7, status=complete, exitreason='Unable to detect last
8 F# G+ ]5 B" W, L7 [known write sequence number',; q6 [+ m, ?/ q) }1 k; y: \  b
    last-rc-change='Thu Dec 28 23:17:22 2017', queued=0ms, exec=7076ms
( p; R% Y2 A4 v2 J# d7 o" r! d$ I
发表于 2017-12-29 10:30:47 | 显示全部楼层
谁遇到过此类问题。
 楼主| 发表于 2017-12-29 10:40:48 | 显示全部楼层
安装ha组件:  I& `+ P, o% f/ e0 x1 ]
yum install pcs fence-agents-all; d3 O" r0 B9 b: U
6 |7 L4 l, r2 F
创建集群# a( ?  f8 f2 |/ q# i; L; x8 m
pcs cluster setup --start --name my_cluster z1.example.com z2.example.com4 m- E" T7 z7 D+ |' k* p. Z% Q$ l
启动集群服务
) f+ ~- L5 C) e0 j, Epcs cluster enable --all
0 Y/ _  G5 h) X% s6 d# a查看集群状态! H- `& g* _, \) X
pcs cluster status
6 P1 l. N  F8 I) {; C
7 [: k. g+ V- L) c创建stonith设备
! b3 ^- E' M' W( t
- i# N$ J0 _5 i2 s! P1 L. B0 Fpcs stonith create myapc fence_apc_snmp params ipaddr="zapc.example.com" pcmk_host_map="z1.example.com:1;z2.example.com:2" pcmk_host_check= "static-list" pcmk_host_list="z1.example.com,z2.example.com" login="apc" passwd="apc"
3 j/ y6 ^- V) u/ O, Vpcs stonith show myapc7 P) }+ A# a! E( P+ {: ~

! w, D5 T) e. N) h/ a0 o创建资源
% j) O5 O( H, {+ C5 W. A( Ipcs resource create my_lvm LVM volgrpname=my_vg exclusive=true --group apachegroup
' Z" O+ D2 @8 L" G3 g) i6 [pcs resource show. Z9 X) Z" V: u- J' S, G) d6 @( }' E

0 P' B: w+ l2 K) s6 W( D; g+ v- rpcs resource enable
5 {. R2 D! n& d$ d% g8 hpcs resource create my_fs Filesystem device="/dev/my_vg/my_lv" directory="/var/www" fstype="ext4" --group apachegroup- Y! Y) C% G& V8 M  p6 ^
pcs resource create VirtualIP IPaddr2 ip=198.51.100.3 cidr_netmask=24 --group apachegroup
  X' K% z: u+ i0 S8 ]3 O5 Npcs resource create Website apache configfile="/etc/httpd/conf/httpd.conf" statusurl="http://127.0.0.1/server-status" --group apachegroup" V0 O1 s$ z* s4 Y* S
pcs resource create VirtualIP ocf:heartbeat:IPaddr2 ip=192.16 8.0.120 cidr_netmask=24 opmonitorinterval= 30s1 G" ?- M2 v* d4 Q

# i! Y# Y0 G6 z5 A' ^' q
6 T. W9 G+ V% @2 a4 x查看集群状态:
& Q7 {& j: D& z( t& ?2 E* }3 w% Fpcs status
6 D, V2 n- z% X( @$ u倒换节点:pcs cluster standby z1.example.compcs cluster unstandby z1.example.com
- W- O4 Q; _9 I7 N查看帮助pcs resource -h
  c. U/ m, L$ C. J; [. k导出和备份配置文件pcs cluster cib testfilepcs config backuppcs config restorepcs cluster setup --name new_cluster nodeA nodeB --token 10000 --join 100pcs cluster stoppcs cluster enablepcs cluster disablepcs cluster node add nodepcs cluster node remove nodepcs cluster standby nodepcs cluster unstandby nodepcs stonith listpcs stonith describepcs stonith show --fullpcs stonith create myapc-west-13 fence_apc pcmk_host_list="west-13" ipaddr="west-apc" login="apc" passwd="apc" port="15"4 j$ _8 t- }/ [  y% C" t, W2 M
fence对应节点:pcs stonith fence nodepcs resource delete VirtualIPpcs resource describe LVMpcs resource show --fullpcs resource enable resource_id
( J  z3 c9 z( Npcs resource disable resource_id
6 E, A, C) O( ^; C" f& v% O3 W( V& K4 h+ [) ^
设置资源先后关系pcs constraint VirtualIP then dummy_resource kind=Optional0 X. v* r" a% K4 i
进入维护模式:pcs resource unmanage resource1
+ E. B/ |. }8 a( I' X$ z: I3 L解除维护模式
, Q7 |! W& d0 S/ L1 F6 ppcs resource manage resource1
 楼主| 发表于 2018-1-13 15:24:40 | 显示全部楼层
Failed Actions:
9 z  v. g# `& Q2 t! Q  ?& ~* my_wsrep_cluster_promote_0 on controller1 'unknown error' (1): call=12, status=complete, exitreason='Failure, Atte* A9 k$ d( `6 F' d. h
mpted to promote Master instance of my_wsrep_cluster before bootstrap node has been detected.',
. l$ c5 K8 o+ c3 L  c  @    last-rc-change='Sat Jan 13 15:20:31 2018', queued=0ms, exec=94ms
$ Z. z1 @! v6 O6 }7 P( d* my_wsrep_cluster_promote_0 on controller2 'unknown error' (1): call=12, status=complete, exitreason='Failure, Atte8 O1 e& S. e: f" J7 j' A# _
mpted to promote Master instance of my_wsrep_cluster before bootstrap node has been detected.',  V% U' {. y& S0 R
    last-rc-change='Sat Jan 13 15:20:33 2018', queued=1ms, exec=102ms
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 点击这里给我发消息

GMT+8, 2026-4-8 15:20 , Processed in 0.038019 second(s), 22 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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