当前位置:网站首页>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,希望给大家带来帮助。
边栏推荐
- /*The rewriter outputs the contents of the IA array. It is required that the type defined by typedef cannot be used in the outer loop*/
- Canoe - the third simulation project - bus simulation - 2 function introduction, network topology
- Write a program to judge whether the two arrays are equal, and then write a similar program to compare the two vectors.
- Canoe - the second simulation engineering - xvehicle - 2panel design (principle, idea)
- If you don't know these four caching modes, dare you say you understand caching?
- /*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*/
- Canoe - the third simulation project - bus simulation-1 overview
- Introduction to canoe automatic test system
- Error C4996 ‘WSAAsyncSelect‘: Use WSAEventSelect() instead or define _ WINSOCK_ DEPRECATED_ NO_ WARN
- Recursion and divide and conquer strategy
猜你喜欢

C language - stack

Open the neural network "black box"! Unveil the mystery of machine learning system with natural language
![[Galaxy Kirin V10] [server] FTP introduction and common scenario construction](/img/ef/f0f722aaabdc2d98723cad63d520e0.jpg)
[Galaxy Kirin V10] [server] FTP introduction and common scenario construction

Canoe - the second simulation engineering - xvehicle - 2 panel design (operation)

Introduction to canoe automatic test system

Send a request using paste raw text

Elevator dispatching (pairing project) ④

Remove linked list elements

Knapsack problem and 0-1 knapsack problem

MPLS: multi protocol label switching
随机推荐
51 data analysis post
TS type gymnastics: illustrating a complex advanced type
Aike AI frontier promotion (2.14)
Oracle11g | getting started with database. It's enough to read this 10000 word analysis
Basic function exercises
Write a thread pool by hand, and take you to learn the implementation principle of ThreadPoolExecutor thread pool
regular expression
[test theory] test process management
JMeter common configuration components and parameterization
Recursion and divide and conquer strategy
Article publishing experiment
DDL statement of MySQL Foundation
XMIND installation
Get the data of the top 100 headlines today with Tianxing data
Terms related to hacker technology
DCL statement of MySQL Foundation
What is an excellent architect in my heart?
Canoe - the third simulation project - bus simulation - 2 function introduction, network topology
[machine] [server] Taishan 200
From programmers to large-scale distributed architects, where are you (I)