Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Asterisk couldn't run because of permissions...//var/run/asterisk.pid  -- On boot up

Posted on 2009-07-03
8
Medium Priority
?
2,201 Views
Last Modified: 2013-11-15
Asterisk will not start on boot up after upgrade to Ubuntu 9.0.4 from 8.10

Asterisk couldn't run because of permissions...//var/run/asterisk.pid  -- On boot up



0
Comment
Question by:jkockler
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 2
8 Comments
 
LVL 14

Expert Comment

by:Fabio Marzocca
ID: 24774003
Kill Asterisk and stop any of its running services, then try changing the owner:

sudo chown asterisk:asterisk /var/run/asterisk

0
 
LVL 4

Author Comment

by:jkockler
ID: 24774106
Okay, the file "asterisk.pid" only exists when Asterisk is running.  I changed the owner of the file, with the command you gave me.  It changed the owner to Asterisk, then rebooted, with the same error.  I checked for the file "asterisk.pid" before starting asterisk, to find it was not there.  I started Asterisk and the file appeared.

This must mean that a preliminary Asterisk startup command is either failing, or not runing at all, and the error message is a result of the file "asterisk.pid" not existing.

Any ideas?

0
 
LVL 4

Author Comment

by:jkockler
ID: 24774118
I am also getting a Zaptel error on boot, that says "waiting for Zaptel to come online"  -- Then fails with Zaptel not installed.

I do not have any Zaptel hardware, or anything that i know of that requires it.  Is this a problem, and could it be causing Asterisk not to start properly?

0
[Video] Oticon Case Study

Open office environments can create the dynamics for innovation, but they also bring some challenges. With over 1,000 employees in an open office, Oticon needed a solution that would preserve the environment while mitigating disruptive background noises.

Watch how they did it.

 
LVL 14

Expert Comment

by:Fabio Marzocca
ID: 24776290
You can't change permission to file .pid, as it will appear only when running.

Stop Asterisk and run this:

sudo chown -R asterisk:asterisk /var/run/asterisk

0
 
LVL 4

Author Comment

by:jkockler
ID: 24776909
I looked at "asterisk.conf"

I noticed the line
"astrundir => /var/run/"    and so I changed it to
"astrundir => /var/run/asterisk"  -----
Then I ran your command above.

That resolved the error on boot up, but Asterisk is still not started when the machine boots.
I still have to run "sudo asterisk" in order for it to start.


0
 
LVL 4

Author Comment

by:jkockler
ID: 24776930
Well, slight correction,

The .pid file and .ctl file exist in the //var/run/asterisk directory on bootup, but non of the phones will register, and when I try to connect to the CLI, it fails with "Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?"

If I run sudo asterisk, everything starts to work.
0
 
LVL 4

Accepted Solution

by:
jkockler earned 0 total points
ID: 24777186
Well looks like I found the fix:

First I changed asterisk.conf back to the original settings of
"astrundir => /var/run/"

Then I followed the steps at this link http://www.voipuser.org/forum_topic_3621.html

All the steps are on the lastest post, on the thread, if anyone else has this problem.
0
 
LVL 4

Author Comment

by:jkockler
ID: 24777308
And here are the steps, in case the other site goes away;

I tested the debian script on my Ubuntu 7.10 and it work.

copy /mytemp/asterisk-1.4.19/contrib/init.d/rc.debian.asterisk
to /etc/init.d/asterisk
chmod 755 /etc/init.d/asterisk

cd /etc/init.d
# to remove the script from boot
update-rc.d -f asterisk remove

# to set the script as boot
update-rc.d asterisk defaults
0

Featured Post

Enhanced Intelligibility Without Cable Clutter

Challenge: The ESA office in Brussels wanted a reliable audio conference system for video conferences. Their requirement - No participant must be left out from the conference and the audio quality must not be compromised.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question