[asterisk-users] Having problem getting Asterisk to work on CentOS 7
Telium Technical Support
support at telium.ca
Wed Mar 15 13:52:03 CDT 2017
Dan - you probably installed the init script (look in /etc/init.d for an
'asterisk' file). Asterisk includes the older init style scripts which are
*compatible* with systemd but you don't have as much control compared to
creating an Asterisk systemd file. (SystemD service files replace InitD
scripts). So that might be part of the solution, but first.
If disabling Selinux allows Asterisk to run as you expect then you can
create an selinux policy exception for Asterisk - BUT, ignore that for now.
Just keep SElinux disabled (edit /etc/sysconfig/selinux and set to disabled)
and come back to that later.
So in preparation to diagnose further:
1. Disable asterisk service (systemctl disable asterisk)
2. Disable selinux (as described above)
3. Reboot.
Next, try to start asterisk with 'systemctl start asterisk'. Does it work
as expected? If no, what user have you logged in with?
If not root, su to root and try again. Did it asterisk service start
properly?
If yes, you should create a systemd service file and use the 'user=root'
parameter (and remove the initd service script).
Does Asterisk start properly now every time? If yes re-enable to your
systemd Asterisk service to start with the system.
I don't see any attachment (probably stripped by the list manager) but that
shouldn't matter - if your Asterisk service is not running as root that
would explain a range of strange behaviours.
*Jason*
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Dan Cropp
Sent: Wednesday, March 15, 2017 12:41 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
<asterisk-users at lists.digium.com>
Subject: Re: [asterisk-users] Having problem getting Asterisk to work on
CentOS 7
Thanks Jason.
I will try to explain what I'm seeing for this issue.
I did a fresh install of CentOS 7 Minimal into a VM with VMWare Workstation.
Followed the Asterisk from Source instructions using pjproject 2.6 and
asterisk 13.14.0 for the configure, install, . At the end of the asterisk
portion, I ran the make config which I understand installs the
Initialization scripts.
After this, when I restart my CentOS 7 Minimal, I was seeing the
safe_asterisk process, but asterisk would not start. I could run it from
the command line and it would run.
It was suggested that it's an selinux problem. They had me try 'setenforce
0'. After this, asterisk process starts running.
As I understand it, there was mention of using systemd instead of using
safe_asterisk.
Other e-mails indicated I should look at the audit.log, so I included that
information. This audit.log mentioned astdb.sqlite3, so I wasn't sure if
that's the problem.
I also just tried a restart and ran 'systemctl start asterisk'. This did
not start the asterisk process.
Through the various recommendations, I've become confused on what the
correct path would be. I have had zero problems with Debian and Asterisk
for many years. Making the change to CentOS. Followed the instructions
from asterisk.org, but for some reason I hit a problem with this on my
CentOS VM.
<https://wiki.asterisk.org/wiki/display/AST/Installing+Asterisk+From+Source>
https://wiki.asterisk.org/wiki/display/AST/Installing+Asterisk+From+Source
Simply looking for guidance on what the correct approach to solve this
problem is.
Have a great day!
Dan
From: <mailto:asterisk-users-bounces at lists.digium.com>
asterisk-users-bounces at lists.digium.com [
<mailto:asterisk-users-bounces at lists.digium.com>
mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Telium
Technical Support
Sent: Wednesday, March 15, 2017 11:08 AM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] Having problem getting Asterisk to work on
CentOS 7
The history of the question is lost (in the mail thread) so I'll jump in
based on what I could see in my recent mail and the subject line:
- The ASTDB should have no impact on Asterisk service start (which I
assume is the problem given the subject line)
- If you disabled SElinux then that's not the problem in starting
asterisk
>From another posting it appears that you can start Asterisk from the binary,
and from safe_asterisk. If that's correct, then are you able to start/stop
Asterisk from the service file? With CentOS7 that would be:
systemctl start asterisk
Is your asterisk service file present? (You can create one easily based on
samples on the internet). If you have an asterisk service file but startup
fails post the relevant portion of your syslog (journalctl).
If your question has changed (you mentioned 'the first problem') then ignore
the above; jumping in late.
*Jason*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170315/a0f93628/attachment.html>
More information about the asterisk-users
mailing list