gpt4 book ai didi

mysql - 无法初始化 corosync 配置 API 错误 12

转载 作者:行者123 更新时间:2023-11-29 19:02:33 24 4
gpt4 key购买 nike

无法初始化在 docker 容器内运行的 corosync。 corosync-cfgtool -s 命令产生以下结果:

Could not initialize corosync configuration API error 12

/etc/corosync/corosync.conf 文件具有以下内容:

compatibility: whitetank

totem {
version: 2
secauth: off
threads: 0
interface {
ringnumber: 0
bindnetaddr: 127.0.0.1
mcastaddr: 239.255.1.1
mcastport: 5405
ttl: 1
}
}

logging {
fileline: off
to_stderr: no
to_logfile: yes
logfile: /var/log/corosync.log
to_syslog: yes
debug: off
timestamp: on
logger_subsys {
subsys: AMF
debug: off
}
}

/var/log/corosync.log 文件显示以下内容:

May 02 20:13:22 corosync [MAIN  ] Could not set SCHED_RR at priority 99: Operation not permitted (1)
May 02 20:13:22 corosync [MAIN ] Could not lock memory of service to avoid page faults: Cannot allocate memory (12)
May 02 20:13:22 corosync [MAIN ] Corosync Cluster Engine ('1.4.6'): started and ready to provide service.
May 02 20:13:22 corosync [MAIN ] Corosync built-in features: nss
May 02 20:13:22 corosync [MAIN ] Successfully read main configuration file '/etc/corosync/corosync.conf'.
May 02 20:13:22 corosync [TOTEM ] Initializing transport (UDP/IP Multicast).
May 02 20:13:22 corosync [TOTEM ] Initializing transmit/receive security: libtomcrypt SOBER128/SHA1HMAC (mode 0).

最佳答案

我在 bash 脚本中运行以下命令:

service corosync start
service corosync status
corosync-cfgtool -s

显然它运行得太快,没有给 corosync 足够的时间来初始化。将脚本更改为以下内容似乎有效:

service corosync start
service corosync status
sleep 5
corosync-cfgtool -s

我现在看到 corosync-cfgtool -s 的以下输出:

Printing ring status.
Local node ID 16777343
RING ID 0
id = 127.0.0.1
status = ring 0 active with no faults

关于mysql - 无法初始化 corosync 配置 API 错误 12,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43746518/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com