Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-20 Thread Nabeel
Thanks to a suggestion from Aron, I have now solved this problem.  The file
causing the permission error requires the '/usr/local' prefix in its
filepath, which the service file doesn't have.  The PID filepath is also
incorrect and the EnvironmentFile value should be '-/etc/default/opensips',
not '-/etc/sysconfig/opensips' like in the fedora package.

I am posting my working service file below for CentOS and I hope this gets
included in the future releases of OpenSIPS.

[Unit]
> Description=OpenSIPS is a very fast and flexible SIP (RFC3261) server
> After=network.target mariadb.service


> [Service]
> Type=forking
> User=root
> Group=root
> EnvironmentFile=-/etc/default/opensips
> PIDFile=/var/run/opensips.pid
> ExecStart=/usr/local/sbin/opensips -P /var/run/opensips.pid -f
> /usr/local/etc/opensips/opensips.cfg $OPTIONS
> ExecStartPre=/usr/local/sbin/opensips -c -f
> /usr/local/etc/opensips/opensips.cfg
> Restart=always
> TimeoutStopSec=30s
> [Install]
> WantedBy=multi-user.target
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-20 Thread sevpal
Does it start in the usual way with “opensipsctl start”? If not, try to fix 
that method of starting, check /etc/opensips/opensipsctrl. 

Some things you might want to check.
With systemd , opensips cannot normally create files in /tmp or /var/run. for 
your pid file directory, create /var/run/opensips from /etc/rc.d/rc.local on 
each boot as /var/run is cleaned on shutdown.

From: Nabeel 
Sent: Sunday, September 20, 2015 1:11 AM
To: Podrigal, Aron ; OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] Restart=always and After=mysql.service

No, I just compiled and installed OpenSIPS in the normal manner while logged in 
as root.

On 20 September 2015 at 06:00, Podrigal, Aron <ar...@guaranteedplus.com> wrote:

  Are you running this on a container / chrooted env?

  On Sun, Sep 20, 2015 at 12:39 AM, Nabeel <nabeelshik...@gmail.com> wrote:

This is what it says:

  Sep 20 05:21:45 server1.sipdomain.com systemd[1]: Starting OpenSIPS is a 
very fast and flexible SIP (RFC3261) server...
  -- Subject: Unit opensips.service has begun with start-up
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  --
  -- Unit opensips.service has begun starting up.
  Sep 20 05:21:45 server1.sipdomain.com systemd[4022]: Failed at step EXEC 
spawning /usr/sbin/opensips: Permission denied
  -- Subject: Process /usr/sbin/opensips could not be executed
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  --
  -- The process /usr/sbin/opensips could not be executed and failed.
  --
  -- The error number returned while executing this process is 13.
  Sep 20 05:21:45 server1.sipdomain.com systemd[1]: opensips.service: 
control process exited, code=exited status=203
  Sep 20 05:21:45 server1.sipdomain.com systemd[1]: Failed to start 
OpenSIPS is a very fast and flexible SIP (RFC3261) server.
  -- Subject: Unit opensips.service has failed
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  --
  -- Unit opensips.service has failed.
  --
  -- The result is failed.
  Sep 20 05:21:45 server1.sipdomain.com systemd[1]: Unit opensips.service 
entered failed state.


On 20 September 2015 at 05:12, Podrigal, Aron <ar...@guaranteedplus.com> 
wrote:

  Do you see anything informative in your journal after trying to start 
opensips? 

  sudo journalctl -xn 350


  On Sat, Sep 19, 2015 at 11:46 PM, Nabeel <nabeelshik...@gmail.com> wrote:

Please see the strace output at these links: 

http://pastebin.com/G1Uv5s1E


http://pastebin.com/gnesw4tW


On 20 September 2015 at 04:30, Podrigal, Aron 
<ar...@guaranteedplus.com> wrote:

  Can you post the strace output by running 

  sudo strace -ff -o /tmp/opensips_strace_output systemctl start 
opensips.service

  cat /tmp/opensips_strace_output*

  That will help see where the error occurs.

  On Sat, Sep 19, 2015 at 11:21 PM, Nabeel <nabeelshik...@gmail.com> 
wrote:

Why can't the service file be automatically generated at the time 
of installation/compilation on the relevant OS?  
It seems to be quite a basic feature missing.

On 20 September 2015 at 04:16, Nabeel <nabeelshik...@gmail.com> 
wrote:

  Unfortunately, changing the user/group to 'root' did not work 
either. 

  The same error occurs and OpenSIPS fails to start:


Failed at step EXEC spawning /usr/sbin/opensips: Permission 
denied

  Hasn't anyone else seen this on CentOS?


  On 18 September 2015 at 22:21, sevpal <sev...@aol.com> wrote:

If you change User= and Group= in the service file to root, you 
might not see such a message. To run as user opensips, then user opensips must 
exist on the system; in addition, ownership on files/folders that will be 
accessed by Opensips needs to be changed.
From: Nabeel 
Sent: Tuesday, September 15, 2015 9:47 PM
To: OpenSIPS users mailling list 
    Subject: Re: [OpenSIPS-Users] Restart=always and 
After=mysql.service

I tried that service file on CentOS 7 but got the following 
error when trying to start the service: 


  Failed at step EXEC spawning /usr/sbin/opensips: Permission 
denied


Changing permissions of that directory did not solve the 
problem:


chmod +x /usr/sbin/opensips


chmod -R 777 /usr/sbin/opensips 


Does the service file need modification for CentOS?




On 7 September 2015 at 19:14, Nabeel <nabeelshik...@gmail.com> 
wrote:

  Hi, 


  Most of my services have a .service fi

Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-19 Thread Podrigal, Aron
Are you running this on a container / chrooted env?

On Sun, Sep 20, 2015 at 12:39 AM, Nabeel <nabeelshik...@gmail.com> wrote:

> This is what it says:
>
>
>> Sep 20 05:21:45 server1.sipdomain.com systemd[1]: Starting OpenSIPS is a
>> very fast and flexible SIP (RFC3261) server...
>> -- Subject: Unit opensips.service has begun with start-up
>> -- Defined-By: systemd
>> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>> --
>> -- Unit opensips.service has begun starting up.
>> Sep 20 05:21:45 server1.sipdomain.com systemd[4022]: Failed at step EXEC
>> spawning /usr/sbin/opensips: Permission denied
>> -- Subject: Process /usr/sbin/opensips could not be executed
>> -- Defined-By: systemd
>> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>> --
>> -- The process /usr/sbin/opensips could not be executed and failed.
>> --
>> -- The error number returned while executing this process is 13.
>> Sep 20 05:21:45 server1.sipdomain.com systemd[1]: opensips.service:
>> control process exited, code=exited status=203
>> Sep 20 05:21:45 server1.sipdomain.com systemd[1]: Failed to start
>> OpenSIPS is a very fast and flexible SIP (RFC3261) server.
>> -- Subject: Unit opensips.service has failed
>> -- Defined-By: systemd
>> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>> --
>> -- Unit opensips.service has failed.
>> --
>> -- The result is failed.
>> Sep 20 05:21:45 server1.sipdomain.com systemd[1]: Unit opensips.service
>> entered failed state.
>
>
>
> On 20 September 2015 at 05:12, Podrigal, Aron <ar...@guaranteedplus.com>
> wrote:
>
>> Do you see anything informative in your journal after trying to start
>> opensips?
>>
>> sudo journalctl -xn 350
>>
>> On Sat, Sep 19, 2015 at 11:46 PM, Nabeel <nabeelshik...@gmail.com> wrote:
>>
>>> Please see the strace output at these links:
>>>
>>> http://pastebin.com/G1Uv5s1E
>>>
>>> http://pastebin.com/gnesw4tW
>>>
>>> On 20 September 2015 at 04:30, Podrigal, Aron <ar...@guaranteedplus.com>
>>> wrote:
>>>
>>>> Can you post the strace output by running
>>>>
>>>> sudo strace -ff -o /tmp/opensips_strace_output systemctl start
>>>> opensips.service
>>>> cat /tmp/opensips_strace_output*
>>>>
>>>> That will help see where the error occurs.
>>>>
>>>> On Sat, Sep 19, 2015 at 11:21 PM, Nabeel <nabeelshik...@gmail.com>
>>>> wrote:
>>>>
>>>>> Why can't the service file be automatically generated at the time of
>>>>> installation/compilation on the relevant OS?
>>>>> It seems to be quite a basic feature missing.
>>>>>
>>>>> On 20 September 2015 at 04:16, Nabeel <nabeelshik...@gmail.com> wrote:
>>>>>
>>>>>> Unfortunately, changing the user/group to 'root' did not work either.
>>>>>>
>>>>>> The same error occurs and OpenSIPS fails to start:
>>>>>>
>>>>>> Failed at step EXEC spawning /usr/sbin/opensips: Permission denied
>>>>>>
>>>>>>
>>>>>>  Hasn't anyone else seen this on CentOS?
>>>>>>
>>>>>>
>>>>>> On 18 September 2015 at 22:21, sevpal <sev...@aol.com> wrote:
>>>>>>
>>>>>>> If you change User= and Group= in the service file to root, you
>>>>>>> might not see such a message. To run as user opensips, then user 
>>>>>>> opensips
>>>>>>> must exist on the system; in addition, ownership on files/folders that 
>>>>>>> will
>>>>>>> be accessed by Opensips needs to be changed.
>>>>>>> *From:* Nabeel <nabeelshik...@gmail.com>
>>>>>>> *Sent:* Tuesday, September 15, 2015 9:47 PM
>>>>>>> *To:* OpenSIPS users mailling list <users@lists.opensips.org>
>>>>>>> *Subject:* Re: [OpenSIPS-Users] Restart=always and
>>>>>>> After=mysql.service
>>>>>>>
>>>>>>> I tried that service file on CentOS 7 but got the following error
>>>>>>> when trying to start the service:
>>>>>>>
>>>>>>> Failed at step EXEC spawning /usr/sbin/opensips: Permission denied
>>>>>>

Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-19 Thread Nabeel
No, I just compiled and installed OpenSIPS in the normal manner while
logged in as root.

On 20 September 2015 at 06:00, Podrigal, Aron <ar...@guaranteedplus.com>
wrote:

> Are you running this on a container / chrooted env?
>
> On Sun, Sep 20, 2015 at 12:39 AM, Nabeel <nabeelshik...@gmail.com> wrote:
>
>> This is what it says:
>>
>>
>>> Sep 20 05:21:45 server1.sipdomain.com systemd[1]: Starting OpenSIPS is
>>> a very fast and flexible SIP (RFC3261) server...
>>> -- Subject: Unit opensips.service has begun with start-up
>>> -- Defined-By: systemd
>>> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>>> --
>>> -- Unit opensips.service has begun starting up.
>>> Sep 20 05:21:45 server1.sipdomain.com systemd[4022]: Failed at step
>>> EXEC spawning /usr/sbin/opensips: Permission denied
>>> -- Subject: Process /usr/sbin/opensips could not be executed
>>> -- Defined-By: systemd
>>> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>>> --
>>> -- The process /usr/sbin/opensips could not be executed and failed.
>>> --
>>> -- The error number returned while executing this process is 13.
>>> Sep 20 05:21:45 server1.sipdomain.com systemd[1]: opensips.service:
>>> control process exited, code=exited status=203
>>> Sep 20 05:21:45 server1.sipdomain.com systemd[1]: Failed to start
>>> OpenSIPS is a very fast and flexible SIP (RFC3261) server.
>>> -- Subject: Unit opensips.service has failed
>>> -- Defined-By: systemd
>>> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>>> --
>>> -- Unit opensips.service has failed.
>>> --
>>> -- The result is failed.
>>> Sep 20 05:21:45 server1.sipdomain.com systemd[1]: Unit opensips.service
>>> entered failed state.
>>
>>
>>
>> On 20 September 2015 at 05:12, Podrigal, Aron <ar...@guaranteedplus.com>
>> wrote:
>>
>>> Do you see anything informative in your journal after trying to start
>>> opensips?
>>>
>>> sudo journalctl -xn 350
>>>
>>> On Sat, Sep 19, 2015 at 11:46 PM, Nabeel <nabeelshik...@gmail.com>
>>> wrote:
>>>
>>>> Please see the strace output at these links:
>>>>
>>>> http://pastebin.com/G1Uv5s1E
>>>>
>>>> http://pastebin.com/gnesw4tW
>>>>
>>>> On 20 September 2015 at 04:30, Podrigal, Aron <ar...@guaranteedplus.com
>>>> > wrote:
>>>>
>>>>> Can you post the strace output by running
>>>>>
>>>>> sudo strace -ff -o /tmp/opensips_strace_output systemctl start
>>>>> opensips.service
>>>>> cat /tmp/opensips_strace_output*
>>>>>
>>>>> That will help see where the error occurs.
>>>>>
>>>>> On Sat, Sep 19, 2015 at 11:21 PM, Nabeel <nabeelshik...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Why can't the service file be automatically generated at the time of
>>>>>> installation/compilation on the relevant OS?
>>>>>> It seems to be quite a basic feature missing.
>>>>>>
>>>>>> On 20 September 2015 at 04:16, Nabeel <nabeelshik...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Unfortunately, changing the user/group to 'root' did not work either.
>>>>>>>
>>>>>>> The same error occurs and OpenSIPS fails to start:
>>>>>>>
>>>>>>> Failed at step EXEC spawning /usr/sbin/opensips: Permission denied
>>>>>>>
>>>>>>>
>>>>>>>  Hasn't anyone else seen this on CentOS?
>>>>>>>
>>>>>>>
>>>>>>> On 18 September 2015 at 22:21, sevpal <sev...@aol.com> wrote:
>>>>>>>
>>>>>>>> If you change User= and Group= in the service file to root, you
>>>>>>>> might not see such a message. To run as user opensips, then user 
>>>>>>>> opensips
>>>>>>>> must exist on the system; in addition, ownership on files/folders that 
>>>>>>>> will
>>>>>>>> be accessed by Opensips needs to be changed.
>>>>>>>> *From:* Nabeel <nabeelshik...@gmail.com>
>>>>>>>> *Sent:* Tuesday, September 15, 2015 9:47

Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-19 Thread Nabeel
This is what it says:


> Sep 20 05:21:45 server1.sipdomain.com systemd[1]: Starting OpenSIPS is a
> very fast and flexible SIP (RFC3261) server...
> -- Subject: Unit opensips.service has begun with start-up
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> --
> -- Unit opensips.service has begun starting up.
> Sep 20 05:21:45 server1.sipdomain.com systemd[4022]: Failed at step EXEC
> spawning /usr/sbin/opensips: Permission denied
> -- Subject: Process /usr/sbin/opensips could not be executed
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> --
> -- The process /usr/sbin/opensips could not be executed and failed.
> --
> -- The error number returned while executing this process is 13.
> Sep 20 05:21:45 server1.sipdomain.com systemd[1]: opensips.service:
> control process exited, code=exited status=203
> Sep 20 05:21:45 server1.sipdomain.com systemd[1]: Failed to start
> OpenSIPS is a very fast and flexible SIP (RFC3261) server.
> -- Subject: Unit opensips.service has failed
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> --
> -- Unit opensips.service has failed.
> --
> -- The result is failed.
> Sep 20 05:21:45 server1.sipdomain.com systemd[1]: Unit opensips.service
> entered failed state.



On 20 September 2015 at 05:12, Podrigal, Aron <ar...@guaranteedplus.com>
wrote:

> Do you see anything informative in your journal after trying to start
> opensips?
>
> sudo journalctl -xn 350
>
> On Sat, Sep 19, 2015 at 11:46 PM, Nabeel <nabeelshik...@gmail.com> wrote:
>
>> Please see the strace output at these links:
>>
>> http://pastebin.com/G1Uv5s1E
>>
>> http://pastebin.com/gnesw4tW
>>
>> On 20 September 2015 at 04:30, Podrigal, Aron <ar...@guaranteedplus.com>
>> wrote:
>>
>>> Can you post the strace output by running
>>>
>>> sudo strace -ff -o /tmp/opensips_strace_output systemctl start
>>> opensips.service
>>> cat /tmp/opensips_strace_output*
>>>
>>> That will help see where the error occurs.
>>>
>>> On Sat, Sep 19, 2015 at 11:21 PM, Nabeel <nabeelshik...@gmail.com>
>>> wrote:
>>>
>>>> Why can't the service file be automatically generated at the time of
>>>> installation/compilation on the relevant OS?
>>>> It seems to be quite a basic feature missing.
>>>>
>>>> On 20 September 2015 at 04:16, Nabeel <nabeelshik...@gmail.com> wrote:
>>>>
>>>>> Unfortunately, changing the user/group to 'root' did not work either.
>>>>>
>>>>> The same error occurs and OpenSIPS fails to start:
>>>>>
>>>>> Failed at step EXEC spawning /usr/sbin/opensips: Permission denied
>>>>>
>>>>>
>>>>>  Hasn't anyone else seen this on CentOS?
>>>>>
>>>>>
>>>>> On 18 September 2015 at 22:21, sevpal <sev...@aol.com> wrote:
>>>>>
>>>>>> If you change User= and Group= in the service file to root, you might
>>>>>> not see such a message. To run as user opensips, then user opensips must
>>>>>> exist on the system; in addition, ownership on files/folders that will be
>>>>>> accessed by Opensips needs to be changed.
>>>>>> *From:* Nabeel <nabeelshik...@gmail.com>
>>>>>> *Sent:* Tuesday, September 15, 2015 9:47 PM
>>>>>> *To:* OpenSIPS users mailling list <users@lists.opensips.org>
>>>>>> *Subject:* Re: [OpenSIPS-Users] Restart=always and
>>>>>> After=mysql.service
>>>>>>
>>>>>> I tried that service file on CentOS 7 but got the following error
>>>>>> when trying to start the service:
>>>>>>
>>>>>> Failed at step EXEC spawning /usr/sbin/opensips: Permission denied
>>>>>>
>>>>>>
>>>>>> Changing permissions of that directory did not solve the problem:
>>>>>>
>>>>>> chmod +x /usr/sbin/opensips
>>>>>>
>>>>>> chmod -R 777 /usr/sbin/opensips
>>>>>>
>>>>>> Does the service file need modification for CentOS?
>>>>>>
>>>>>>
>>>>>> On 7 September 2015 at 19:14, Nabeel <nabeelshik...@gmail.com> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>

Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-19 Thread Nabeel
Why can't the service file be automatically generated at the time of
installation/compilation on the relevant OS?
It seems to be quite a basic feature missing.

On 20 September 2015 at 04:16, Nabeel <nabeelshik...@gmail.com> wrote:

> Unfortunately, changing the user/group to 'root' did not work either.
>
> The same error occurs and OpenSIPS fails to start:
>
> Failed at step EXEC spawning /usr/sbin/opensips: Permission denied
>
>
>  Hasn't anyone else seen this on CentOS?
>
>
> On 18 September 2015 at 22:21, sevpal <sev...@aol.com> wrote:
>
>> If you change User= and Group= in the service file to root, you might not
>> see such a message. To run as user opensips, then user opensips must exist
>> on the system; in addition, ownership on files/folders that will be
>> accessed by Opensips needs to be changed.
>> *From:* Nabeel <nabeelshik...@gmail.com>
>> *Sent:* Tuesday, September 15, 2015 9:47 PM
>> *To:* OpenSIPS users mailling list <users@lists.opensips.org>
>> *Subject:* Re: [OpenSIPS-Users] Restart=always and After=mysql.service
>>
>> I tried that service file on CentOS 7 but got the following error when
>> trying to start the service:
>>
>> Failed at step EXEC spawning /usr/sbin/opensips: Permission denied
>>
>>
>> Changing permissions of that directory did not solve the problem:
>>
>> chmod +x /usr/sbin/opensips
>>
>> chmod -R 777 /usr/sbin/opensips
>>
>> Does the service file need modification for CentOS?
>>
>>
>> On 7 September 2015 at 19:14, Nabeel <nabeelshik...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> Most of my services have a .service file located at
>>> /usr/lib/systemd/system where I can set 'Restart=always' or
>>> 'After=mysql.service' / 'After=mariadb.service' to make sure the server
>>> starts at the appropriate times.
>>>
>>> However, there is no such .service file for OpenSIPS.  Please advise how
>>> to create this .service file for OpenSIPS.  I heard about 'respawn' but
>>> don't know how exactly to use this and would prefer to use a .service file
>>> like other services.
>>>
>>
>>
>> --
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-19 Thread Nabeel
Please see the strace output at these links:

http://pastebin.com/G1Uv5s1E

http://pastebin.com/gnesw4tW

On 20 September 2015 at 04:30, Podrigal, Aron <ar...@guaranteedplus.com>
wrote:

> Can you post the strace output by running
>
> sudo strace -ff -o /tmp/opensips_strace_output systemctl start
> opensips.service
> cat /tmp/opensips_strace_output*
>
> That will help see where the error occurs.
>
> On Sat, Sep 19, 2015 at 11:21 PM, Nabeel <nabeelshik...@gmail.com> wrote:
>
>> Why can't the service file be automatically generated at the time of
>> installation/compilation on the relevant OS?
>> It seems to be quite a basic feature missing.
>>
>> On 20 September 2015 at 04:16, Nabeel <nabeelshik...@gmail.com> wrote:
>>
>>> Unfortunately, changing the user/group to 'root' did not work either.
>>>
>>> The same error occurs and OpenSIPS fails to start:
>>>
>>> Failed at step EXEC spawning /usr/sbin/opensips: Permission denied
>>>
>>>
>>>  Hasn't anyone else seen this on CentOS?
>>>
>>>
>>> On 18 September 2015 at 22:21, sevpal <sev...@aol.com> wrote:
>>>
>>>> If you change User= and Group= in the service file to root, you might
>>>> not see such a message. To run as user opensips, then user opensips must
>>>> exist on the system; in addition, ownership on files/folders that will be
>>>> accessed by Opensips needs to be changed.
>>>> *From:* Nabeel <nabeelshik...@gmail.com>
>>>> *Sent:* Tuesday, September 15, 2015 9:47 PM
>>>> *To:* OpenSIPS users mailling list <users@lists.opensips.org>
>>>> *Subject:* Re: [OpenSIPS-Users] Restart=always and After=mysql.service
>>>>
>>>> I tried that service file on CentOS 7 but got the following error when
>>>> trying to start the service:
>>>>
>>>> Failed at step EXEC spawning /usr/sbin/opensips: Permission denied
>>>>
>>>>
>>>> Changing permissions of that directory did not solve the problem:
>>>>
>>>> chmod +x /usr/sbin/opensips
>>>>
>>>> chmod -R 777 /usr/sbin/opensips
>>>>
>>>> Does the service file need modification for CentOS?
>>>>
>>>>
>>>> On 7 September 2015 at 19:14, Nabeel <nabeelshik...@gmail.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Most of my services have a .service file located at
>>>>> /usr/lib/systemd/system where I can set 'Restart=always' or
>>>>> 'After=mysql.service' / 'After=mariadb.service' to make sure the server
>>>>> starts at the appropriate times.
>>>>>
>>>>> However, there is no such .service file for OpenSIPS.  Please advise
>>>>> how to create this .service file for OpenSIPS.  I heard about 'respawn' 
>>>>> but
>>>>> don't know how exactly to use this and would prefer to use a .service file
>>>>> like other services.
>>>>>
>>>>
>>>>
>>>> --
>>>> ___
>>>> Users mailing list
>>>> Users@lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>> ___
>>>> Users mailing list
>>>> Users@lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
>
> --
> Aron Podrigal
> -
> '101', '1110010', '110', '1101110'   '101', '110',
> '1100100', '1110010', '1101001', '1100111', '111', '1101100'
>
> P: '2b', '31', '33', '34', '37', '34', '35', '38', '36', '30', '39', '39'
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-19 Thread Podrigal, Aron
Can you post the strace output by running

sudo strace -ff -o /tmp/opensips_strace_output systemctl start
opensips.service
cat /tmp/opensips_strace_output*

That will help see where the error occurs.

On Sat, Sep 19, 2015 at 11:21 PM, Nabeel <nabeelshik...@gmail.com> wrote:

> Why can't the service file be automatically generated at the time of
> installation/compilation on the relevant OS?
> It seems to be quite a basic feature missing.
>
> On 20 September 2015 at 04:16, Nabeel <nabeelshik...@gmail.com> wrote:
>
>> Unfortunately, changing the user/group to 'root' did not work either.
>>
>> The same error occurs and OpenSIPS fails to start:
>>
>> Failed at step EXEC spawning /usr/sbin/opensips: Permission denied
>>
>>
>>  Hasn't anyone else seen this on CentOS?
>>
>>
>> On 18 September 2015 at 22:21, sevpal <sev...@aol.com> wrote:
>>
>>> If you change User= and Group= in the service file to root, you might
>>> not see such a message. To run as user opensips, then user opensips must
>>> exist on the system; in addition, ownership on files/folders that will be
>>> accessed by Opensips needs to be changed.
>>> *From:* Nabeel <nabeelshik...@gmail.com>
>>> *Sent:* Tuesday, September 15, 2015 9:47 PM
>>> *To:* OpenSIPS users mailling list <users@lists.opensips.org>
>>> *Subject:* Re: [OpenSIPS-Users] Restart=always and After=mysql.service
>>>
>>> I tried that service file on CentOS 7 but got the following error when
>>> trying to start the service:
>>>
>>> Failed at step EXEC spawning /usr/sbin/opensips: Permission denied
>>>
>>>
>>> Changing permissions of that directory did not solve the problem:
>>>
>>> chmod +x /usr/sbin/opensips
>>>
>>> chmod -R 777 /usr/sbin/opensips
>>>
>>> Does the service file need modification for CentOS?
>>>
>>>
>>> On 7 September 2015 at 19:14, Nabeel <nabeelshik...@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> Most of my services have a .service file located at
>>>> /usr/lib/systemd/system where I can set 'Restart=always' or
>>>> 'After=mysql.service' / 'After=mariadb.service' to make sure the server
>>>> starts at the appropriate times.
>>>>
>>>> However, there is no such .service file for OpenSIPS.  Please advise
>>>> how to create this .service file for OpenSIPS.  I heard about 'respawn' but
>>>> don't know how exactly to use this and would prefer to use a .service file
>>>> like other services.
>>>>
>>>
>>>
>>> --
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>


-- 
Aron Podrigal
-
'101', '1110010', '110', '1101110'   '101', '110',
'1100100', '1110010', '1101001', '1100111', '111', '1101100'

P: '2b', '31', '33', '34', '37', '34', '35', '38', '36', '30', '39', '39'
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-19 Thread Nabeel
Unfortunately, changing the user/group to 'root' did not work either.

The same error occurs and OpenSIPS fails to start:

Failed at step EXEC spawning /usr/sbin/opensips: Permission denied


 Hasn't anyone else seen this on CentOS?


On 18 September 2015 at 22:21, sevpal <sev...@aol.com> wrote:

> If you change User= and Group= in the service file to root, you might not
> see such a message. To run as user opensips, then user opensips must exist
> on the system; in addition, ownership on files/folders that will be
> accessed by Opensips needs to be changed.
> *From:* Nabeel <nabeelshik...@gmail.com>
> *Sent:* Tuesday, September 15, 2015 9:47 PM
> *To:* OpenSIPS users mailling list <users@lists.opensips.org>
> *Subject:* Re: [OpenSIPS-Users] Restart=always and After=mysql.service
>
> I tried that service file on CentOS 7 but got the following error when
> trying to start the service:
>
> Failed at step EXEC spawning /usr/sbin/opensips: Permission denied
>
>
> Changing permissions of that directory did not solve the problem:
>
> chmod +x /usr/sbin/opensips
>
> chmod -R 777 /usr/sbin/opensips
>
> Does the service file need modification for CentOS?
>
>
> On 7 September 2015 at 19:14, Nabeel <nabeelshik...@gmail.com> wrote:
>
>> Hi,
>>
>> Most of my services have a .service file located at
>> /usr/lib/systemd/system where I can set 'Restart=always' or
>> 'After=mysql.service' / 'After=mariadb.service' to make sure the server
>> starts at the appropriate times.
>>
>> However, there is no such .service file for OpenSIPS.  Please advise how
>> to create this .service file for OpenSIPS.  I heard about 'respawn' but
>> don't know how exactly to use this and would prefer to use a .service file
>> like other services.
>>
>
>
> --
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-19 Thread Podrigal, Aron
Do you see anything informative in your journal after trying to start
opensips?

sudo journalctl -xn 350

On Sat, Sep 19, 2015 at 11:46 PM, Nabeel <nabeelshik...@gmail.com> wrote:

> Please see the strace output at these links:
>
> http://pastebin.com/G1Uv5s1E
>
> http://pastebin.com/gnesw4tW
>
> On 20 September 2015 at 04:30, Podrigal, Aron <ar...@guaranteedplus.com>
> wrote:
>
>> Can you post the strace output by running
>>
>> sudo strace -ff -o /tmp/opensips_strace_output systemctl start
>> opensips.service
>> cat /tmp/opensips_strace_output*
>>
>> That will help see where the error occurs.
>>
>> On Sat, Sep 19, 2015 at 11:21 PM, Nabeel <nabeelshik...@gmail.com> wrote:
>>
>>> Why can't the service file be automatically generated at the time of
>>> installation/compilation on the relevant OS?
>>> It seems to be quite a basic feature missing.
>>>
>>> On 20 September 2015 at 04:16, Nabeel <nabeelshik...@gmail.com> wrote:
>>>
>>>> Unfortunately, changing the user/group to 'root' did not work either.
>>>>
>>>> The same error occurs and OpenSIPS fails to start:
>>>>
>>>> Failed at step EXEC spawning /usr/sbin/opensips: Permission denied
>>>>
>>>>
>>>>  Hasn't anyone else seen this on CentOS?
>>>>
>>>>
>>>> On 18 September 2015 at 22:21, sevpal <sev...@aol.com> wrote:
>>>>
>>>>> If you change User= and Group= in the service file to root, you might
>>>>> not see such a message. To run as user opensips, then user opensips must
>>>>> exist on the system; in addition, ownership on files/folders that will be
>>>>> accessed by Opensips needs to be changed.
>>>>> *From:* Nabeel <nabeelshik...@gmail.com>
>>>>> *Sent:* Tuesday, September 15, 2015 9:47 PM
>>>>> *To:* OpenSIPS users mailling list <users@lists.opensips.org>
>>>>> *Subject:* Re: [OpenSIPS-Users] Restart=always and After=mysql.service
>>>>>
>>>>> I tried that service file on CentOS 7 but got the following error when
>>>>> trying to start the service:
>>>>>
>>>>> Failed at step EXEC spawning /usr/sbin/opensips: Permission denied
>>>>>
>>>>>
>>>>> Changing permissions of that directory did not solve the problem:
>>>>>
>>>>> chmod +x /usr/sbin/opensips
>>>>>
>>>>> chmod -R 777 /usr/sbin/opensips
>>>>>
>>>>> Does the service file need modification for CentOS?
>>>>>
>>>>>
>>>>> On 7 September 2015 at 19:14, Nabeel <nabeelshik...@gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Most of my services have a .service file located at
>>>>>> /usr/lib/systemd/system where I can set 'Restart=always' or
>>>>>> 'After=mysql.service' / 'After=mariadb.service' to make sure the server
>>>>>> starts at the appropriate times.
>>>>>>
>>>>>> However, there is no such .service file for OpenSIPS.  Please advise
>>>>>> how to create this .service file for OpenSIPS.  I heard about 'respawn' 
>>>>>> but
>>>>>> don't know how exactly to use this and would prefer to use a .service 
>>>>>> file
>>>>>> like other services.
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> ___
>>>>> Users mailing list
>>>>> Users@lists.opensips.org
>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>>
>>>>>
>>>>> ___
>>>>> Users mailing list
>>>>> Users@lists.opensips.org
>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>>
>>>>>
>>>>
>>>
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>
>>
>> --
>> Aron Podrigal
>> -
>> '101', '1110010', '110', '1101110'   '101', '110',
>> '1100100', '1110010', '1101001', '1100111', '111', '1101100'
>>
>> P: '2b', '31', '33', '34', '37', '34', '35', '38', '36', '30', '39', '39'
>>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>


-- 
Aron Podrigal
-
'101', '1110010', '110', '1101110'   '101', '110',
'1100100', '1110010', '1101001', '1100111', '111', '1101100'

P: '2b', '31', '33', '34', '37', '34', '35', '38', '36', '30', '39', '39'
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-18 Thread sevpal
If you change User= and Group= in the service file to root, you might not see 
such a message. To run as user opensips, then user opensips must exist on the 
system; in addition, ownership on files/folders that will be accessed by 
Opensips needs to be changed.
From: Nabeel 
Sent: Tuesday, September 15, 2015 9:47 PM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] Restart=always and After=mysql.service

I tried that service file on CentOS 7 but got the following error when trying 
to start the service: 


  Failed at step EXEC spawning /usr/sbin/opensips: Permission denied


Changing permissions of that directory did not solve the problem:


chmod +x /usr/sbin/opensips


chmod -R 777 /usr/sbin/opensips 


Does the service file need modification for CentOS?




On 7 September 2015 at 19:14, Nabeel <nabeelshik...@gmail.com> wrote:

  Hi, 


  Most of my services have a .service file located at /usr/lib/systemd/system 
where I can set 'Restart=always' or 'After=mysql.service' / 
'After=mariadb.service' to make sure the server starts at the appropriate times.


  However, there is no such .service file for OpenSIPS.  Please advise how to 
create this .service file for OpenSIPS.  I heard about 'respawn' but don't know 
how exactly to use this and would prefer to use a .service file like other 
services.




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-18 Thread Nabeel
Hi,

Does anyone have a working service file for CentOS 7?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-15 Thread Podrigal, Aron
Does restoring your selinux context solve the problem.

chcon --type=bin_t /usr/sbin/opensips

If that helps make it permanent by
restorecon -R -v /usr/sbin/opensips
On Sep 15, 2015 9:47 PM, "Nabeel"  wrote:

> I tried that service file on CentOS 7 but got the following error when
> trying to start the service:
>
> Failed at step EXEC spawning /usr/sbin/opensips: Permission denied
>
>
> Changing permissions of that directory did not solve the problem:
>
> chmod +x /usr/sbin/opensips
>
> chmod -R 777 /usr/sbin/opensips
>
> Does the service file need modification for CentOS?
>
>
> On 7 September 2015 at 19:14, Nabeel  wrote:
>
>> Hi,
>>
>> Most of my services have a .service file located at
>> /usr/lib/systemd/system where I can set 'Restart=always' or
>> 'After=mysql.service' / 'After=mariadb.service' to make sure the server
>> starts at the appropriate times.
>>
>> However, there is no such .service file for OpenSIPS.  Please advise how
>> to create this .service file for OpenSIPS.  I heard about 'respawn' but
>> don't know how exactly to use this and would prefer to use a .service file
>> like other services.
>>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-15 Thread Nabeel
I have selinux disabled, but to test that suggestion I temporarily enabled
selinux and restored context, but the error was not resolved.
On 16 Sep 2015 03:14, "Podrigal, Aron"  wrote:

> Does restoring your selinux context solve the problem.
>
> chcon --type=bin_t /usr/sbin/opensips
>
> If that helps make it permanent by
> restorecon -R -v /usr/sbin/opensips
> On Sep 15, 2015 9:47 PM, "Nabeel"  wrote:
>
>> I tried that service file on CentOS 7 but got the following error when
>> trying to start the service:
>>
>> Failed at step EXEC spawning /usr/sbin/opensips: Permission denied
>>
>>
>> Changing permissions of that directory did not solve the problem:
>>
>> chmod +x /usr/sbin/opensips
>>
>> chmod -R 777 /usr/sbin/opensips
>>
>> Does the service file need modification for CentOS?
>>
>>
>> On 7 September 2015 at 19:14, Nabeel  wrote:
>>
>>> Hi,
>>>
>>> Most of my services have a .service file located at
>>> /usr/lib/systemd/system where I can set 'Restart=always' or
>>> 'After=mysql.service' / 'After=mariadb.service' to make sure the server
>>> starts at the appropriate times.
>>>
>>> However, there is no such .service file for OpenSIPS.  Please advise how
>>> to create this .service file for OpenSIPS.  I heard about 'respawn' but
>>> don't know how exactly to use this and would prefer to use a .service file
>>> like other services.
>>>
>>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-15 Thread Nabeel
I tried that service file on CentOS 7 but got the following error when
trying to start the service:

Failed at step EXEC spawning /usr/sbin/opensips: Permission denied


Changing permissions of that directory did not solve the problem:

chmod +x /usr/sbin/opensips

chmod -R 777 /usr/sbin/opensips

Does the service file need modification for CentOS?


On 7 September 2015 at 19:14, Nabeel  wrote:

> Hi,
>
> Most of my services have a .service file located at
> /usr/lib/systemd/system where I can set 'Restart=always' or
> 'After=mysql.service' / 'After=mariadb.service' to make sure the server
> starts at the appropriate times.
>
> However, there is no such .service file for OpenSIPS.  Please advise how
> to create this .service file for OpenSIPS.  I heard about 'respawn' but
> don't know how exactly to use this and would prefer to use a .service file
> like other services.
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-08 Thread Peter Lemenkov
Hello All!
Nabeel, you're very much mistaken :)
OpenSIPS provides a systemd script for years (at least from 1.8.x).
You should have check ./packaging/fedora first, since systemd was
introduced there initially.

* https://github.com/OpenSIPS/opensips/tree/1.8/packaging/fedora
* https://github.com/OpenSIPS/opensips/tree/1.10/packaging/fedora
* https://github.com/OpenSIPS/opensips/tree/master/packaging/fedora


2015-09-07 21:14 GMT+03:00 Nabeel :
> Hi,
>
> Most of my services have a .service file located at /usr/lib/systemd/system
> where I can set 'Restart=always' or 'After=mysql.service' /
> 'After=mariadb.service' to make sure the server starts at the appropriate
> times.
>
> However, there is no such .service file for OpenSIPS.  Please advise how to
> create this .service file for OpenSIPS.  I heard about 'respawn' but don't
> know how exactly to use this and would prefer to use a .service file like
> other services.
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



-- 
With best regards, Peter Lemenkov.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-08 Thread Răzvan Crainea

Hi, Nabeel, Aron!

Steve Frécinaux from BeIP added support for Jessie and systemd[1], but 
it is only available on the master branch. However, you can easily use 
it for other branches too.


[1] 
https://github.com/OpenSIPS/opensips/blob/master/packaging/debian/opensips.service


Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 09/08/2015 01:00 AM, Podrigal, Aron wrote:
Sorry, after a quick look, I see daemon-reload only scans for scripts 
and does not generate .service files. However, systemd knows how to 
start and stop LSB type init scripts. I've been using 1.11.x branch so 
there wasn't a opensips.service there. There is a service file here 
https://github.com/OpenSIPS/opensips/blob/master/packaging/debian/opensips.service


On Mon, Sep 7, 2015 at 5:45 PM, Podrigal, Aron 
> wrote:


Opensips still uses sysv LSB init scripts. So there won't be any
.service installed automatically. However I think you can
generate  a .service file for opensips after installing the sysv
init script by  issuing the following command.

systemctl daemon-reload

On Sep 7, 2015 2:15 PM, "Nabeel" > wrote:

Hi,

Most of my services have a .service file located at
/usr/lib/systemd/system where I can set 'Restart=always' or
'After=mysql.service' / 'After=mariadb.service' to make sure
the server starts at the appropriate times.

However, there is no such .service file for OpenSIPS.  Please
advise how to create this .service file for OpenSIPS.  I heard
about 'respawn' but don't know how exactly to use this and
would prefer to use a .service file like other services.

___
Users mailing list
Users@lists.opensips.org 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




--
Aron Podrigal
-
'101', '1110010', '110', '1101110' '101', '110', 
'1100100', '1110010', '1101001', '1100111', '111', '1101100'


P: '2b', '31', '33', '34', '37', '34', '35', '38', '36', '30', '39', '39'



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-08 Thread Răzvan Crainea
Thanks for pointing that out, I had no idea we had a systemd script for 
Fedora. Perhaps we should consider moving it in a more visible place.


Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 09/08/2015 10:25 AM, Peter Lemenkov wrote:

Hello All!
Nabeel, you're very much mistaken :)
OpenSIPS provides a systemd script for years (at least from 1.8.x).
You should have check ./packaging/fedora first, since systemd was
introduced there initially.

* https://github.com/OpenSIPS/opensips/tree/1.8/packaging/fedora
* https://github.com/OpenSIPS/opensips/tree/1.10/packaging/fedora
* https://github.com/OpenSIPS/opensips/tree/master/packaging/fedora


2015-09-07 21:14 GMT+03:00 Nabeel :

Hi,

Most of my services have a .service file located at /usr/lib/systemd/system
where I can set 'Restart=always' or 'After=mysql.service' /
'After=mariadb.service' to make sure the server starts at the appropriate
times.

However, there is no such .service file for OpenSIPS.  Please advise how to
create this .service file for OpenSIPS.  I heard about 'respawn' but don't
know how exactly to use this and would prefer to use a .service file like
other services.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users







___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-08 Thread Nabeel
I'm using CentOS so had not looked in the other package folders for a
.service file.

Thanks.

On 8 September 2015 at 08:32, Răzvan Crainea  wrote:

> Thanks for pointing that out, I had no idea we had a systemd script for
> Fedora. Perhaps we should consider moving it in a more visible place.
>
> Răzvan Crainea
> OpenSIPS Solutions
> www.opensips-solutions.com
>
> On 09/08/2015 10:25 AM, Peter Lemenkov wrote:
>
>> Hello All!
>> Nabeel, you're very much mistaken :)
>> OpenSIPS provides a systemd script for years (at least from 1.8.x).
>> You should have check ./packaging/fedora first, since systemd was
>> introduced there initially.
>>
>> * https://github.com/OpenSIPS/opensips/tree/1.8/packaging/fedora
>> * https://github.com/OpenSIPS/opensips/tree/1.10/packaging/fedora
>> * https://github.com/OpenSIPS/opensips/tree/master/packaging/fedora
>>
>>
>> 2015-09-07 21:14 GMT+03:00 Nabeel :
>>
>>> Hi,
>>>
>>> Most of my services have a .service file located at
>>> /usr/lib/systemd/system
>>> where I can set 'Restart=always' or 'After=mysql.service' /
>>> 'After=mariadb.service' to make sure the server starts at the appropriate
>>> times.
>>>
>>> However, there is no such .service file for OpenSIPS.  Please advise how
>>> to
>>> create this .service file for OpenSIPS.  I heard about 'respawn' but
>>> don't
>>> know how exactly to use this and would prefer to use a .service file like
>>> other services.
>>>
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>
>>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-07 Thread Nabeel
Hi,

Most of my services have a .service file located at /usr/lib/systemd/system
where I can set 'Restart=always' or 'After=mysql.service' /
'After=mariadb.service' to make sure the server starts at the appropriate
times.

However, there is no such .service file for OpenSIPS.  Please advise how to
create this .service file for OpenSIPS.  I heard about 'respawn' but don't
know how exactly to use this and would prefer to use a .service file like
other services.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-07 Thread Podrigal, Aron
Opensips still uses sysv LSB init scripts. So there won't be any .service
installed automatically. However I think you can generate  a .service file
for opensips after installing the sysv init script by  issuing the
following command.

systemctl daemon-reload
On Sep 7, 2015 2:15 PM, "Nabeel"  wrote:

> Hi,
>
> Most of my services have a .service file located at
> /usr/lib/systemd/system where I can set 'Restart=always' or
> 'After=mysql.service' / 'After=mariadb.service' to make sure the server
> starts at the appropriate times.
>
> However, there is no such .service file for OpenSIPS.  Please advise how
> to create this .service file for OpenSIPS.  I heard about 'respawn' but
> don't know how exactly to use this and would prefer to use a .service file
> like other services.
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Restart=always and After=mysql.service

2015-09-07 Thread Podrigal, Aron
Sorry, after a quick look, I see daemon-reload only scans for scripts and
does not generate .service files. However, systemd knows how to start and
stop LSB type init scripts. I've been using 1.11.x branch so there wasn't a
opensips.service there. There is a service file here
https://github.com/OpenSIPS/opensips/blob/master/packaging/debian/opensips.service

On Mon, Sep 7, 2015 at 5:45 PM, Podrigal, Aron 
wrote:

> Opensips still uses sysv LSB init scripts. So there won't be any .service
> installed automatically. However I think you can generate  a .service file
> for opensips after installing the sysv init script by  issuing the
> following command.
>
> systemctl daemon-reload
> On Sep 7, 2015 2:15 PM, "Nabeel"  wrote:
>
>> Hi,
>>
>> Most of my services have a .service file located at
>> /usr/lib/systemd/system where I can set 'Restart=always' or
>> 'After=mysql.service' / 'After=mariadb.service' to make sure the server
>> starts at the appropriate times.
>>
>> However, there is no such .service file for OpenSIPS.  Please advise how
>> to create this .service file for OpenSIPS.  I heard about 'respawn' but
>> don't know how exactly to use this and would prefer to use a .service file
>> like other services.
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>


-- 
Aron Podrigal
-
'101', '1110010', '110', '1101110'   '101', '110',
'1100100', '1110010', '1101001', '1100111', '111', '1101100'

P: '2b', '31', '33', '34', '37', '34', '35', '38', '36', '30', '39', '39'
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users