<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3395" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=value>Hi, </SPAN></DIV>
<DIV><SPAN class=value></SPAN>&nbsp;</DIV>
<DIV><SPAN class=value>I've followed instructions of the book "AsteriskFutureOf 
TelephonySecEdit" on page 295 onwards ) Link to the <SPAN 
class=searchTerm>Asterisk</SPAN> book: <A 
href="http://downloads.oreilly.com/books/9780596510480.pdf) and" target=_blank 
rel=nofollow>http://downloads.oreilly.c<WBR>om/books/9<WBR>7805965104<WBR>80.pdf) 
and</A> get an error when running service <SPAN class=searchTerm>asterisk</SPAN> 
start. The error is: cat: /var/run/asterisk.pid: No such file or directory . I 
can run aserisk fine from the <SPAN class=searchTerm>non</SPAN>-<SPAN 
class=searchTerm>root</SPAN> user. Please help<BR></DIV></SPAN>
<DIV class=qCodeSnippetRow>
<DIV class=name>Code Snippet: </DIV>
<DIV class=value>
<DIV class=codeSnippet>
<TABLE>
  <TBODY>
  <TR>
    <TD class=lineNumbers><PRE>1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
</PRE></TD>
    <TD class=codeBody><PRE class=prettyprint><SPAN class=pun>[</SPAN><SPAN class=pln>root@messaging run</SPAN><SPAN class=pun>]</SPAN><SPAN class=com># /etc/init.d/asterisk restart</SPAN><SPAN class=pln><BR></SPAN><SPAN class=typ>Shutting</SPAN><SPAN class=pln> down asterisk</SPAN><SPAN class=pun>:</SPAN><SPAN class=pln> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</SPAN><SPAN class=pun>[</SPAN><SPAN class=pln>FAILED</SPAN><SPAN class=pun>]</SPAN><SPAN class=pln><BR></SPAN><SPAN class=typ>Starting</SPAN><SPAN class=pln> asterisk</SPAN><SPAN class=pun>:</SPAN><SPAN class=pln> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </SPAN><SPAN class=pun>[</SPAN><SPAN class=pln> &nbsp;OK &nbsp;</SPAN><SPAN class=pun>]</SPAN><SPAN class=pln><BR></SPAN><SPAN class=pun>[</SPAN><SPAN class=pln>root@messaging run</SPAN><SPAN class=pun>]</SPAN><SPAN class=com># Asterisk ended with exit status 1</SPAN><SPAN class=pln><BR></SPAN><SPAN class=typ>Asterisk</SPAN><SPAN class=pln> died </SPAN><SPAN class=kwd>with</SPAN><SPAN class=pln> code </SPAN><SPAN class=lit>1</SPAN><SPAN class=pun>.</SPAN><SPAN class=pln><BR>cat</SPAN><SPAN class=pun>:</SPAN><SPAN class=pln> </SPAN><SPAN class=pun>/</SPAN><SPAN class=kwd>var</SPAN><SPAN class=pun>/</SPAN><SPAN class=pln>run</SPAN><SPAN class=pun>/</SPAN><SPAN class=pln>asterisk</SPAN><SPAN class=pun>.</SPAN><SPAN class=pln>pid</SPAN><SPAN class=pun>:</SPAN><SPAN class=pln> </SPAN><SPAN class=typ>No</SPAN><SPAN class=pln> such file </SPAN><SPAN class=kwd>or</SPAN><SPAN class=pln> directory<BR></SPAN><SPAN class=typ>Automatically</SPAN><SPAN class=pln> restarting </SPAN><SPAN class=typ>Asterisk</SPAN><SPAN class=pun>.</SPAN><SPAN class=pln><BR>mpg123</SPAN><SPAN class=pun>:</SPAN><SPAN class=pln> no process killed<BR></SPAN><SPAN class=typ>Asterisk</SPAN><SPAN class=pln> ended </SPAN><SPAN class=kwd>with</SPAN><SPAN class=pln> exit status </SPAN><SPAN class=lit>1</SPAN><SPAN class=pln><BR></SPAN><SPAN class=typ>Asterisk</SPAN><SPAN class=pln> died </SPAN><SPAN class=kwd>with</SPAN><SPAN class=pln> code </SPAN><SPAN class=lit>1</SPAN><SPAN class=pun>.</SPAN><SPAN class=pln><BR>cat</SPAN><SPAN class=pun>:</SPAN><SPAN class=pln> </SPAN><SPAN class=pun>/</SPAN><SPAN class=kwd>var</SPAN><SPAN class=pun>/</SPAN><SPAN class=pln>run</SPAN><SPAN class=pun>/</SPAN><SPAN class=pln>asterisk</SPAN><SPAN class=pun>.</SPAN><SPAN class=pln>pid</SPAN><SPAN class=pun>:</SPAN><SPAN class=pln> </SPAN><SPAN class=typ>No</SPAN><SPAN class=pln> such file </SPAN><SPAN class=kwd>or</SPAN><SPAN class=pln> directory<BR></SPAN><SPAN class=typ>Automatically</SPAN><SPAN class=pln> restarting </SPAN><SPAN class=typ>Asterisk</SPAN><SPAN class=pun>.</SPAN></PRE></TD></TR></TBODY></TABLE></DIV></DIV></DIV>
<DIV class=clear><FONT face=Arial size=2></FONT><FONT face=Arial size=2>The 
suggestion to&nbsp; do the following didn't work...:</FONT></DIV>
<DIV class=clear><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV class="answerBody quoted" id=EchoTopic>
<DIV class=richText>Edit the &nbsp;[directories] &nbsp;section of asterisk.conf 
&nbsp;and change<BR><BR>the line that reads &nbsp;astrundir =&gt; 
/var/run<BR>TO:<BR>astrundir =&gt; /var/run/asteri<SPAN 
class=searchTerm>sk<BR><BR>Th</SPAN>en:<BR>mkdir /var/run/asteri<SPAN 
class=searchTerm>sk<BR>chow</SPAN>n theuser /var/run/asteri<SPAN 
class=searchTerm>sk<BR><BR>Ed</SPAN>it /etc/init.d/asteri<SPAN 
class=searchTerm>sk<BR>And </SPAN>make sure there are no references to 
/var/run/asterisk.pid<BR>you want /var/run/asteri<SPAN 
class=searchTerm>sk/aster</SPAN>isk<WBR>.pid &nbsp; instead</DIV>
<DIV class=richText>&nbsp;</DIV>
<DIV class=richText><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV class=richText><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV class=richText><FONT face=Arial size=2>Any help most 
welcome</FONT></DIV></DIV></BODY></HTML>