OpenSIPS Not Start

Issue:

OpenSIPS will not start. You may notice this issue because the log file is not growing (/var/log/messages) or no OpenSIPS process is available.

Log message:

[ospadmin@labrat-1 ~]$ ps -ef|grep opensips
ospadmin 19778 19687 0 16:05 pts/0 00:00:00 grep opensips
[ospadmin@labrat-1 ~]$

instead of this:

[ospadmin@labrat-1 ~]$ ps -ef|grep opensips
ospadmin 27054 1 0 Jan21 ? 00:00:00 /home/ospadmin/OSP/OSPreyPackage/opensips/sbin/opensips -m 512
ospadmin 27055 27054 0 Jan21 ? 00:00:00 /home/ospadmin/OSP/OSPreyPackage/opensips/sbin/opensips -m 512
ospadmin 27056 27054 0 Jan21 ? 00:00:00 /home/ospadmin/OSP/OSPreyPackage/opensips/sbin/opensips -m 512
ospadmin 27057 27054 0 Jan21 ? 00:00:00 /home/ospadmin/OSP/OSPreyPackage/opensips/sbin/opensips -m 512
# tail -f /var/log/messages
Jan 11 20:39:01 osprey opensips: INFO:core:cleanup: cleanup
Jan 11 20:40:01 osprey opensips: CRITICAL:core:shm_getmem: could not attach shared memory segment: Cannot allocate memory
Jan 11 20:40:01 osprey opensips: CRITICAL:core:init_shm_mallocs: could not initialize shared memory pool, exiting...

Solution:

More RAM should be added to the system because the system cannot allocate memory for the applications. 16G is the recommended minimum. Example:

$ grep MemTotal /proc/meminfo
MemTotal: 8173516 kB
[ospadmin@osprey ~]$