当前位置:网站首页>Heartbeat启动后无反应
Heartbeat启动后无反应
2022-07-04 10:55:00 【星哥玩云】
在将heartbeat应用到线上后,启动service heartbeat start,发现之后就再没反应了,查看日志tail -f /var/log/ha-log如下:
heartbeat[30680]: 2015/01/27_18:04:29 info: Version 2 support: false heartbeat[30680]: 2015/01/27_18:04:29 WARN: Logging daemon is disabled --enabling logging daemon is recommended heartbeat[30680]: 2015/01/27_18:04:29 info: ************************** heartbeat[30680]: 2015/01/27_18:04:29 info: Configuration validated. Starting heartbeat 2.1.3 heartbeat[30681]: 2015/01/27_18:04:29 info: heartbeat: version 2.1.3 heartbeat[30681]: 2015/01/27_18:04:29 WARN: No Previous generation - starting at 1422353070 heartbeat[30681]: 2015/01/27_18:04:29 info: Heartbeat generation: 1422353070 heartbeat[30681]: 2015/01/27_18:04:29 info: No uuid found for current node - generating a new uuid. heartbeat[30681]: 2015/01/27_18:04:29 info: Creating FIFO /var/lib/heartbeat/fifo.
一直保持在此不动,heartbeat所管理的资源也没有启动。
刚开始没有任何头绪,即使查看debug日志也没有什么作用,还会有什么地方会有报错信息呢?
终于想到service hearbeat status,终于有所提示:
Cannot shmget for process status: Invalid argument
顺着这根线百度,查到是由于kernel.shmmax,是内核参数导致的。因为这台机器是老机器,版本为5.5,而新配置的6.5服务器没有这个问题。
我的机器shmmax数据设置的过大,从而导致创建共享内存失败。
shmmax内核参数定义单个共享内存段的最大值,一般建议使用物理内存的一半,单位为字节。
以2G为例:2048/2*1024*1024=1073741824
在/etc/sysctl.conf中添加kernel.shmmax=1073741824,在系统重启后仍生效。
改完之后,service heartbeat start,仍未启动,再次service hearbeat status报错
Cannot shmget for process status: No space left on device
这是由于shmall共享内存设置过大导致
shmall内核参数定义共享内存页数,一般建议设置为物理内存大小,单位为页,1页=4k
以2G为例:2048*1024*1024/4000= 536870
在/etc/sysctl.conf中添加kernel.shmall=536870,在系统重启后仍生效。
以上全部改完后,再次service heartbeat start,正常启动且顺利接管VIP。
ok,希望给大家带来帮助。
边栏推荐
- Two way process republication + routing policy
- [Galaxy Kirin V10] [server] system partition expansion
- Canoe - the second simulation project -xvihicle1 bus database design (operation)
- Appscan installation steps
- Terms related to hacker technology
- 2022 ape circle recruitment project (software development)
- Write a program to judge whether the elements contained in a vector < int> container are 9.20: exactly the same as those in a list < int> container.
- From programmers to large-scale distributed architects, where are you (2)
- JMeter common configuration components and parameterization
- 51 data analysis post
猜你喜欢
Postman interface test
From programmers to large-scale distributed architects, where are you (2)
Introduction to tree and binary tree
[Galaxy Kirin V10] [server] FTP introduction and common scenario construction
DCL statement of MySQL Foundation
Discussion | has large AI become autonomous? Lecun, chief scientist of openai
F12 clear the cookies of the corresponding web address
Four characteristics and isolation levels of database transactions
Sword finger offer 05 (implemented in C language)
Evolution from monomer architecture to microservice architecture
随机推荐
Static comprehensive experiment ---hcip1
/*Write a function to open the file for input, read the contents of the file into the vector container of string class 8.9: type, and store each line as an element of the container object*/
[test theory] test process management
Student achievement management system (C language)
Crawl Zhejiang industry and trade news page
DDL statement of MySQL Foundation
2、 Operators and branches
Recursion and divide and conquer strategy
Remove linked list elements
Elevator dispatching (pairing project) ③
Postman interface test
Seven examples to understand the storage rules of shaped data on each bit
[Galaxy Kirin V10] [server] iSCSI deployment
Open the neural network "black box"! Unveil the mystery of machine learning system with natural language
C language - stack
From programmers to large-scale distributed architects, where are you (2)
DDL language of MySQL database: create, modify alter, delete drop of databases and tables
Four characteristics and isolation levels of database transactions
[Galaxy Kirin V10] [desktop and server] FRP intranet penetration
Two way process republication + routing policy