解决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 解决 ...
随机推荐
- 第三讲扩展,VA,RVA,FA(RAW),模块地址的概念
一丶VA概念 VA (virtual Address) 虚拟地址的意思 ,比如随便打开一个PE,找下它的虚拟地址 这边都是. 二丶模块地址(image Base) 模块地址,就是exe加载到内存的时候 ...
- (八)装配Bean(2)
二.在Java类中进行显式的装配 显式配置有两种: 1. 一种是在java(本文讲解) 2. 另一种是xml配置文件(第一章有讲) 案例一: 使用java显式装配+@autowired自动装配的方 ...
- Effective Java 读书笔记(三):类与接口
1 最小化类和成员的可访问性 (1)封装 封装对组成系统的组件进行解耦,从而允许这些组件独立开发,测试,优化,使用,理解和修改. 封装提高了软件的复用性,因为组件间的耦合度低使得它们不仅在开发环境,而 ...
- python爬视频实例
例:抓取PhotoShop视频教程 网址http://www.mxiaobei.com/?id=424 import requests import re from bs4 import Beauti ...
- vue 2.0+ 怎么写本地接口获取数据
在vue-cli脚手架项目中,找到build ---- webpack.dev.conf.js 文件,具体位置如下图: 找到文件后添加下面的内容,写在头部: //这是 webpack.dev.conf ...
- Vue字符串padStart和padEnd方法
padStart()用于头部补全,padEnd()用于尾部补全. 'a'.padStart(3, '0') // '00a' 'x'.padEnd(5, 'ab') // 'xabab' 'x'.pa ...
- SQLiteDatabase执行update、insert操作的时候,conflictAlgorithm参数的含义区别
/** * When a constraint violation occurs, an immediate ROLLBACK occurs, * thus ending the current tr ...
- 高射炮打蚊子,杀鸡用绝世好剑:在SAP Kyma上运行UI5应用
国人在表述"大材小用"这个场景时,总喜欢用一些实物来类比,比如:高射炮打蚊子. 英国QF 3.7英寸(94mm)高射炮,战斗全重超过9.3吨,全长近5米,最大射程约18公里,最大射 ...
- Bind Mounts and File System Mount Order
When you use the bind option of the mount command, you must be sure that the file systems are m ...
- C# Winfrom DataGridView常用设置
DataGridView常用设置 using System; using System.Collections.Generic; using System.Drawing; using System. ...