Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-15 Thread Ron Wheeler

Great.
Let me know how your policy works out.
I would not mind trying it myself.
I have no intrinsic objection to doing things the right way but 
sometimes one just needs to get the phones working!


Ron

On 15/03/2017 4:06 PM, Dan Cropp wrote:


Thank you Jason

After following your steps, Asterisk starts up each time even after 
the reset.


I will look into creating an SELinux policy exception for Asterisk.

Have a great day!

Dan

*From:*asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] *On Behalf Of *Telium 
Technical Support

*Sent:* Wednesday, March 15, 2017 1:52 PM
*To:* 'Asterisk Users Mailing List - Non-Commercial Discussion'
*Subject:* Re: [asterisk-users] Having problem getting Asterisk to 
work on CentOS 7


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-boun...@lists.digium.com 
<mailto:asterisk-users-boun...@lists.digium.com>[mailto:asterisk-users-boun...@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@lists.digium.com <mailto:asterisk-users@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

Simply looking for guidance on what the correct approach to solve this 
problem is.


Have a great day!

Dan

*From:*asterisk-users-boun...@lists.digium.com 
<mailto:asterisk-users-boun...@lists.digium.com>[mailto:asterisk-users-boun...@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

Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-15 Thread Ron Wheeler


Have you tried to turn of Selinux permanently?
I don't see why it would be required on a system that has no users.
In /etc/selinux/config I set SELINUX to disabled

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes 
are protected.

# mls - Multi Level Security protection.
SELINUXTYPE=targeted

This will make sure that you start up without Selinux.

This may partition your problem so that you know where to focus.

I use systemd for everything.
All of my servers are running some version of CentOS 7

Ron

On 15/03/2017 12:40 PM, Dan Cropp wrote:


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

Simply looking for guidance on what the correct approach to solve this 
problem is.


Have a great day!

Dan

*From:*asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@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**





--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-15 Thread Dan Cropp
Just a quick update.
Problem seems to have been with the init.d script.

I decided to re-set SElinux to enabled just to verify while using the systemd.  
Even after a restart, asterisk is running with SElinux enabled.

Thanks to everyone on asterisk-users for helping me solve my problem.

Dan

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Dan Cropp
Sent: Wednesday, March 15, 2017 3:07 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 
7

Thank you Jason

After following your steps, Asterisk starts up each time even after the reset.

I will look into creating an SELinux policy exception for Asterisk.

Have a great day!

Dan

From: 
asterisk-users-boun...@lists.digium.com<mailto:asterisk-users-boun...@lists.digium.com>
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Telium Technical 
Support
Sent: Wednesday, March 15, 2017 1:52 PM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 
7

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-boun...@lists.digium.com<mailto:asterisk-users-boun...@lists.digium.com>
 [mailto:asterisk-users-boun...@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@lists.digium.com<mailto:asterisk-users@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

Simply looking for guidance on what the correct approach to solve this problem 
is.

Have a great day!

Dan


From: 
asterisk-users-boun...@lists.digium.com<mailto:asterisk-users-boun...@lists.digium.com>
 [mailto:asterisk-users-boun...@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 h

Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-15 Thread Dan Cropp
Thank you Jason

After following your steps, Asterisk starts up each time even after the reset.

I will look into creating an SELinux policy exception for Asterisk.

Have a great day!

Dan

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Telium Technical 
Support
Sent: Wednesday, March 15, 2017 1:52 PM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 
7

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-boun...@lists.digium.com<mailto:asterisk-users-boun...@lists.digium.com>
 [mailto:asterisk-users-boun...@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@lists.digium.com<mailto:asterisk-users@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

Simply looking for guidance on what the correct approach to solve this problem 
is.

Have a great day!

Dan


From: 
asterisk-users-boun...@lists.digium.com<mailto:asterisk-users-boun...@lists.digium.com>
 [mailto:asterisk-users-boun...@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 cr

Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-15 Thread Telium Technical Support
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-boun...@lists.digium.com
[mailto:asterisk-users-boun...@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@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-boun...@lists.digium.com>
asterisk-users-boun...@lists.digium.com [
<mailto:asterisk-users-boun...@lists.digium.com>
mailto:asterisk-users-boun...@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*
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asteris

Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-15 Thread Dan Cropp
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

Simply looking for guidance on what the correct approach to solve this problem 
is.

Have a great day!
Dan


From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@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*
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-15 Thread Telium Technical Support
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*
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-15 Thread Dan Cropp
Some background to make sure this is the right track.  SELINUX does seem to be 
the problem on startup.

The audit.log I provided is what is happening prior to executing 'setenforce 0'

Looking at astdb.sqlite3, there is only one table astdb.  It has one record, 
which contains a key and value pair.
Key is /pbx/UUID
Value .

Trying to understand where I should be focusing my efforts for the first 
problem of it not starting after a restart.

Is sqlite3 and the astdb.sqlite3 errors from the audit.log the place I should 
be looking into?
Or is the SELINUX issue the correct place for me to be looking?  Seems to 
startup if I run the 'setenforce 0' (or change SELINUX setting).
Or would it be best for me to be looking into using systemd based on possible 
problems with safe_asterisk?


From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Ron Wheeler
Sent: Wednesday, March 15, 2017 10:14 AM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 
7

What are you using for the database - SQLite?
I am using mysql (mariadb).

I am not familiar with SQLlite. Can you access the database from the console - 
look up the list of tables - display the contents from a table? Anything to see 
if your SQLite is working and has asterisk data in it.
>From your Asterisk console,


CLI> core show help database
should give you a list of commands that you can try.



database show  -- Shows database contents

database showkey   -- Shows database contents
would seem to let you know if you have a database that works.
Never had to do this but it seems an easy way to test your database connection.

Do you have webmin installed on your Centos7 box. I find that this is a handy 
web/graphical interface to Centos7.

On 15/03/2017 10:55 AM, Dan Cropp wrote:

Here is the audit.log.

Does this indicate a problem with accessing the astdb.sqlite3 file?



Permissions for this file are...

[root@localhost ~]# ls -l /var/lib/asterisk/astdb.sqlite3

-rw-r--r--. 1 root root 5120 Mar 15 09:39 /var/lib/asterisk/astdb.sqlite3





[root@localhost ~]#  tail -f /var/log/audit/audit.log

type=AVC msg=audit(1489588773.253:1171): avc:  denied  { read } for  pid=3838 
comm="asterisk" name="astdb.sqlite3" dev="dm-0" ino=100884225 
scontext=system_u:system_r:asterisk_t:s0 
tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file

type=SYSCALL msg=audit(1489588773.253:1171): arch=c03e syscall=2 success=no 
exit=-13 a0=aa5080 a1=8 a2=1a4 a3=aa5080 items=0 ppid=1485 pid=3838 
auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 
tty=(none) ses=4294967295 comm="asterisk" exe="/usr/sbin/asterisk" 
subj=system_u:system_r:asterisk_t:s0 key=(null)

type=AVC msg=audit(1489588777.432:1172): avc:  denied  { getattr } for  
pid=3844 comm="asterisk" path="/var/lib/asterisk/astdb.sqlite3" dev="dm-0" 
ino=100884225 scontext=system_u:system_r:asterisk_t:s0 
tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file

type=SYSCALL msg=audit(1489588777.432:1172): arch=c03e syscall=4 success=no 
exit=-13 a0=7ffec8193380 a1=7ffec81933c0 a2=7ffec81933c0 a3=8913bc items=0 
ppid=1485 pid=3844 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 
sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="asterisk" 
exe="/usr/sbin/asterisk" subj=system_u:system_r:asterisk_t:s0 key=(null)

type=AVC msg=audit(1489588777.435:1173): avc:  denied  { getattr } for  
pid=3844 comm="asterisk" path="/var/lib/asterisk/astdb.sqlite3" dev="dm-0" 
ino=100884225 scontext=system_u:system_r:asterisk_t:s0 
tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file

type=SYSCALL msg=audit(1489588777.435:1173): arch=c03e syscall=4 success=no 
exit=-13 a0=26a1240 a1=7ffec8192cd0 a2=7ffec8192cd0 a3=7ffec81929f0 items=0 
ppid=1485 pid=3844 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 
sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="asterisk" 
exe="/usr/sbin/asterisk" subj=system_u:system_r:asterisk_t:s0 key=(null)

type=AVC msg=audit(1489588777.435:1174): avc:  denied  { read write } for  
pid=3844 comm="asterisk" name="astdb.sqlite3" dev="dm-0" ino=100884225 
scontext=system_u:system_r:asterisk_t:s0 
tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file

type=SYSCALL msg=audit(1489588777.435:1174): arch=c03e syscall=2 success=no 
exit=-13 a0=26a1240 a1=80042 a2=1a4 a3=7ffec8192920 items=0 ppid=1485 pid=3844 
auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 
tty=(none) ses=4294967295 comm="asterisk" exe="/usr/sbin/asterisk" 
subj=system_u:system_r:asterisk_t:s0 key=(null)

type=AVC msg=audit(1489588777.435:1175): avc:  denied  { read } for  pid=3844 
comm="asterisk" name="astdb.sqlit

Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-15 Thread Ron Wheeler
" subj=system_u:system_r:asterisk_t:s0 
key=(null)
type=AVC msg=audit(1489588781.633:1177): avc:  denied  { getattr } for  pid=3851 comm="asterisk" 
path="/var/lib/asterisk/astdb.sqlite3" dev="dm-0" ino=100884225 
scontext=system_u:system_r:asterisk_t:s0 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file
type=SYSCALL msg=audit(1489588781.633:1177): arch=c03e syscall=4 success=no exit=-13 a0=27cf470 
a1=7a2517d0 a2=7a2517d0 a3=7a2514f0 items=0 ppid=1485 pid=3851 auid=4294967295 uid=0 
gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 
comm="asterisk" exe="/usr/sbin/asterisk" subj=system_u:system_r:asterisk_t:s0 
key=(null)
type=AVC msg=audit(1489588781.633:1178): avc:  denied  { read write } for  pid=3851 comm="asterisk" 
name="astdb.sqlite3" dev="dm-0" ino=100884225 scontext=system_u:system_r:asterisk_t:s0 
tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file
type=SYSCALL msg=audit(1489588781.633:1178): arch=c03e syscall=2 success=no exit=-13 a0=27cf470 
a1=80042 a2=1a4 a3=7a251420 items=0 ppid=1485 pid=3851 auid=4294967295 uid=0 gid=0 euid=0 
suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="asterisk" 
exe="/usr/sbin/asterisk" subj=system_u:system_r:asterisk_t:s0 key=(null)
type=AVC msg=audit(1489588781.633:1179): avc:  denied  { read } for  pid=3851 comm="asterisk" 
name="astdb.sqlite3" dev="dm-0" ino=100884225 scontext=system_u:system_r:asterisk_t:s0 
tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file
type=SYSCALL msg=audit(1489588781.633:1179): arch=c03e syscall=2 success=no exit=-13 a0=27cf470 
a1=8 a2=1a4 a3=27cf470 items=0 ppid=1485 pid=3851 auid=4294967295 uid=0 gid=0 euid=0 suid=0 
fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="asterisk" 
exe="/usr/sbin/asterisk" subj=system_u:system_r:asterisk_t:s0 key=(null)
type=AVC msg=audit(1489588785.830:1180): avc:  denied  { getattr } for  pid=3857 comm="asterisk" 
path="/var/lib/asterisk/astdb.sqlite3" dev="dm-0" ino=100884225 
scontext=system_u:system_r:asterisk_t:s0 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file
type=SYSCALL msg=audit(1489588785.830:1180): arch=c03e syscall=4 success=no exit=-13 
a0=7ffd6605ff40 a1=7ffd6605ff80 a2=7ffd6605ff80 a3=8913bc items=0 ppid=1485 pid=3857 
auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 
comm="asterisk" exe="/usr/sbin/asterisk" subj=system_u:system_r:asterisk_t:s0 
key=(null)
type=AVC msg=audit(1489588785.834:1181): avc:  denied  { getattr } for  pid=3857 comm="asterisk" 
path="/var/lib/asterisk/astdb.sqlite3" dev="dm-0" ino=100884225 
scontext=system_u:system_r:asterisk_t:s0 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file
type=SYSCALL msg=audit(1489588785.834:1181): arch=c03e syscall=4 success=no exit=-13 a0=1be0de0 
a1=7ffd6605f890 a2=7ffd6605f890 a3=7ffd6605f5b0 items=0 ppid=1485 pid=3857 auid=4294967295 uid=0 
gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 
comm="asterisk" exe="/usr/sbin/asterisk" subj=system_u:system_r:asterisk_t:s0 
key=(null)
type=AVC msg=audit(1489588785.834:1182): avc:  denied  { read write } for  pid=3857 comm="asterisk" 
name="astdb.sqlite3" dev="dm-0" ino=100884225 scontext=system_u:system_r:asterisk_t:s0 
tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file
type=SYSCALL msg=audit(1489588785.834:1182): arch=c03e syscall=2 success=no exit=-13 a0=1be0de0 
a1=80042 a2=1a4 a3=7ffd6605f4e0 items=0 ppid=1485 pid=3857 auid=4294967295 uid=0 gid=0 euid=0 
suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="asterisk" 
exe="/usr/sbin/asterisk" subj=system_u:system_r:asterisk_t:s0 key=(null)
type=AVC msg=audit(1489588785.834:1183): avc:  denied  { read } for  pid=3857 comm="asterisk" 
name="astdb.sqlite3" dev="dm-0" ino=100884225 scontext=system_u:system_r:asterisk_t:s0 
tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file
type=SYSCALL msg=audit(1489588785.834:1183): arch=c03e syscall=2 success=no exit=-13 a0=1be0de0 
a1=8 a2=1a4 a3=1be0de0 items=0 ppid=1485 pid=3857 auid=4294967295 uid=0 gid=0 euid=0 suid=0 
fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="asterisk" 
exe="/usr/sbin/asterisk" subj=system_u:system_r:asterisk_t:s0 key=(null)


-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Tzafrir Cohen
Sent: Wednesday, March 15, 2017 3:29 AM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 
7

On Tue, Mar 14, 2017 at 02:46:19PM -0400, R

Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-15 Thread Dan Cropp
 write } for  
pid=3851 comm="asterisk" name="astdb.sqlite3" dev="dm-0" ino=100884225 
scontext=system_u:system_r:asterisk_t:s0 
tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file
type=SYSCALL msg=audit(1489588781.633:1178): arch=c03e syscall=2 success=no 
exit=-13 a0=27cf470 a1=80042 a2=1a4 a3=7a251420 items=0 ppid=1485 pid=3851 
auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 
tty=(none) ses=4294967295 comm="asterisk" exe="/usr/sbin/asterisk" 
subj=system_u:system_r:asterisk_t:s0 key=(null)
type=AVC msg=audit(1489588781.633:1179): avc:  denied  { read } for  pid=3851 
comm="asterisk" name="astdb.sqlite3" dev="dm-0" ino=100884225 
scontext=system_u:system_r:asterisk_t:s0 
tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file
type=SYSCALL msg=audit(1489588781.633:1179): arch=c03e syscall=2 success=no 
exit=-13 a0=27cf470 a1=8 a2=1a4 a3=27cf470 items=0 ppid=1485 pid=3851 
auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 
tty=(none) ses=4294967295 comm="asterisk" exe="/usr/sbin/asterisk" 
subj=system_u:system_r:asterisk_t:s0 key=(null)
type=AVC msg=audit(1489588785.830:1180): avc:  denied  { getattr } for  
pid=3857 comm="asterisk" path="/var/lib/asterisk/astdb.sqlite3" dev="dm-0" 
ino=100884225 scontext=system_u:system_r:asterisk_t:s0 
tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file
type=SYSCALL msg=audit(1489588785.830:1180): arch=c03e syscall=4 success=no 
exit=-13 a0=7ffd6605ff40 a1=7ffd6605ff80 a2=7ffd6605ff80 a3=8913bc items=0 
ppid=1485 pid=3857 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 
sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="asterisk" 
exe="/usr/sbin/asterisk" subj=system_u:system_r:asterisk_t:s0 key=(null)
type=AVC msg=audit(1489588785.834:1181): avc:  denied  { getattr } for  
pid=3857 comm="asterisk" path="/var/lib/asterisk/astdb.sqlite3" dev="dm-0" 
ino=100884225 scontext=system_u:system_r:asterisk_t:s0 
tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file
type=SYSCALL msg=audit(1489588785.834:1181): arch=c03e syscall=4 success=no 
exit=-13 a0=1be0de0 a1=7ffd6605f890 a2=7ffd6605f890 a3=7ffd6605f5b0 items=0 
ppid=1485 pid=3857 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 
sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="asterisk" 
exe="/usr/sbin/asterisk" subj=system_u:system_r:asterisk_t:s0 key=(null)
type=AVC msg=audit(1489588785.834:1182): avc:  denied  { read write } for  
pid=3857 comm="asterisk" name="astdb.sqlite3" dev="dm-0" ino=100884225 
scontext=system_u:system_r:asterisk_t:s0 
tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file
type=SYSCALL msg=audit(1489588785.834:1182): arch=c03e syscall=2 success=no 
exit=-13 a0=1be0de0 a1=80042 a2=1a4 a3=7ffd6605f4e0 items=0 ppid=1485 pid=3857 
auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 
tty=(none) ses=4294967295 comm="asterisk" exe="/usr/sbin/asterisk" 
subj=system_u:system_r:asterisk_t:s0 key=(null)
type=AVC msg=audit(1489588785.834:1183): avc:  denied  { read } for  pid=3857 
comm="asterisk" name="astdb.sqlite3" dev="dm-0" ino=100884225 
scontext=system_u:system_r:asterisk_t:s0 
tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file
type=SYSCALL msg=audit(1489588785.834:1183): arch=c03e syscall=2 success=no 
exit=-13 a0=1be0de0 a1=8 a2=1a4 a3=1be0de0 items=0 ppid=1485 pid=3857 
auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 
tty=(none) ses=4294967295 comm="asterisk" exe="/usr/sbin/asterisk" 
subj=system_u:system_r:asterisk_t:s0 key=(null)


-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Tzafrir Cohen
Sent: Wednesday, March 15, 2017 3:29 AM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 
7

On Tue, Mar 14, 2017 at 02:46:19PM -0400, Ron Wheeler wrote:
> https://docs.fedoraproject.org/en-US/Fedora/11/html/Security-Enhanced_
> Linux/sect-Security-Enhanced_Linux-Working_with_SELinux-Enabling_and_D
> isabling_SELinux.html
> 
> If disabling Selinux solves your problem, then your problem may be 
> related to Selinux.
> If it does not change yout problem, you may want to look elsewhere.
> 
> It seems that a lot of  things do not work with Selinux or 
> have no instructions about how to make them work with Selinux that it 
> almost seems like a useless feature.

Many things work well, once properly configured. Looking at the exact error 
(again, audit.log) is the first step.

Once upon a time Asterisk used to be able to run with SELinux:
https://issues.asterisk.org/jira/browse/ASTERISK-30

Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-15 Thread Tzafrir Cohen
On Tue, Mar 14, 2017 at 02:46:19PM -0400, Ron Wheeler wrote:
> https://docs.fedoraproject.org/en-US/Fedora/11/html/Security-Enhanced_Linux/sect-Security-Enhanced_Linux-Working_with_SELinux-Enabling_and_Disabling_SELinux.html
> 
> If disabling Selinux solves your problem, then your problem may be related
> to Selinux.
> If it does not change yout problem, you may want to look elsewhere.
> 
> It seems that a lot of  things do not work with Selinux or have
> no instructions about how to make them work with Selinux that it almost
> seems like a useless feature.

Many things work well, once properly configured. Looking at the exact
error (again, audit.log) is the first step.

Once upon a time Asterisk used to be able to run with SELinux:
https://issues.asterisk.org/jira/browse/ASTERISK-3088

The problem may be missing a profile for Asterisk.

Or the fact that it interacts too much with other services? I'll have to
give it a shot. At least for a stand-alone Asterisk.

-- 
   Tzafrir Cohen
icq#16849755  jabber:tzafrir.co...@xorcom.com
+972-50-7952406   mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-14 Thread Dan Cropp
Thanks Tzafrir.

Upon further investigation it is safe_asterisk that was the process id I 
initially saw.  I believe this is what was installed when running make config 
to install the Initialization Scripts in the asterisk 13.14.0 source code
Asterisk did not start up previously on a restart.

I changed SELINUX setting in /etc/selinux/config (default was enforcing and I 
changed it to permissive).  After that, I was seeing the Asterisk PID.  
I didn't realize both safe_asterisk pid and asterisk pid were displaying when I 
executed pgrep asterisk.

Admittedly, I'm new to systemd.  I need to research it to learn what I need to 
do.

Dan Cropp
Senior Software Engineer, R Software Dept.
AMTELCO, 4800 Curtin Drive, McFarland, WI 53558-9424
608 838-4197 ext. 291
1-800-238-5275 ext 291
www.amtelco.com


Statement of Confidentiality
The contents of this e-mail message and any attachments are confidential to 
American Tel-A-Systems, Inc. (AMTELCO), and are intended solely for the 
addressee(s). The information contained in this transmission also may be of a 
legally privileged nature. This transmission is sent in trust and is meant 
solely for delivery to the intended recipient(s). Receipt of this transmission 
does not convey any right to reproduce or disseminate any of the information it 
contains. If you are not the intended recipient, please immediately notify the 
sender by reply e-mail or telephone and delete this message and any attachments.


-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Tzafrir Cohen
Sent: Tuesday, March 14, 2017 1:18 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 
7

On Tue, Mar 14, 2017 at 05:09:17PM +, Dan Cropp wrote:
> Thank you Tzafrir.
> 
> I had been using different users in earlier attempts to make this work.  
> Decided to try everything where root is the only user, simply to verify it's 
> working.
> 
> For problem 2, where asterisk is writing to the log but doesn't seem to 
> receive the SIP packets even though tcpdump indicates they are making it to 
> the box on 5060, I am starting asterisk while logged in as root.
> /usr/sbin/asterisk -dddc
> 
> 
> For problem 1, where it seems to be stuck when running as a service, I simply 
> reboot the machine.  Then I log it as root and notice it's not writing to the 
> log.
> 
> When running it as a service (after restart).  Here is what the output 
> from strace -p $PID_OF_ASTERISK
> 
>  [root@localhost ~]# strace -p 1470

pkill? nice? That is not asterisk. Are you sure you got the right process? 
Maybe you got safe_asterisk instead? If it is safe_asterisk:

1. That script is pointless now that you have systemd. Replace it with a simple 
systemd unit (hint: Restart=on-failure gets you most of the way there).

Isn't there one already included with Asterisk by now?

2. Use the option -f of strace to see the exact error message. What is error 
status 34 of asterisk? ERANGE?

-- 
   Tzafrir Cohen
icq#16849755  jabber:tzafrir.co...@xorcom.com
+972-50-7952406   mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-14 Thread Ron Wheeler

https://docs.fedoraproject.org/en-US/Fedora/11/html/Security-Enhanced_Linux/sect-Security-Enhanced_Linux-Working_with_SELinux-Enabling_and_Disabling_SELinux.html

If disabling Selinux solves your problem, then your problem may be 
related to Selinux.

If it does not change yout problem, you may want to look elsewhere.

It seems that a lot of  things do not work with Selinux or 
have no instructions about how to make them work with Selinux that it 
almost seems like a useless feature.


Ron

On 14/03/2017 2:21 PM, Tzafrir Cohen wrote:

On Tue, Mar 14, 2017 at 06:03:33PM +0100, Jean Aunis wrote:

Hello,

Did you disable selinux ? It usually causes troubles when starting asterisk
as a service. You can do this with : setenforce 0 (this will not totally
disable selinux, but switch it to a permissive mode).

Generally before advising that, check if this is the error:

   tail -f /var/log/audit/audit.log

and try the command.

Is there any open bug for a security policy for Asterisk?




--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-14 Thread Ron Wheeler

I have  FreePBX 14.0.1beta20 running on Centos 7.3.

What problems are you having?
The latest emails don't have any details about the problem or what you 
have tried.


Ron

On 14/03/2017 2:21 PM, Tzafrir Cohen wrote:

On Tue, Mar 14, 2017 at 06:03:33PM +0100, Jean Aunis wrote:

Hello,

Did you disable selinux ? It usually causes troubles when starting asterisk
as a service. You can do this with : setenforce 0 (this will not totally
disable selinux, but switch it to a permissive mode).

Generally before advising that, check if this is the error:

   tail -f /var/log/audit/audit.log

and try the command.

Is there any open bug for a security policy for Asterisk?




--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-14 Thread Eric Wieling
This is what I hacked up for my CentOS 7 Asterisk server.   It does NOT act
like safe_asterisk.

[Unit]
Description=Asterisk PBX and telephony daemon
Documentation=man:asterisk(8)
After=network-online.target multi-user.target

[Service]
Type=simple
User=root
Group=root
Environment=HOME=/var/lib/asterisk
WorkingDirectory=/var/lib/asterisk
ExecStart=/usr/sbin/asterisk -f -C /etc/asterisk/asterisk.conf
ExecStop=/usr/sbin/asterisk -rx 'core stop now'
ExecReload=/usr/bin/asterisk -rx 'core reload'

[Install]
WantedBy=multi-user.target


On Tue, Mar 14, 2017 at 2:18 PM, Tzafrir Cohen 
wrote:

> On Tue, Mar 14, 2017 at 05:09:17PM +, Dan Cropp wrote:
> > Thank you Tzafrir.
> >
> > I had been using different users in earlier attempts to make this work.
> Decided to try everything where root is the only user, simply to verify
> it's working.
> >
> > For problem 2, where asterisk is writing to the log but doesn't seem to
> receive the SIP packets even though tcpdump indicates they are making it to
> the box on 5060, I am starting asterisk while logged in as root.
> > /usr/sbin/asterisk -dddc
> >
> >
> > For problem 1, where it seems to be stuck when running as a service, I
> simply reboot the machine.  Then I log it as root and notice it's not
> writing to the log.
> >
> > When running it as a service (after restart).  Here is what the output
> from strace -p $PID_OF_ASTERISK
> >
> >  [root@localhost ~]# strace -p 1470
>
> pkill? nice? That is not asterisk. Are you sure you got the right
> process? Maybe you got safe_asterisk instead? If it is safe_asterisk:
>
> 1. That script is pointless now that you have systemd. Replace it with a
> simple systemd unit (hint: Restart=on-failure gets you most of the way
> there).
>
> Isn't there one already included with Asterisk by now?
>
> 2. Use the option -f of strace to see the exact error message. What is
> error status 34 of asterisk? ERANGE?
>
> --
>Tzafrir Cohen
> icq#16849755  jabber:tzafrir.co...@xorcom.com
> +972-50-7952406   mailto:tzafrir.co...@xorcom.com
> http://www.xorcom.com
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 

GMail: Making MS Outlook look good since 2007
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-14 Thread Tzafrir Cohen
On Tue, Mar 14, 2017 at 06:03:33PM +0100, Jean Aunis wrote:
> Hello,
> 
> Did you disable selinux ? It usually causes troubles when starting asterisk
> as a service. You can do this with : setenforce 0 (this will not totally
> disable selinux, but switch it to a permissive mode).

Generally before advising that, check if this is the error:

  tail -f /var/log/audit/audit.log

and try the command.

Is there any open bug for a security policy for Asterisk?

-- 
   Tzafrir Cohen
icq#16849755  jabber:tzafrir.co...@xorcom.com
+972-50-7952406   mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-14 Thread Tzafrir Cohen
On Tue, Mar 14, 2017 at 05:09:17PM +, Dan Cropp wrote:
> Thank you Tzafrir.
> 
> I had been using different users in earlier attempts to make this work.  
> Decided to try everything where root is the only user, simply to verify it's 
> working.
> 
> For problem 2, where asterisk is writing to the log but doesn't seem to 
> receive the SIP packets even though tcpdump indicates they are making it to 
> the box on 5060, I am starting asterisk while logged in as root.
> /usr/sbin/asterisk -dddc
> 
> 
> For problem 1, where it seems to be stuck when running as a service, I simply 
> reboot the machine.  Then I log it as root and notice it's not writing to the 
> log.
> 
> When running it as a service (after restart).  Here is what the output from 
> strace -p $PID_OF_ASTERISK
> 
>  [root@localhost ~]# strace -p 1470

pkill? nice? That is not asterisk. Are you sure you got the right
process? Maybe you got safe_asterisk instead? If it is safe_asterisk:

1. That script is pointless now that you have systemd. Replace it with a
simple systemd unit (hint: Restart=on-failure gets you most of the way
there).

Isn't there one already included with Asterisk by now?

2. Use the option -f of strace to see the exact error message. What is
error status 34 of asterisk? ERANGE?

-- 
   Tzafrir Cohen
icq#16849755  jabber:tzafrir.co...@xorcom.com
+972-50-7952406   mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-14 Thread Dan Cropp
Thank you Jean.

I changed selinux to permissive in the /etc/selinux/config and restarted.  
Asterisk was able to start up.  One oddity though, I now see two different pids 
for asterisk (pgrep asterisk).  Is this to be expected or do I still have 
something wrong?

For my second issue, after stopping firewalld, SIP traffic is now making it 
through to Asterisk.

I need to research both selinux and firewalld some more.  They are both new to 
me.

Have a great day!

Dan


From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Jean Aunis
Sent: Tuesday, March 14, 2017 12:04 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 
7


Hello,

Did you disable selinux ? It usually causes troubles when starting asterisk as 
a service. You can do this with : setenforce 0 (this will not totally disable 
selinux, but switch it to a permissive mode).

For your second point, maybe you should check that firewalld is either stopped 
or configured properly. By default it has  quite restrictive rules.

Best regards

Jean Aunis

Le 14/03/2017 à 17:45, Dan Cropp a écrit :
Some background information.

I have used Debian with Asterisk for several years.  Have encountered zero 
problems.
I am now trying to setup an Asterisk on a CentOS7 box using VMWare Workstation. 
 I am brand new to CentOS and RHEL so I may be missing something obvious.

I am installing CentOS Minimal Install and Asterisk from Source.  (I have 
installed Asterisk from Source on Debian hundreds of times without any 
problems).
After installing CentOS (only root user), I update CentOS.  I then install the 
CentOS "Development Tools".
Also install, I install net-tools and wget.

After that, I am following the Wiki pages for Asterisk from Source.
https://wiki.asterisk.org/wiki/display/AST/Installing+Asterisk+From+Source
Retrieve the asterisk-13-current.tar.gz and the pjproject-2.6.tar.bz2

I uncompress them, run the asterisk install_prereq script to install all 
required packages.
I configure PJPROJECT, make dep, make, make install, and ldconfig

After that, I install asterisk
./configure
make menuselect
make
make install
make samples
make progdocs
make config

After that, I modify the asterisk conf files for a couple pjsip endpoints and 
turn on debugging and verbosity.  Copying settings from another box which is 
working.

I am seeing two different issues

First, when I restart the box, the asterisk process is present.  However, it's 
not writing anything to the log files so it seems to be stuck.  Any idea why 
running Asterisk as a service after the make config would not seem to fully 
start up?

Second, I stop the asterisk service.  Make sure asterisk process is not 
present.  Then, I start it up manually going to the console.  Everything is 
running.  I see information written to the asterisk log files.  However, I try 
to connect phones to this and it does not work.  I used tcpdump to verify the 
SIP packets are making it to the CentOS box, however Asterisk is not seeing the 
SIP messages.
I run netstat -apn | grep -i asterisk and see Asterisk udp with port 5060.
The one thing I notice is my Debian installations have always been eth0.  
CentOS is using the newer ens33.  Might this cause a proble?
Any suggestions?

Have a great day!

Dan



-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-14 Thread Dan Cropp
_sigaction(SIGINT, {0x43e670, [], SA_RESTORER, 0x7f1a0245b250}, {SIG_IGN, [], 
SA_RESTORER, 0x7f1a0245b250}, 8) = 0
rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, {0x43e670, [], 
SA_RESTORER, 0x7f1a0245b250}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, {SIG_IGN, [], 
SA_RESTORER, 0x7f1a0245b250}, 8) = 0
pipe([3, 4])= 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, 
child_tidptr=0x7f1a02e24a10) = 2513
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGCHLD, {0x441200, [], SA_RESTORER|SA_RESTART, 0x7f1a0245b250}, 
{0x441200, [], SA_RESTORER|SA_RESTART, 0x7f1a0245b250}, 8) = 0
close(4)= 0
read(3, "2017-03-14T12:01:01-0500\n", 128) = 25
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2513, si_status=0, 
si_utime=0, si_stime=0} ---
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG, NULL) = 2513
wait4(-1, 0x7ffd2cbd3b10, WNOHANG, NULL) = -1 ECHILD (No child processes)
rt_sigreturn()  = 25
read(3, "", 128)= 0
close(3)= 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x43e670, [], SA_RESTORER, 0x7f1a0245b250}, {SIG_IGN, [], 
SA_RESTORER, 0x7f1a0245b250}, 8) = 0
rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, {0x43e670, [], 
SA_RESTORER, 0x7f1a0245b250}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, {SIG_IGN, [], 
SA_RESTORER, 0x7f1a0245b250}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
stat("/tmp/core.2511", 0x7ffd2cbd4370)  = -1 ENOENT (No such file or directory)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
stat("/tmp/core", 0x7ffd2cbd4260)   = -1 ENOENT (No such file or directory)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
open("/dev/tty9", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
fcntl(1, F_GETFD)   = 0
fcntl(1, F_DUPFD, 10)   = 10
fcntl(1, F_GETFD)   = 0
fcntl(10, F_SETFD, FD_CLOEXEC)  = 0
dup2(3, 1)  = 1
close(3)= 0
write(1, "Automatically restarting Asteris"..., 35) = 35
dup2(10, 1) = 1
fcntl(10, F_GETFD)  = 0x1 (flags FD_CLOEXEC)
close(10)   = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
stat("/bin/sleep", {st_mode=S_IFREG|0755, st_size=33112, ...}) = 0
stat("/bin/sleep", {st_mode=S_IFREG|0755, st_size=33112, ...}) = 0
geteuid()   = 0
getegid()   = 0
getuid()= 0
getgid()= 0
access("/bin/sleep", X_OK)  = 0
stat("/bin/sleep", {st_mode=S_IFREG|0755, st_size=33112, ...}) = 0
geteuid()   = 0
getegid()   = 0
getuid()= 0
getgid()= 0
access("/bin/sleep", R_OK)  = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [INT CHLD], 8) = 0
rt_sigprocmask(SIG_SETMASK, [INT CHLD], NULL, 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, 
child_tidptr=0x7f1a02e24a10) = 2514
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x43e670, [], SA_RESTORER, 0x7f1a0245b250}, {SIG_IGN, [], 
SA_RESTORER, 0x7f1a0245b250}, 8) = 0
rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0x7f1a0245b250}, {0x43e670, [], 
SA_RESTORER, 0x7f1a0245b250}, 8) = 0
wait4(-1,


Have a great day!

Dan

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Tzafrir Cohen
Sent: Tuesday, March 14, 2017 11:54 AM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 
7

On Tue, Mar 14, 2017 at 04:45:38PM +, Dan Cropp wrote:

> After that, I modify the asterisk conf files for a couple pjsip endpoints and 

Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-14 Thread Jean Aunis

Hello,

Did you disable selinux ? It usually causes troubles when starting 
asterisk as a service. You can do this with : setenforce 0 (this will 
not totally disable selinux, but switch it to a permissive mode).


For your second point, maybe you should check that firewalld is either 
stopped or configured properly. By default it has  quite restrictive rules.


Best regards

Jean Aunis


Le 14/03/2017 à 17:45, Dan Cropp a écrit :


Some background information.

I have used Debian with Asterisk for several years.  Have encountered 
zero problems.


I am now trying to setup an Asterisk on a CentOS7 box using VMWare 
Workstation.  I am brand new to CentOS and RHEL so I may be missing 
something obvious.


I am installing CentOS Minimal Install and Asterisk from Source.  (I 
have installed Asterisk from Source on Debian hundreds of times 
without any problems).


After installing CentOS (only root user), I update CentOS.  I then 
install the CentOS “Development Tools”.


Also install, I install net-tools and wget.

After that, I am following the Wiki pages for Asterisk from Source.

https://wiki.asterisk.org/wiki/display/AST/Installing+Asterisk+From+Source

Retrieve the asterisk-13-current.tar.gz and the pjproject-2.6.tar.bz2

I uncompress them, run the asterisk install_prereq script to install 
all required packages.


I configure PJPROJECT, make dep, make, make install, and ldconfig

After that, I install asterisk

./configure

make menuselect

make

make install

make samples

make progdocs

make config

After that, I modify the asterisk conf files for a couple pjsip 
endpoints and turn on debugging and verbosity.  Copying settings from 
another box which is working.


I am seeing two different issues….

First, when I restart the box, the asterisk process is present.  
However, it’s not writing anything to the log files so it seems to be 
stuck.  Any idea why running Asterisk as a service after the make 
config would not seem to fully start up?


Second, I stop the asterisk service.  Make sure asterisk process is 
not present.  Then, I start it up manually going to the console.  
Everything is running.  I see information written to the asterisk log 
files.  However, I try to connect phones to this and it does not 
work.  I used tcpdump to verify the SIP packets are making it to the 
CentOS box, however Asterisk is not seeing the SIP messages.


I run netstat -apn | grep -i asterisk and see Asterisk udp with port 5060.

The one thing I notice is my Debian installations have always been 
eth0.  CentOS is using the newer ens33.  Might this cause a proble?


Any suggestions?

Have a great day!

Dan





-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-14 Thread Tzafrir Cohen
On Tue, Mar 14, 2017 at 04:45:38PM +, Dan Cropp wrote:

> After that, I modify the asterisk conf files for a couple pjsip endpoints and 
> turn on debugging and verbosity.  Copying settings from another box which is 
> working.
> 
> I am seeing two different issues
> 
> First, when I restart the box, the asterisk process is present.  However, 
> it's not writing anything to the log files so it seems to be stuck.  Any idea 
> why running Asterisk as a service after the make config would not seem to 
> fully start up?

You mentioned starting asterisk manually. Do you do that with the proper
permissions (assuming you do run Asterisk as a non-root user, as you
should). Any chance asterisk does not have write permissions to the log
files?

Failing that, try strace.

  strace -p $PID_OF_ASTERISk

Maybe also add -f and / or -o if there's too much output.

-- 
   Tzafrir Cohen
icq#16849755  jabber:tzafrir.co...@xorcom.com
+972-50-7952406   mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-14 Thread Dan Cropp
Some background information.

I have used Debian with Asterisk for several years.  Have encountered zero 
problems.
I am now trying to setup an Asterisk on a CentOS7 box using VMWare Workstation. 
 I am brand new to CentOS and RHEL so I may be missing something obvious.

I am installing CentOS Minimal Install and Asterisk from Source.  (I have 
installed Asterisk from Source on Debian hundreds of times without any 
problems).
After installing CentOS (only root user), I update CentOS.  I then install the 
CentOS "Development Tools".
Also install, I install net-tools and wget.

After that, I am following the Wiki pages for Asterisk from Source.
https://wiki.asterisk.org/wiki/display/AST/Installing+Asterisk+From+Source
Retrieve the asterisk-13-current.tar.gz and the pjproject-2.6.tar.bz2

I uncompress them, run the asterisk install_prereq script to install all 
required packages.
I configure PJPROJECT, make dep, make, make install, and ldconfig

After that, I install asterisk
./configure
make menuselect
make
make install
make samples
make progdocs
make config

After that, I modify the asterisk conf files for a couple pjsip endpoints and 
turn on debugging and verbosity.  Copying settings from another box which is 
working.

I am seeing two different issues

First, when I restart the box, the asterisk process is present.  However, it's 
not writing anything to the log files so it seems to be stuck.  Any idea why 
running Asterisk as a service after the make config would not seem to fully 
start up?

Second, I stop the asterisk service.  Make sure asterisk process is not 
present.  Then, I start it up manually going to the console.  Everything is 
running.  I see information written to the asterisk log files.  However, I try 
to connect phones to this and it does not work.  I used tcpdump to verify the 
SIP packets are making it to the CentOS box, however Asterisk is not seeing the 
SIP messages.
I run netstat -apn | grep -i asterisk and see Asterisk udp with port 5060.
The one thing I notice is my Debian installations have always been eth0.  
CentOS is using the newer ens33.  Might this cause a proble?
Any suggestions?

Have a great day!

Dan
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users