[asterisk-users] Unable to open pid file '/var/run/asterisk/asterisk.pid': No such file or directory

Tzafrir Cohen tzafrir.cohen at xorcom.com
Fri Feb 12 11:20:26 CST 2010


On Fri, Feb 12, 2010 at 04:51:29PM +0000, Brian wrote:
> On Fri, 2010-02-12 at 10:20 -0600, Kevin P. Fleming wrote:
> > Brian wrote:
> > 
> > > If you leave the defaults as they are (dictated by (!) in asterisk.conf)
> > > then the behaviour you get is Asterisk looking to /var/run/asterisk
> > > which the OS deletes on reboot. The question is why is this the default
> > > behaviour when it breaks systems that clear /var/run
> > 
> > Because it's impossible to have defaults that work on every possible
> > system that might do anything the system installer can come up with. 
> Quite - but the core as it is expect /var/run to be persistent and on
> several flavours of Linux it is not. 

Asterisk is not the only service with this problem in Ubuntu.

Check others under /etc/init.d .

> It's fair to say that /var/run will
> probably be available in most cases so could the default behaviour not
> be to look there rather than /var/run/asterisk which may not?

So you say it should be fixed in the init.d script?

As in
http://svnview.digium.com/svn/asterisk?view=revision&revision=177852

> 
> I don't want to fight about it and I appreciate your defence of the
> current status quo - it's no big deal. I'm more than happy to admit I
> did not relaize that /var/run was emptied on Debian based distros on
> boot. Perhaps you could pass that information up to whoever builds the
> makefile -or add a little into the README as it confuses new users like
> me - who just want it to work.

Adding documentation is what you do when things fail to work. I suspect
you use an older init.d script.

Alternatively, you can use the simpler upstart conf file:
http://svnview.digium.com/svn/asterisk/trunk/contrib/upstart/asterisk.user.conf?view=markup

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-users mailing list