FMS(Flash Media Server)共享内存问题解决
1)FMS报错信息
Apr 16 10:21:56 LSCRtest2 Server[21642]: Process (21642) : shared memory (__FCS__serverstats_) init failed.
Apr 16 10:22:01 LSCRtest2 Server[21662]: Process (21662) : shared memory (__FCS__serverstats_) init failed.
2)据查是shm共享内存问题
1)FMS报错信息
Apr 16 10:21:56 LSCRtest2 Server[21642]: Process (21642) : shared memory (__FCS__serverstats_) init failed.
Apr 16 10:22:01 LSCRtest2 Server[21662]: Process (21662) : shared memory (__FCS__serverstats_) init failed.
2)据查是shm共享内存问题
3)查看共享内存情况
当时机器的共享内存设置情况为
[root@LSCRtest2 setup]# sysctl -a|grep kernel.shm
kernel.shmmni = 4096
kernel.shmall = 0
kernel.shmmax = 0
共享内存情况是
[root@LSCRtest2 setup]# ipcs
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
key shmid owner perms bytes nattch status
------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 163840 apache 600 1
0x00000000 196609 apache 600 1
0x00000000 229378 apache 600 1
key semid owner perms nsems
0x00000000 163840 apache 600 1
0x00000000 196609 apache 600 1
0x00000000 229378 apache 600 1
------ Message Queues --------
key msqid owner perms used-bytes messages
key msqid owner perms used-bytes messages
4)正常运行FMS的机器
共享内存的内核设置情况
[root@LSCRtest2 setup]# sysctl -a|grep kernel.shm
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.shmmax = 33554432
key msqid owner perms used-bytes messages
[root@LSCRtest2 setup]# sysctl -a|grep kernel.shm
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.shmmax = 33554432
key msqid owner perms used-bytes messages
[root@LSCRtest2 setup]# ipcs
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x410ffd3d 0 root 666 2097152 4
0x410f0d55 32769 nobody 666 2097152 4
0x410f0d5c 65538 nobody 666 1048576 3
0x410f0d83 98307 nobody 666 2097152 2
key shmid owner perms bytes nattch status
0x410ffd3d 0 root 666 2097152 4
0x410f0d55 32769 nobody 666 2097152 4
0x410f0d5c 65538 nobody 666 1048576 3
0x410f0d83 98307 nobody 666 2097152 2
------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 163840 apache 600 1
0x00000000 196609 apache 600 1
0x00000000 229378 apache 600 1
0x450f0d54 262147 root 666 1
0x450f0d5b 294916 root 666 1
0x450f0d66 327685 nobody 666 1
0x450f0d70 360454 nobody 666 1
0x450f0d74 393223 nobody 666 1
0x450f0d7e 425992 nobody 666 1
0x450f0d82 458761 nobody 666 1
0x450f0dd8 491530 root 666 1
0x450f0dda 524299 root 666 1
key semid owner perms nsems
0x00000000 163840 apache 600 1
0x00000000 196609 apache 600 1
0x00000000 229378 apache 600 1
0x450f0d54 262147 root 666 1
0x450f0d5b 294916 root 666 1
0x450f0d66 327685 nobody 666 1
0x450f0d70 360454 nobody 666 1
0x450f0d74 393223 nobody 666 1
0x450f0d7e 425992 nobody 666 1
0x450f0d82 458761 nobody 666 1
0x450f0dd8 491530 root 666 1
0x450f0dda 524299 root 666 1
------ Message Queues --------
5)更改/etc/sysctl.conf文件里面填加
kernel.shmall = 2097152
kernel.shmmax = 33554432
完成后sysctl -p生效,重启fms 正常
开始看到
http://forums.adobe.com/thread/416673这文章介绍的解决方法时走了一个弯路,以为是sysctl里面的mem相关的设置选项,呵呵,对共享内存不了解,看完另一篇文章的介绍时,我曾照他方法在/dev/shm下建了一个tmp目录给了1777权限链接到fms目录的tmp目录里,发现没有反应,最后查找关于shared memory failed 相关内容找到一篇有关于启动一个服务启动问题即共享内存问题,于是找到了解决的办法。