apache 无法启动故障排查
2008-06-13 17:21
309 查看
今天在F5上逛,发现某个ip下面的机器的80和443端口down了。
于是手动重启,结果发现apachectl start,可以正常启动,apachectl startssl却不行
查看log
[Wed Apr 16 08:54:52 2008] [warn] pid file /usr/local/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Fri Jun 13 11:59:24 2008] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
semget: 设备上没有空间
网上查了半天也无解。试图删除/usr/local/apache/logs/httpd.pid再重启也不行。
问同事才知道
使用ipcs查看系统的信号量,发现是信号量sem已经满了,所以导致startssl无法启动。
据说是如果apache没有正常Stop掉的话,它的信号量是不会自动清除的,导致其一直滞留在内存中
于是,用以下命令清除sem信号量后,apache就可以正常启动了:
for i in `ipcs | grep nobody | awk '{print $2}'`; do ipcrm -s $i; done
看来,以后我们需要慎用killall -9 httpd,尽量使apache能正常的stop
[root@l_192_168_131_164 log]# ipcs
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 7143424 root 600 184324 74 dest
------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 0 nobody 600 1
0x00000000 32769 nobody 600 1
0x00000000 65538 nobody 600 1
。。。。。。。。。
。。。。。。。。。
0x00000000 98307 nobody 600 1
------ Message Queues --------
key msqid owner perms used-bytes messages
可以看到很多
清除了就可以了
for i in `ipcs | grep nobody | awk '{print $2}'`; do ipcrm -s $i; done
然后再查看
[root@l_192_168_132_089 /root]# ipcs
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 8552448 root 600 184324 74 dest
------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 8486912 nobody 600 1
------ Message Queues --------
key msqid owner perms used-bytes messages
没有那么多了。
再重新启动apache,这次正常启动了
另外一个问题,就是日志是用中文输出的,对应的错误提示在网上无法搜到,而对应的英文
semget: 设备上没有空间
semget: No space left on device
在google上很容易找到结果。看来以后要把服务器的默认语言设置为英文才行。
#export LC_ALL=en_US
#locale
于是手动重启,结果发现apachectl start,可以正常启动,apachectl startssl却不行
查看log
[Wed Apr 16 08:54:52 2008] [warn] pid file /usr/local/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Fri Jun 13 11:59:24 2008] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
semget: 设备上没有空间
网上查了半天也无解。试图删除/usr/local/apache/logs/httpd.pid再重启也不行。
问同事才知道
使用ipcs查看系统的信号量,发现是信号量sem已经满了,所以导致startssl无法启动。
据说是如果apache没有正常Stop掉的话,它的信号量是不会自动清除的,导致其一直滞留在内存中
于是,用以下命令清除sem信号量后,apache就可以正常启动了:
for i in `ipcs | grep nobody | awk '{print $2}'`; do ipcrm -s $i; done
看来,以后我们需要慎用killall -9 httpd,尽量使apache能正常的stop
[root@l_192_168_131_164 log]# ipcs
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 7143424 root 600 184324 74 dest
------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 0 nobody 600 1
0x00000000 32769 nobody 600 1
0x00000000 65538 nobody 600 1
。。。。。。。。。
。。。。。。。。。
0x00000000 98307 nobody 600 1
------ Message Queues --------
key msqid owner perms used-bytes messages
可以看到很多
清除了就可以了
for i in `ipcs | grep nobody | awk '{print $2}'`; do ipcrm -s $i; done
然后再查看
[root@l_192_168_132_089 /root]# ipcs
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 8552448 root 600 184324 74 dest
------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 8486912 nobody 600 1
------ Message Queues --------
key msqid owner perms used-bytes messages
没有那么多了。
再重新启动apache,这次正常启动了
另外一个问题,就是日志是用中文输出的,对应的错误提示在网上无法搜到,而对应的英文
semget: 设备上没有空间
semget: No space left on device
在google上很容易找到结果。看来以后要把服务器的默认语言设置为英文才行。
#export LC_ALL=en_US
#locale
相关文章推荐
- apache 无法启动故障排查
- apache 无法启动故障排查
- 本地计算机无法启动Apache故障处理
- 本地计算机无法启动Apache故障处理
- mysql数据启动大量报错且无法启动(The InnoDB memory heap is disabled,Status: NOT_KILLED)故障排查
- window 下的 apache 无法启动排查
- 本地计算机无法启动Apache故障处理
- Apache服务无法启动问题排查
- [故障]-[Linux] Apache服务无法启动
- 安装XAMPP后 无法启动apache服务故障处理
- apache使用cronolog日志轮询无法启动排查错误记录
- Tomcat无法启动,报错java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
- vsphere主机开机无法启动故障一例。
- win10下xampp中apache无法启动的问题
- 80端口没有被占用,wampapache服务却无法启动
- 装完apache无法启动,提示the requested operation has failed
- nginx删除apache无法启动问题
- Mac OSX的Apache无法启动,没有错误提示
- 解决Apache服务器无法启动
- APMServ中的 Apache无法启动…