解决zabbix的cannot allocate shared memory of size错误
问题状态:
zabbix_server 不能启动,系统CentOS 6.7
原因分析:
这是因为内核对share memory的限制造成的。
用到如下命令ipcs [-m|l|a],sysctl [-a|p]
[root@server01 ~]# ipcs -l ------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 0
max total shared memory (kbytes) = 0
min seg size (bytes) = 1 ------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767 ------ Messages: Limits --------
max queues system wide = 16
max size of message (bytes) = 65536
default max size of queue (bytes) = 65536
从上面可以看到 max total shared memory 和 max seg siz e都是没有限制的。但是zabbix仍然不能allocate内存。
接下来查看目前的共享内存设置,
[root@server01 ~]# sysctl -a|grep shm
kernel.shmmni = 4096
kernel.shmall = 0
kernel.shmmax = 0
其中kernel.shmall代表总共能分配的共享内存,kernel.shmax代表单个段能allocate的内存(以字节为单位),这里都是0,所以肯定有问题。
然后查看 /etc/sysctl.conf
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
得到shmall为4G,shmax更大,为64G,因为是32位系统,所以设置shmall的时候不能超过32位系统能识别的最大内存,所以最多能设置为3G多,所以这个我改为
kernel.shmmax = 1294967296
kernel.shmall = 3294967296
然后执行sysctl -p生效,这时再查看如下。
[root@server01 ~]# sysctl -a|grep shm
kernel.shmmni = 4096
kernel.shmall = 3294967296
kernel.shmmax = 1294967296
的确生效了,然后启动zabbix_agentd成功,查看内存分配情况如下。
[root@server01 ~]# ipcs -m ------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x7401840e 2916352 root 600 4 0
0x6c0180cf 3047425 zabbix 600 527272 6
解决zabbix的cannot allocate shared memory of size错误的更多相关文章
- zabbix登陆问题:cannot allocate shared memory for collector
问题说明:在一台zabbix被监控服务器上(64位centos6.8系统,64G内容)启动zabbix_agent,发现进程无法启动,10050端口没有起来! 启动zabbix_agent进程没有报错 ...
- ORA-27125: unable to create shared memory segment的解决方法(转)
ORA-27125: unable to create shared memory segment的解决方法(转) # Kernel sysctl configuration file for Red ...
- ORA-04031: Unable To Allocate 32 Bytes Of Shared Memory
记录一次生产库遇到的4031错误,后来通过调整sga大小将问题解决了 报错信息: ORA-04031: 无法分配 32 字节的共享内存 ("shared pool","s ...
- PHP运行错最有效解决办法Fatal error: Out of memory (allocated 786432) (tried to allocate 98304 bytes) in H:\freehost\zhengbao2\web\includes\lib_common.php on line 744
原文 PHP运行错最有效解决办法Fatal error: Out of memory (allocated 6029312) Fatal error: Out of memory (allocated ...
- 简单解决“ORA-27100: shared memory realm already exists”的问题
背景 看到这篇文章,算是当初记录过程的一篇了,不像别的,只是有个结果算火.只是感觉到现在可能是碰不见这个问题了,现在哪有32位的oracle啊.可见技术随着岁月的变化,真不知10年后再看今天的问题,可 ...
- 关于Java HotSpot(TM) 64-Bit Server VM warning: Insufficient space for shared memory file: 11043的解决办
Java HotSpot(TM) 64-Bit Server VM warning: Insufficient space for shared memory file: /tmp/hsperfdat ...
- Insufficient space for shared memory file 解决办法
Java HotSpot(TM) 64-Bit Server VM warning: Insufficient space for shared memory file: /tmp/hsperfd ...
- Oracle调整内存超出限制出现ORA-27100: shared memory realm already exists问题解决办法
今天测试服务器遇到问题 ORA-04030:out of process memory when trying to allocate string bytes 一看就猜到是内存不足了,把Oracle ...
- shared memory realm does not exist
有天启动ORACLE,碰到如下问题 提示ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist 解决 ...
随机推荐
- excelize
// 参考:https://gitee.com/xurime/excelize // github.com/360EntSecGroup-Skylar/excelize
- ES 6 日期util.js =>
微信小程序demo const formatTime = date => { const year = date.getFullYear() const month = date.getMont ...
- python - pyxel 制作游戏
之前看了一个项目,觉得还挺有意思的,是关于做一个像素风的游戏,现在,虚幻4,u3d,已经让游戏愈发的好看,好玩,曾经我们童年的像素风游戏,愈来愈少.所以,这里我们就回味下. Pyxel是一个pytho ...
- jdk8的环境配置
下载jdk,选择安装路径进行安装.https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.htm ...
- (详细)JAVA使用JDBC连接MySQL数据库(3)-代码部分
欢迎任何形式的转载,但请务必注明出处. 本节主要内容 项目建立 数据库连接 数据库操作 主函数 点击进入推荐博客(必看) 一.项目建立 如图所示:新建Java Project.Package.Clas ...
- css垂直居中如何实现
利用CSS3的transform:translate .center{ width:%; position: absolute; top: %; left: %; -moz-transform: tr ...
- apidoc 工具的使用
使用rest framerok时,需要写API接口文档,此时就需要用到 apidoc(个人觉得这个用的比较顺手) 需要安装nodejs,,, windows 下 1 然后验证是否安装成功 node ...
- Mongodb 的ORM框架 Morphia 注解 之 @Reference
public class BlogEntry { private String title; private Date publishDate; private String body; privat ...
- Windows服务 + Quartz.NET
服务基础 安装管理员打开cmd cd C:\Windows\Microsoft.NET\Framework\v4.0.30319 InstallUtil.exe Path_WinSvc.exe 或者 ...
- c# String常用方法