Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Centos 6.5 Asterisk 1.8.11.0 - starts in rc.local, but not contactible?


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
viljoens at verishare....
Guest





PostPosted: Thu Jul 23, 2015 4:10 am    Post subject: [asterisk-users] Centos 6.5 Asterisk 1.8.11.0 - starts in rc Reply with quote

Hi list

I'm trying to get Asterisk 1.8.11.0 to start automatically when my Centos
6.5 box boots.

I've done this many times before, but for some reason, on this box and
hardware (older Core i3 system, 4GB RAM) I cannot get Asterisk to be
contactible after boot.

E. g. in rc.local I have, as the last line

---
asterisk
---

as in all my other Asterisk boxes with Centos 6.5 and Asterisk 1. 8.11.0

This -does- start asterisk on boot, but you cannot connect to it using

asterisk -r

the error being

---
[root@asterisk ~]# asterisk -r
Asterisk 1.8.11.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.
=========================================================================
Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)
[root@asterisk ~]#
---

And I note that /var/run/asterisk.ctl does NOT exist, which is why asterisk
-r does not work...

I do note that there are error messages in /var/log/asterisk/messages, to
whit:

---
[Jul 23 10:59:31] WARNING[1863] loader.c: Error loading module
'codec_g729.so': /usr/lib/asterisk/modules/codec_g729.so: cannot enable
executable stack as shared object requires: Permission denied
[Jul 23 11:02:22] ERROR[1900] cdr_tds.c: Unable to connect: Adaptive Server
is unavailable or does not exist (20009)
[Jul 23 11:02:22] ERROR[1900] cdr_tds.c: Permission denied (13)
[Jul 23 11:02:22] ERROR[1900] cdr_tds.c: Unable to connect to sqlserver
---

However, if I kill -9 the "uncontactible" asterisk process and start it
manually as root, everything works and runs fine, and I can connect to the
running asterisk instance via asteriskr -r in a terminal.
The above error messages are not emitted if asterisk is started by hand like
this.

Why does Asterisk have persmission problems when started out of
/etc/rc.local (as root) vs. when I start it by hand while logged in as root?

No config changes made to Centos 6.5 except for installing it from DVD and
running a yum update.

Thanks

Stefan


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
webaccounts173 at jgoe...
Guest





PostPosted: Thu Jul 23, 2015 4:41 am    Post subject: [asterisk-users] Centos 6.5 Asterisk 1.8.11.0 - starts in rc Reply with quote

Quote:
I'm trying to get Asterisk 1.8.11.0 to start automatically when my Centos
6.5 box boots.

I've done this many times before, but for some reason, on this box and
hardware (older Core i3 system, 4GB RAM) I cannot get Asterisk to be
contactible after boot.

E. g. in rc.local I have, as the last line

---
asterisk
---

as in all my other Asterisk boxes with Centos 6.5 and Asterisk 1. 8.11.0

This -does- start asterisk on boot, but you cannot connect to it using

asterisk -r

the error being ...

Depending on the hardware you are using, simply calling asterisk might not be enough, as there
could be dependencies on third party drivers. Depending on how asterisk was installed, one
probably also has to look at various permissions. For example, asterisk -r might fail simply
because you are calling it from an account with insufficient rights. It's difficult to tell
given your information.

Just recently, I was caught by a user inflicted problem and spent some time evaluating SIP
messages...

Maybe the following will help. If you look into the contrib/init.d directory (inside the src
tree) you'll find the rc.redhat.asterisk script. Rename it and put it into the /etc/init.d
directory and issue "chkconfig --add asterisk" as well as "chkconfig asterisk on" and your
problem should be solved. You can check the current settings with "chkconfig --list asterisk".
The Redhat script works nicely under CentOS.

jg

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
viljoens at verishare....
Guest





PostPosted: Thu Jul 23, 2015 4:51 am    Post subject: [asterisk-users] Centos 6.5 Asterisk 1.8.11.0 - starts in rc Reply with quote

Hi JG

Thanks for replying.

Quote:
Depending on the hardware you are using, simply calling asterisk might not
be enough, as there
Quote:
could be dependencies on third party drivers. Depending on how asterisk was
installed, one
Quote:
probably also has to look at various permissions. For example, asterisk -r
might fail simply
Quote:
because you are calling it from an account with insufficient rights. It's
difficult to tell
Quote:
given your information.

Quote:
Maybe the following will help. If you look into the contrib/init.d
directory (inside the src
Quote:
tree) you'll find the rc.redhat.asterisk script. Rename it and put it into
the /etc/init.d
Quote:
directory and issue "chkconfig --add asterisk" as well as "chkconfig
asterisk on" and your
Quote:
problem should be solved. You can check the current settings with
"chkconfig --list asterisk".
Quote:
The Redhat script works nicely under CentOS.

Hmm ok - I made sure to run

make config

in the Asterisk source folder which installed the correct scripts into rc.d
and so forth.

I then did

chkconfig asterisk on

and rebooted the box.

The parameters remain the same, asterisk is there if you do a ps -aux | grep
asterisk but it still is in a non-working state and not contacible via
asterisk -r.

Since it is an old box and the reason for trying to get it going is mostly
academic, I think I'm just going to dump the box and reformat it with Centos
7.

Strange though, I have installed about 17 other boxes exactly this way on
broadly the same hardware and all are currently running fine with Centos 6.5
and Asterisk 1.8.11.0

Thanks anyway, the problem is clearly deeper than I though since even the
"official" way you detail above fails to start Asterisk as an account that
can start it on system boot.

Even when root is the only account on the machine - which leads me to
believe I have some basic error in my Centos 6.5 installation so I'll just
try it again or try Centos 7.

Thanks a lot.

Kind regards

Stefan


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
webaccounts173 at jgoe...
Guest





PostPosted: Thu Jul 23, 2015 4:55 am    Post subject: [asterisk-users] Centos 6.5 Asterisk 1.8.11.0 - starts in rc Reply with quote

Quote:
Hmm ok - I made sure to run

make config

in the Asterisk source folder which installed the correct scripts into rc.d
and so forth.

I then did

chkconfig asterisk on

and rebooted the box.

The parameters remain the same, asterisk is there if you do a ps -aux | grep
asterisk but it still is in a non-working state and not contacible via
asterisk -r.

Since it is an old box and the reason for trying to get it going is mostly
academic, I think I'm just going to dump the box and reformat it with Centos
7.

Strange though, I have installed about 17 other boxes exactly this way on
broadly the same hardware and all are currently running fine with Centos 6.5
and Asterisk 1.8.11.0

Thanks anyway, the problem is clearly deeper than I though since even the
"official" way you detail above fails to start Asterisk as an account that
can start it on system boot.

Even when root is the only account on the machine - which leads me to
believe I have some basic error in my Centos 6.5 installation so I'll just
try it again or try Centos 7.



Okey-dokey. What happens when you start asterisk with "asterisk -c" from a root account?

jg

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services