Bug 865226 - Unable to remote control if asterisk is loaded as service
Unable to remote control if asterisk is loaded as service
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: asterisk (Show other bugs)
17
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Jeffrey C. Ollie
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-10 23:55 EDT by phiz
Modified: 2013-03-02 14:58 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-02 14:58:04 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description phiz 2012-10-10 23:55:04 EDT
Description of problem:
 "asterisk -r" fails to connect to asterisk if started by systemctl because the asterisk user doesn't have write permissions to /run/asterisk

 # ls -ld /run/asterisk/
 drwxr-xr-x. 2 root root 40 Oct 10 21:36 /run/asterisk/


Version-Release number of selected component (if applicable):
 asterisk-10.8.0-1.fc17.x86_64


Steps to Reproduce:
1. systemctl start asterisk.service  (as root)
2. asterisk -rv                      (as root)
  
Actual results:
 # asterisk -rvvv
 Asterisk 10.8.0, Copyright (C) 1999 - 2012 Digium, Inc. and others.
 Created by Mark Spencer <markster@digium.com>
 Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for    details.
 This is free software, with components licensed under the GNU General Public
 License version 2 and other licenses; you are welcome to redistribute it under
 certain conditions. Type 'core show license' for details.
 =========================================================================
   == Parsing '/etc/asterisk/asterisk.conf':   == Found
   == Parsing '/etc/asterisk/extconfig.conf':   == Found
 Unable to connect to remote asterisk (does /run/asterisk/asterisk.ctl exist?)

 # ls -l /run/asterisk
 total 0

Expected results:
 # asterisk -rv
 Asterisk 10.8.0, Copyright (C) 1999 - 2012 Digium, Inc. and others.
 Created by Mark Spencer <markster@digium.com>
 Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for  details.
 This is free software, with components licensed under the GNU General Public
 License version 2 and other licenses; you are welcome to redistribute it under
 certain conditions. Type 'core show license' for details.
 =========================================================================
 Connected to Asterisk 10.8.0 currently running on daq (pid = 26863)
 Verbosity was 0 and is now 1

Additional info:

Fixed with:
 # chown asterisk /run/asterisk

 # systemctl start asterisk.service
 # ls -l /run/asterisk/
 total 4
 srw-rw----. 1 asterisk asterisk 0 Oct 10 21:40 asterisk.ctl
 -rw-r--r--. 1 asterisk asterisk 6 Oct 10 21:40 asterisk.pid
Comment 1 Julian C. Dunn 2013-02-08 16:16:36 EST
Problem still exists on Asterisk asterisk-11.2.0-1.fc18.x86_64, Fedora 18.
Comment 2 Julian C. Dunn 2013-02-08 16:26:24 EST
I wonder if part of the problem is that asterisk.spec specifies to use tmpfiles.d to manage /run/asterisk on Fedoras that have tmpfilesd:

%if %{tmpfilesd}
%attr(0644,root,root) /usr/lib/tmpfiles.d/asterisk.conf
%ghost %attr(0755,asterisk,asterisk) %dir %{astvarrundir}
%else
%attr(0755,asterisk,asterisk) %dir %{astvarrundir}
%endif

but systemd-tmpfiles --create doesn't get invoked on asterisk package installation, only on the next reboot of the system.
Comment 3 Jeffrey C. Ollie 2013-02-08 18:19:24 EST
(In reply to comment #2)
> I wonder if part of the problem is that asterisk.spec specifies to use
> tmpfiles.d to manage /run/asterisk on Fedoras that have tmpfilesd:

Yeah, that does appear to be the problem.  I'll have a look around the wiki this weekend to see if there's a recommended way to run the creation.  I also need to get 11.2.1 out too.
Comment 4 Fedora Update System 2013-02-10 22:48:41 EST
asterisk-11.2.1-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/asterisk-11.2.1-1.fc18
Comment 5 Fedora Update System 2013-02-12 00:14:27 EST
Package asterisk-11.2.1-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing asterisk-11.2.1-1.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-2329/asterisk-11.2.1-1.fc18
then log in and leave karma (feedback).
Comment 6 Fedora Update System 2013-03-02 14:58:06 EST
asterisk-11.2.1-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.