1
votes

I'm using opensips and I did the configuration exactly like the tutorial but when I run the command that start opensips there is an error My PID file doesn't exist how to create it? normally the PID file is created automatically

root@ubuntu:/var/run/opensips# sudo opensipsctl start

INFO: Starting OpenSIPS :

ERROR:

PID file /var/run/opensips/opensips.pid does not exist -- OpenSIPS start failed

2

2 Answers

0
votes

check /var/log/syslog becouse problem not in PID file.

opensips check if it started by checking if PID file exist.

0
votes

Here is the reasons may cause opensips fail to start step by step :

1. Check opensips for script errors

You can see it in logs as Erewin said or try to start opensips in debug mode:

sudo opensips -DEddd

If you see any errors - fix it

2. Check run directory exists and has right permissions

Here is mine

ls -ald /var/run/opensips
drwxr-xr-x. 2 opensips opensips 40 Jan  9 12:51 /var/run/opensips

3. Check pid file settings in opensipsctlrc

It should be

PID_FILE=/var/run/opensips/opensips.pid

Most probably in your case the opensips can't start because of errors (ex. 1) but lets leave other reasons here too in case some one else stuck with the same problem.