apache无法启动报错No space left on device
apache无法启动报错No space left on device
故障现象:apache无法启动ipcs信号量很多
# service httpd start
Starting httpd : [Failed]
当达到极限信号量:
# ipcs -s | wc -l
32004
而:
# cat /proc/sys/kernel/msgmni
32000
# cat /proc/sys/kernel/sem
250 24000 32 1024
原因
这些错误意味着有缺乏在系统内处理的通信资源,例如信号量或共享存储器段。
解析度
登录到通过服务器的SSH。
增加的限制sysctl 配置:
# mkdir -p /etc/sysctl.d/
# touch /etc/sysctl.d/99-zz_plesk_semaphores.conf
# chmod 755 /etc/sysctl.d/ /etc/sysctl.d/99-zz_plesk_semaphores.conf
# chown root:root /etc/sysctl.d/ /etc/sysctl.d/99-zz_plesk_semaphores.conf
这样的 /etc/sysctl.d/99-zz_plesk_semaphores.conf配置文件必须包含:
kernel.msgmni = 64000
kernel.sem = 250 256000 32 1024
负荷了新的sysctl设置 sysctl
# sysctl -p
检查哪些用户用尽信号灯:
# ipcs -s | awk '{print $3}' | uniq -c
4 root
33 httpd
234 somesoftware
阿帕奇保持清洁信号灯:
# for i in `ipcs -s | awk '/httpd/ {print $2}'`; do (ipcrm -s $i); done
在某些情况下,其他软件滥用严重限制信号,禁用该软件,清理作进一步调查其信号量和接触软件供应商:
# for i in `ipcs -s | awk '/httpd/ {print $2}'`; do (ipcrm -s $i); done
for i in `ipcs -s | awk '/httpd/{ next; } {print $2}'`; do (ipcrm -s $i); done
执行清理后问题依旧,反复执行也无效
[root@server:~]# ipcs -s
------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 0 root 600 1
0x00000000 65537 root 600 1
0x00000000 131074 apache 600 1
0x00000000 163843 apache 600 1
0x7a004a4e 196612 zabbix 600 13
0x00000000 229381 apache 600 1
0x00000000 262150 apache 600 1
0x00000000 294919 apache 600 1
0x00000000 327688 apache 600 1
[root@server:~]# ipcs -s | grep apache | perl -e 'while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}'
resource(s) deleted
resource(s) deleted
resource(s) deleted
resource(s) deleted
resource(s) deleted
resource(s) deleted
resource(s) deleted
resource(s) deleted
for i in `ipcs -s | awk '/httpd/{ next; } {print $2}'`; do (ipcrm -s $i); done
[root@server:~]# ipcs -s
------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 0 root 600 1
0x00000000 65537 root 600 1
0x7a004a4e 196612 zabbix 600 13
日志:
[root@server:~]# tail -f /var/log/messages
Dec 4 04:47:36 server nrpe[36326]: Host 192.168.254.63 is not allowed to talk to us!
Dec 4 04:47:36 server nrpe[36328]: Host 192.168.254.63 is not allowed to talk to us!
Dec 4 04:47:36 server nrpe[36330]: Host 192.168.254.63 is not allowed to talk to us!
Dec 4 04:47:36 server nrpe[36332]: Host 192.168.254.63 is not allowed to talk to us!
Dec 4 04:47:36 server nrpe[36334]: Host 192.168.254.63 is not allowed to talk to us!
Dec 4 04:48:07 server nrpe[36711]: Host 192.168.254.63 is not allowed to talk to us!
Dec 4 04:48:07 server nrpe[36713]: Host 192.168.254.63 is not allowed to talk to us!
Dec 4 04:48:07 server nrpe[36715]: Host 192.168.254.63 is not allowed to talk to us!
Dec 4 04:49:04 server nrpe[37324]: Host 192.168.254.63 is not allowed to talk to us!
Dec 4 04:49:04 server nrpe[37333]: Host 192.168.254.63 is not allowed to talk to us!
# 原因是因为切分、监控等程序造成的,全部kill就可以了
[root@server:~]# ps -ef|grep apache|grep -v grep
root 18475 18474 0 16:50 ? 00:00:00 /bin/sh -c /bin/bash /usr/local/worksh/monitor_apache_thread.sh > /dev/null 2>&1
root 18477 18475 0 16:50 ? 00:00:00 /bin/bash /usr/local/worksh/monitor_apache_thread.sh
root 26621 26618 0 17:00 ? 00:00:00 /bin/sh -c /bin/bash /usr/local/worksh/monitor_apache_thread.sh > /dev/null 2>&1
root 26623 26621 0 17:00 ? 00:00:00 /bin/bash /usr/local/worksh/monitor_apache_thread.sh
root 34354 34352 0 17:10 ? 00:00:00 /bin/sh -c /bin/bash /usr/local/worksh/monitor_apache_thread.sh > /dev/null 2>&1
root 34355 34354 0 17:10 ? 00:00:00 /bin/bash /usr/local/worksh/monitor_apache_thread.sh
root 41177 41175 0 17:20 ? 00:00:00 /bin/sh -c /bin/bash /usr/local/worksh/monitor_apache_thread.sh > /dev/null 2>&1
root 41178 41177 0 17:20 ? 00:00:00 /bin/bash /usr/local/worksh/monitor_apache_thread.sh
root 47964 47962 0 17:30 ? 00:00:00 /bin/sh -c /bin/bash /usr/local/worksh/monitor_apache_thread.sh > /dev/null 2>&1
root 47965 47964 0 17:30 ? 00:00:00 /bin/bash /usr/local/worksh/monitor_apache_thread.sh
root 49905 49904 0 14:20 ? 00:00:00 /bin/sh -c /bin/bash /usr/local/worksh/monitor_apache_thread.sh > /dev/null 2>&1
root 49907 49905 0 14:20 ? 00:00:03 /bin/bash /usr/local/worksh/monitor_apache_thread.sh
root 54555 54554 0 17:40 ? 00:00:00 /bin/sh -c /bin/bash /usr/local/worksh/monitor_apache_thread.sh > /dev/null 2>&1
root 54557 54555 0 17:40 ? 00:00:00 /bin/bash /usr/local/worksh/monitor_apache_thread.sh
root 56774 56773 0 14:30 ? 00:00:00 /bin/sh -c /bin/bash /usr/local/worksh/monitor_apache_thread.sh > /dev/null 2>&1
root 56775 56774 0 14:30 ? 00:00:03 /bin/bash /usr/local/worksh/monitor_apache_thread.sh
root 61962 61960 0 17:50 ? 00:00:00 /bin/sh -c /bin/bash /usr/local/worksh/monitor_apache_thread.sh > /dev/null 2>&1
root 61963 61962 0 17:50 ? 00:00:00 /bin/bash /usr/local/worksh/monitor_apache_thread.sh
root 70159 70158 0 17:57 ? 00:00:00 /usr/local/apache2/bin/rotatelogs -l /data/www/logs/apache_log/error/error.log.%Y-%m-%d 86400
root 70160 70158 0 17:57 ? 00:00:00 /usr/local/apache2/bin/rotatelogs -l /data/www/logs/apache_log/error/i-job.chinasoft.com_error.log.%Y-%m-%d 86400
root 70161 70158 0 17:57 ? 00:00:00 /usr/local/apache2/bin/rotatelogs -l /data/www/logs/apache_log/error/support.chinasoft.com.old_error.log.%Y-%m-%d 86400
root 70162 70158 0 17:57 ? 00:00:00 /usr/local/apache2/bin/rotatelogs -l /data/www/logs/apache_log/error/dlcbs.chinasoft.com_error.log.%Y-%m-%d 86400
root 70163 70158 0 17:57 ? 00:00:00 /usr/local/apache2/bin/rotatelogs -l /data/www/logs/apache_log/access/access.log.%Y-%m-%d 86400
root 70164 70158 0 17:57 ? 00:00:00 /usr/local/apache2/bin/rotatelogs -l /data/www/logs/apache_log/access/i-job.chinasoft.com_access.log.%Y-%m-%d 86400
root 70165 70158 0 17:57 ? 00:00:00 /usr/local/apache2/bin/rotatelogs -l /data/www/logs/apache_log/access/dlcbs.chinasoft.com_access.log.%Y-%m-%d 86400
apache 70166 70158 0 17:57 ? 00:00:00 /usr/local/httpd-2.2.26/bin/httpd -k start
apache 70167 70158 0 17:57 ? 00:00:00 /usr/local/httpd-2.2.26/bin/httpd -k start
apache 70168 70158 0 17:57 ? 00:00:00 /usr/local/httpd-2.2.26/bin/httpd -k start
apache 70169 70158 0 17:57 ? 00:00:00 /usr/local/httpd-2.2.26/bin/httpd -k start
apache 70170 70158 0 17:57 ? 00:00:00 /usr/local/httpd-2.2.26/bin/httpd -k start
apache 70171 70158 0 17:57 ? 00:00:00 /usr/local/httpd-2.2.26/bin/httpd -k start
apache 70172 70158 0 17:57 ? 00:00:00 /usr/local/httpd-2.2.26/bin/httpd -k start
apache 70173 70158 0 17:57 ? 00:00:00 /usr/local/httpd-2.2.26/bin/httpd -k start
apache 70174 70158 0 17:57 ? 00:00:00 /usr/local/httpd-2.2.26/bin/httpd -k start
apache 70175 70158 0 17:57 ? 00:00:00 /usr/local/httpd-2.2.26/bin/httpd -k start
root 84551 84548 0 06:00 ? 00:00:00 /bin/sh -c /bin/bash /usr/local/worksh/monitor_apache_thread.sh > /dev/null 2>&1
root 84553 84551 0 06:00 ? 00:00:23 /bin/bash /usr/local/worksh/monitor_apache_thread.sh
root 97069 97068 0 15:30 ? 00:00:00 /bin/sh -c /bin/bash /usr/local/worksh/monitor_apache_thread.sh > /dev/null 2>&1
root 97071 97069 0 15:30 ? 00:00:01 /bin/bash /usr/local/worksh/monitor_apache_thread.sh
root 109607 109605 0 15:50 ? 00:00:00 /bin/sh -c /bin/bash /usr/local/worksh/monitor_apache_thread.sh > /dev/null 2>&1
root 109608 109607 0 15:50 ? 00:00:01 /bin/bash /usr/local/worksh/monitor_apache_thread.sh
root 115643 115642 0 16:00 ? 00:00:00 /bin/sh -c /bin/bash /usr/local/worksh/monitor_apache_thread.sh > /dev/null 2>&1
root 115645 115643 0 16:00 ? 00:00:01 /bin/bash /usr/local/worksh/monitor_apache_thread.sh
[root@server:~]# ps -ef|grep apache|grep -v grep|awk '{print $2}'|xargs kill -9
[root:~]# ps -ef|grep apache
root 70590 70566 0 17:58 ? 00:00:00 /usr/local/apache2/bin/rotatelogs -l /data/www/logs/apache_log/access/access.log.%Y-%m-%d 86400
root 70591 70566 0 17:58 ? 00:00:00 /usr/local/apache2/bin/rotatelogs -l /data/www/logs/apache_log/access/i-job.chinasoft.com_access.log.%Y-%m-%d 86400
root 70592 70566 0 17:58 ? 00:00:00 /usr/local/apache2/bin/rotatelogs -l /data/www/logs/apache_log/access/dlcbs.chinasoft.com_access.log.%Y-%m-%d 86400
apache 70608 70566 0 17:58 ? 00:00:00 /usr/local/httpd-2.2.26/bin/httpd -k start
apache 70609 70566 0 17:58 ? 00:00:00 /usr/local/httpd-2.2.26/bin/httpd -k start
apache 70610 70566 0 17:58 ? 00:00:00 /usr/local/httpd-2.2.26/bin/httpd -k start
root 70612 35669 0 17:58 pts/0 00:00:00 grep apache
[root:~]# killall httpd
[root:~]# ipcs -s
------ Semaphore Arrays --------
key semid owner perms nsems
# 删除信号
for i in `ipcs -s | awk '/httpd/{ next; } {print $2}'`; do (ipcrm -s $i); done
apache无法启动报错No space left on device的更多相关文章
- Apache无法启动报错查看
wampserver橙色图标 查找原因 1.测试80端口 . 如已被占用,则改别的端口在启动apache.怎么改apache的的端口去百度一下都有. 2.找到httpd.exe的目录.在cmd命令行下 ...
- unzip失败,unzip:报错End-of-central-directory signature not found、scp:报错no space left on device
文章目录 问题 解决 拓展 问题 通过rz命令传本地文件到本地服务器,失败. 通过scp命令尝试报错: no space left on device 意思是目的机器内存不够用了,但是传过去了,但是没 ...
- Hbase master启动报错:Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster Caused by: java.net.UnknownHostException:
Hbase master启动报错: java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop ...
- 转 : Apache启动报错:could not bind to address [::]:443 解决办法
转:Apache启动报错:could not bind to address [::]:443 解决办法 安装Apache服务器的时候,报如下错误: Installing the 'apache' s ...
- 【报错】spring整合activeMQ,pom.xml文件缺架包,启动报错:Caused by: java.lang.ClassNotFoundException: org.apache.xbean.spring.context.v2.XBeanNamespaceHandler
spring版本:4.3.13 ActiveMq版本:5.15 ======================================================== spring整合act ...
- TOMCAT启动报错:org.apache.tomcat.jni.Error: 730055
TOMCAT启动报错:org.apache.tomcat.jni.Error: 730055 具体原因:不清楚 解决方式:重启应用服务器后,再启动tomcat就可以了 欢迎关注公众号,学习kettle ...
- 迅速解决!!!!!启动Tomcat报错PermGen space
启动Tomcat报错 PermGen space 内存溢出 解决方法:扩大tomcat内存 修改参数:set JAVA_OPTS=-Xms1024m -Xmx1024m -XX:PermSi ...
- Oracle启动报错ORA-03113解决
环境:RHEL6.4 + Oracle 11.2.0.4 步骤摘要:1.启动报错ORA-031132.查看alert日志查找原因3.根据实际情况采取合理的措施,这里我们先增加闪回区大小,把库启动起来4 ...
- Oracle启动报错ORA-27102解决
环境:RHEL5.5 + Oracle 10.2.0.4 此错误一般是因为数据库的初始化参数文件的内存设置不当导致.本例是因为操作系统参数设置问题导致. 当前现象:Oracle启动报错ORA-2710 ...
随机推荐
- js 对象 类型转换
对象不相等 var o = {x: 1}, p = {x: 1}; console.log(o == p); console.log(o === p); var arr1 = [], arr2 = [ ...
- SQL进阶随笔--case用法(一)
SQL进阶一整个是根据我看了pdf版本的整理以及自己的见解整理.后期也方便我自己查看和复习. CASE 表达式 CASE 表达式是从 SQL-92 标准开始被引入的.可能因为它是相对较新的技术,所以尽 ...
- 网络流学习(转载自ssw 的博客)
众所周知,网络流是探究网络上运输的一种图论分支.但是大多数人在第一次接触这个题时都有些畏惧感(比如说我),大佬可以自信跳过.. 本文包括: 1.网络流的概念及基本性质 2.略谈 Edmonds-Kar ...
- b树和hash树的应用场景
关系型数据库中,索引大多采用B/B+树来作为存储结构,而全文搜索引擎的索引则主要采用hash的存储结构,这两种数据结构有什么区别? 如果是等值查询,那么哈希索引明显有绝对优势,因为只需要经 ...
- [算法]浅谈求n范围以内的质数(素数)
汗颜,数学符号表达今天才学会呀-_-# 下面是百度百科对质数的定义 质数(prime number)又称素数,有无限个. 质数定义为在大于1的自然数中,除了1和它本身以外不再有其他因数. 求质数的方法 ...
- Go语言里的slice
1.切片是基于数组做的一层封装,灵活能够自动扩容. 2.切片的初始化方法 ①直接创建 ②基于已有的数组或切片 ③使用make来创建一个切片 第一个5是切片的大小 第二个5是切片的容量 3.基本操作 ① ...
- 论Scrapy中的数据持久化
引入 Scrapy的数据持久化,主要包括存储到数据库.文件以及内置数据存储. 那我们今天就来讲讲如何把Scrapy中的数据存储到数据库和文件当中. 终端指令存储 保证爬虫文件的parse方法中有可迭代 ...
- ZooKeeper集群与Leader选举
说说你对ZooKeeper集群与Leader选举的理解? ZooKeeper是一个开源分布式协调服务.分布式数据一致性解决方案.可基于ZooKeeper实现命名服务.集群管理.Master选举.分 ...
- Redis主从配置和哨兵监控配置——服务器端环境搭建
一:介绍 公司用到的redis框架,主要分为cluster的缓存集群和sentinel中的哨兵主从.这种的选用方式一般需要更具业务场景来做区分,两种框架的配置图为:右图为哨兵主从框架和cliuster ...
- Spring Boot学习总结三
1,mybatis在spring boot下的2种使用模式 无配置文件注解版 application.properties添加相关配置 mybatis.type-aliases-package=com ...