<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000">
<DIV>Does it start in the usual way with “opensipsctl start”? If not, try to fix
that method of starting, check /etc/opensips/opensipsctrl. </DIV>
<DIV> </DIV>
<DIV>Some things you might want to check.</DIV>
<DIV>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.</DIV>
<DIV
style="FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: inline">
<DIV style="FONT: 10pt tahoma">
<DIV><FONT size=3 face=Calibri></FONT> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=nabeelshikder@gmail.com
href="mailto:nabeelshikder@gmail.com">Nabeel</A> </DIV>
<DIV><B>Sent:</B> Sunday, September 20, 2015 1:11 AM</DIV>
<DIV><B>To:</B> <A title=aronp@guaranteedplus.com
href="mailto:aronp@guaranteedplus.com">Podrigal, Aron</A> ; <A
title=users@lists.opensips.org href="mailto:users@lists.opensips.org">OpenSIPS
users mailling list</A> </DIV>
<DIV><B>Subject:</B> Re: [OpenSIPS-Users] Restart=always and
After=mysql.service</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style="FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: inline">
<DIV dir=ltr>No, I just compiled and installed OpenSIPS in the normal manner
while logged in as root.</DIV>
<DIV class=gmail_extra>
<DIV> </DIV>
<DIV class=gmail_quote>On 20 September 2015 at 06:00, Podrigal, Aron <SPAN
dir=ltr><<A href="mailto:aronp@guaranteedplus.com"
target=_blank>aronp@guaranteedplus.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV dir=ltr>Are you running this on a container / chrooted env?</DIV>
<DIV class=HOEnZb>
<DIV class=h5>
<DIV class=gmail_extra>
<DIV> </DIV>
<DIV class=gmail_quote>On Sun, Sep 20, 2015 at 12:39 AM, Nabeel <SPAN
dir=ltr><<A href="mailto:nabeelshikder@gmail.com"
target=_blank>nabeelshikder@gmail.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV dir=ltr>
<DIV>This is what it says:</DIV>
<DIV> </DIV>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Sep
20 05:21:45 <A href="http://server1.sipdomain.com"
target=_blank>server1.sipdomain.com</A> systemd[1]: Starting OpenSIPS is a
very fast and flexible SIP (RFC3261) server...<BR>-- Subject: Unit
opensips.service has begun with start-up<BR>-- Defined-By: systemd<BR>--
Support: <A
href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel"
target=_blank>http://lists.freedesktop.org/mailman/listinfo/systemd-devel</A><BR>--<BR>--
Unit opensips.service has begun starting up.<BR>Sep 20 05:21:45 <A
href="http://server1.sipdomain.com"
target=_blank>server1.sipdomain.com</A> systemd[4022]: Failed at step EXEC
spawning /usr/sbin/opensips: Permission denied<BR>-- Subject: Process
/usr/sbin/opensips could not be executed<BR>-- Defined-By: systemd<BR>--
Support: <A
href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel"
target=_blank>http://lists.freedesktop.org/mailman/listinfo/systemd-devel</A><BR>--<BR>--
The process /usr/sbin/opensips could not be executed and
failed.<BR>--<BR>-- The error number returned while executing this process
is 13.<BR>Sep 20 05:21:45 <A href="http://server1.sipdomain.com"
target=_blank>server1.sipdomain.com</A> systemd[1]: opensips.service:
control process exited, code=exited status=203<BR>Sep 20 05:21:45 <A
href="http://server1.sipdomain.com"
target=_blank>server1.sipdomain.com</A> systemd[1]: Failed to start
OpenSIPS is a very fast and flexible SIP (RFC3261) server.<BR>-- Subject:
Unit opensips.service has failed<BR>-- Defined-By: systemd<BR>-- Support:
<A href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel"
target=_blank>http://lists.freedesktop.org/mailman/listinfo/systemd-devel</A><SPAN><FONT
color=#888888><BR>--<BR>-- Unit opensips.service has failed.<BR>--<BR>--
The result is failed.<BR>Sep 20 05:21:45 <A
href="http://server1.sipdomain.com"
target=_blank>server1.sipdomain.com</A> systemd[1]: Unit opensips.service
entered failed state.</FONT></SPAN></BLOCKQUOTE>
<DIV>
<DIV>
<DIV> </DIV>
<DIV class=gmail_extra>
<DIV> </DIV>
<DIV class=gmail_quote>On 20 September 2015 at 05:12, Podrigal, Aron <SPAN
dir=ltr><<A href="mailto:aronp@guaranteedplus.com"
target=_blank>aronp@guaranteedplus.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV dir=ltr>Do you see anything informative in your journal after trying
to start opensips?
<DIV> </DIV>
<DIV>sudo journalctl -xn 350<BR></DIV></DIV>
<DIV>
<DIV>
<DIV class=gmail_extra>
<DIV> </DIV>
<DIV class=gmail_quote>On Sat, Sep 19, 2015 at 11:46 PM, Nabeel <SPAN
dir=ltr><<A href="mailto:nabeelshikder@gmail.com"
target=_blank>nabeelshikder@gmail.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV dir=ltr>Please see the strace output at these links:
<DIV> </DIV>
<DIV><A href="http://pastebin.com/G1Uv5s1E"
target=_blank>http://pastebin.com/G1Uv5s1E</A><BR></DIV>
<DIV> </DIV>
<DIV><A href="http://pastebin.com/gnesw4tW"
target=_blank>http://pastebin.com/gnesw4tW</A><BR></DIV></DIV>
<DIV>
<DIV>
<DIV class=gmail_extra>
<DIV> </DIV>
<DIV class=gmail_quote>On 20 September 2015 at 04:30, Podrigal, Aron
<SPAN dir=ltr><<A href="mailto:aronp@guaranteedplus.com"
target=_blank>aronp@guaranteedplus.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV dir=ltr>Can you post the strace output by running
<DIV> </DIV>
<DIV>sudo strace -ff -o /tmp/opensips_strace_output systemctl start
opensips.service<BR></DIV>
<DIV>cat /tmp/opensips_strace_output*</DIV>
<DIV> </DIV>
<DIV>That will help see where the error occurs.</DIV></DIV>
<DIV class=gmail_extra>
<DIV>
<DIV>
<DIV> </DIV>
<DIV class=gmail_quote>On Sat, Sep 19, 2015 at 11:21 PM, Nabeel <SPAN
dir=ltr><<A href="mailto:nabeelshikder@gmail.com"
target=_blank>nabeelshikder@gmail.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV dir=ltr>Why can't the service file be automatically generated
at the time of installation/compilation on the relevant OS?
<DIV>It seems to be quite a basic feature missing.</DIV></DIV>
<DIV>
<DIV>
<DIV class=gmail_extra>
<DIV> </DIV>
<DIV class=gmail_quote>On 20 September 2015 at 04:16, Nabeel <SPAN
dir=ltr><<A href="mailto:nabeelshikder@gmail.com"
target=_blank>nabeelshikder@gmail.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV dir=ltr>Unfortunately, changing the user/group to 'root' did
not work either.
<DIV> </DIV>
<DIV>The same error occurs and OpenSIPS fails to start:<SPAN><BR>
<DIV> </DIV>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Failed
at step EXEC spawning /usr/sbin/opensips: Permission
denied</BLOCKQUOTE>
<DIV> </DIV></SPAN>
<DIV>Hasn't anyone else seen this on CentOS?</DIV></DIV>
<DIV> </DIV></DIV>
<DIV>
<DIV>
<DIV class=gmail_extra>
<DIV> </DIV>
<DIV class=gmail_quote>On 18 September 2015 at 22:21, sevpal <SPAN
dir=ltr><<A href="mailto:sevpal@aol.com"
target=_blank>sevpal@aol.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV dir=ltr>
<DIV dir=ltr>
<DIV
style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000">
<DIV>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.</DIV>
<DIV>
<DIV
style="FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: inline"></DIV>
<DIV style="FONT: 10pt tahoma">
<DIV style="BACKGROUND: #f5f5f5">
<DIV><B>From:</B> <A title=nabeelshikder@gmail.com
href="mailto:nabeelshikder@gmail.com" target=_blank>Nabeel</A>
</DIV>
<DIV><B>Sent:</B> Tuesday, September 15, 2015 9:47 PM</DIV>
<DIV><B>To:</B> <A title=users@lists.opensips.org
href="mailto:users@lists.opensips.org" target=_blank>OpenSIPS
users mailling list</A> </DIV>
<DIV><B>Subject:</B> Re: [OpenSIPS-Users] Restart=always and
After=mysql.service</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style="FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: inline">
<DIV>
<DIV>
<DIV dir=ltr><FONT face="arial, helvetica, sans-serif">I tried
that service file on CentOS 7 but got the following error when
trying to start the service:</FONT>
<DIV><FONT face="arial, helvetica, sans-serif"><BR></FONT></DIV>
<DIV>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"><FONT
face="arial, helvetica, sans-serif">Failed at step EXEC
spawning /usr/sbin/opensips: Permission
denied</FONT></BLOCKQUOTE>
<DIV><FONT face="arial, helvetica, sans-serif"><BR></FONT></DIV>
<DIV><FONT face="arial, helvetica, sans-serif">Changing
permissions of that directory did not solve the
problem:</FONT></DIV>
<DIV><FONT face="arial, helvetica, sans-serif"><BR></FONT></DIV>
<DIV><FONT style="BACKGROUND-COLOR: rgb(255,255,255)"
color=#000000 face="arial, helvetica, sans-serif"><SPAN
style="BORDER-TOP: 0px; BORDER-RIGHT: 0px; BORDER-BOTTOM: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; PADDING-LEFT: 0px; MARGIN: 0px; BORDER-LEFT: 0px; PADDING-RIGHT: 0px">chmod
</SPAN><SPAN
style="BORDER-TOP: 0px; BORDER-RIGHT: 0px; BORDER-BOTTOM: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; PADDING-LEFT: 0px; MARGIN: 0px; BORDER-LEFT: 0px; PADDING-RIGHT: 0px">+</SPAN><SPAN
style="BORDER-TOP: 0px; BORDER-RIGHT: 0px; BORDER-BOTTOM: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; PADDING-LEFT: 0px; MARGIN: 0px; BORDER-LEFT: 0px; PADDING-RIGHT: 0px">x
/usr/sbin/opensips</SPAN></FONT></DIV>
<DIV><FONT face="arial, helvetica, sans-serif"><BR></FONT></DIV>
<DIV><FONT face="arial, helvetica, sans-serif">chmod -R 777
/usr/sbin/opensips </FONT></DIV></DIV>
<DIV><FONT face="arial, helvetica, sans-serif"><BR></FONT></DIV>
<DIV><FONT face="arial, helvetica, sans-serif">Does the service
file need modification for CentOS?</FONT></DIV>
<DIV><FONT face="arial, helvetica, sans-serif"><BR></FONT></DIV>
<DIV class=gmail_extra><FONT
face="arial, helvetica, sans-serif"><BR></FONT>
<DIV class=gmail_quote><FONT
face="arial, helvetica, sans-serif">On 7 September 2015 at
19:14, Nabeel <SPAN dir=ltr><<A
href="mailto:nabeelshikder@gmail.com"
target=_blank>nabeelshikder@gmail.com</A>></SPAN>
wrote:<BR></FONT>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV dir=ltr><FONT
face="arial, helvetica, sans-serif">Hi,</FONT>
<DIV><FONT
face="arial, helvetica, sans-serif"><BR></FONT></DIV>
<DIV><FONT face="arial, helvetica, sans-serif">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.</FONT></DIV>
<DIV><FONT
face="arial, helvetica, sans-serif"><BR></FONT></DIV>
<DIV><FONT face="arial, helvetica, sans-serif">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.</FONT></DIV></DIV></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV></DIV></DIV></DIV>
<HR>
<SPAN>_______________________________________________<BR>Users
mailing list<BR><A href="mailto:Users@lists.opensips.org"
target=_blank>Users@lists.opensips.org</A><BR><A
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
target=_blank>http://lists.opensips.org/cgi-bin/mailman/listinfo/users</A><BR></SPAN></DIV></DIV></DIV></DIV><BR>_______________________________________________<BR>Users
mailing list<BR><A href="mailto:Users@lists.opensips.org"
target=_blank>Users@lists.opensips.org</A><BR><A
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
rel=noreferrer
target=_blank>http://lists.opensips.org/cgi-bin/mailman/listinfo/users</A><BR><BR></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV></DIV></DIV></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV></DIV></DIV><BR>_______________________________________________<BR>Users
mailing list<BR><A href="mailto:Users@lists.opensips.org"
target=_blank>Users@lists.opensips.org</A><BR><A
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
rel=noreferrer
target=_blank>http://lists.opensips.org/cgi-bin/mailman/listinfo/users</A><BR><BR></BLOCKQUOTE></DIV><BR><BR
clear=all>
<DIV> </DIV></DIV></DIV><SPAN>-- <BR>
<DIV>
<DIV dir=ltr>
<DIV>
<DIV dir=ltr>Aron Podrigal
<DIV>-</DIV>
<DIV>'1000001', '1110010', '1101111', '1101110' '1010000',
'1101111', '1100100', '1110010', '1101001', '1100111', '1100001',
'1101100'</DIV>
<DIV> </DIV>
<DIV>P: '2b', '31', '33', '34', '37', '34', '35', '38', '36', '30',
'39', '39'<BR></DIV>
<DIV> </DIV></DIV></DIV></DIV></DIV></SPAN></DIV><BR>_______________________________________________<BR>Users
mailing list<BR><A href="mailto:Users@lists.opensips.org"
target=_blank>Users@lists.opensips.org</A><BR><A
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
rel=noreferrer
target=_blank>http://lists.opensips.org/cgi-bin/mailman/listinfo/users</A><BR><BR></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV></DIV></DIV></BLOCKQUOTE></DIV><BR><BR clear=all>
<DIV> </DIV>-- <BR>
<DIV>
<DIV dir=ltr>
<DIV>
<DIV dir=ltr>Aron Podrigal
<DIV>-</DIV>
<DIV>'1000001', '1110010', '1101111', '1101110' '1010000',
'1101111', '1100100', '1110010', '1101001', '1100111', '1100001',
'1101100'</DIV>
<DIV> </DIV>
<DIV>P: '2b', '31', '33', '34', '37', '34', '35', '38', '36', '30', '39',
'39'<BR></DIV>
<DIV> </DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV></DIV></DIV></DIV></BLOCKQUOTE></DIV><BR><BR clear=all>
<DIV> </DIV>-- <BR>
<DIV>
<DIV dir=ltr>
<DIV>
<DIV dir=ltr>Aron Podrigal
<DIV>-</DIV>
<DIV>'1000001', '1110010', '1101111', '1101110' '1010000',
'1101111', '1100100', '1110010', '1101001', '1100111', '1100001',
'1101100'</DIV>
<DIV> </DIV>
<DIV>P: '2b', '31', '33', '34', '37', '34', '35', '38', '36', '30', '39',
'39'<BR></DIV>
<DIV> </DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV>
<P>
<HR>
_______________________________________________<BR>Users mailing
list<BR>Users@lists.opensips.org<BR>http://lists.opensips.org/cgi-bin/mailman/listinfo/users<BR></DIV></DIV></DIV></BODY></HTML>