Asterisk not starting

Dear Asterisk Gurus,

Please help me to understand why Asterisk won’t start. Here is all the information that seems relevant to me but if you need more I’ll oblige.

asterisk.pid and asterisk.ctl exist in TWO PLACES.

In /var/run/asterisk there exist files called asterisk.pid and asterisk.ctl
In /var/run there exist files called asterisk.pid and asterisk.ctl

  • however, running # ps -A | grep asterisk. gives no output, suggesting asterisk is not running.

Similarly, running #asterisk -rvvvvv gives the output unable to connect to remote asterisk (does var/run/asterisk.ctl exist?)

And again giving the same impression,

#/etc/init.d/asterisk stop gives the output

Deleting the .ctl and .pid files and then attempting to start asterisk spawns new files (in both places) but does not actually start asterisk. The outputs of the above commands remain the same and the phones don’t register.

Here are the contents of /var/log/asterisk/messages that are generated when I attempt to start asterisk:

[Mar 2 13:14:21] NOTICE[4072] cdr.c: CDR simple logging enabled. [Mar 2 13:14:21] NOTICE[4072] loader.c: 179 modules will be loaded. [Mar 2 13:14:21] WARNING[4072] res_musiconhold.c: Cannot open dir /var/lib/asterisk/roh or dir does not exist [Mar 2 13:14:21] WARNING[4072] loader.c: Error loading module 'chan_dahdi.so': /usr/lib/asterisk/modules/chan_dahdi.so: undefined symbol: dahdi_chan_name_len [Mar 2 13:14:21] WARNING[4072] loader.c: Error loading module 'app_dahdibarge.so': /usr/lib/asterisk/modules/app_dahdibarge.so: undefined symbol: dahdi_chan_name [Mar 2 13:14:21] ERROR[4072] res_config_pgsql.c: Postgresql RealTime: Failed to connect database server asterisk on 127.0.0.1. Check debug for more info. [Mar 2 13:14:21] WARNING[4072] res_config_pgsql.c: Postgresql RealTime: Couldn't establish connection. Check debug. [Mar 2 13:14:21] NOTICE[4072] config.c: Registered Config Engine pgsql [Mar 2 13:14:21] WARNING[4072] res_smdi.c: No SMDI interfaces are available to listen on, not starting SMDI listener. [Mar 2 13:14:21] NOTICE[4072] res_odbc.c: Adding ENV var: INFORMIXSERVER=my_special_database [Mar 2 13:14:21] NOTICE[4072] res_odbc.c: Adding ENV var: INFORMIXDIR=/opt/informix [Mar 2 13:14:21] NOTICE[4072] res_odbc.c: res_odbc loaded. [Mar 2 13:14:21] WARNING[4072] loader.c: Error loading module 'app_dahdiras.so': /usr/lib/asterisk/modules/app_dahdiras.so: undefined symbol: dahdi_chan_name [Mar 2 13:14:21] WARNING[4072] loader.c: Error loading module 'app_dahdiscan.so': /usr/lib/asterisk/modules/app_dahdiscan.so: undefined symbol: dahdi_chan_name [Mar 2 13:14:21] NOTICE[4072] config.c: Registered Config Engine odbc [Mar 2 13:14:21] WARNING[4072] pbx.c: Already have an application 'VoiceMail' [Mar 2 13:14:21] WARNING[4072] pbx.c: Already have an application 'VoiceMailMain' [Mar 2 13:14:21] WARNING[4072] pbx.c: Already have an application 'MailboxExists' [Mar 2 13:14:21] WARNING[4072] pbx.c: Already have an application 'VMAuthenticate'

This situation arose on a previously solidly working 1.4 box after I installed asterisk-dev and attempted to compile and install a unistim driver. I ran into some problems with the driver install (but as far as I could tell the problem was just that the first version I tried wouldn’t even compile and the second one seemed to install correctly). In any case, when I realised asterisk had broken I immediately rolled back what I could by doing the following … to no avail:

  1. Restored the entire contents of /etc/asterisk from a known working backup
    2.Added

noload =>chan_unistim.so to /etc/asterisk/modules.conf.

What am I missing?

Many thanks in advance

Naomi

Hi,

What is the version of asterisk installed.

In /etc/asterisk/asterisk.conf file what is the astrundir mentioned. If it is /var/run change it to /var/run/asterisk.

Looks to me that you have modules which belong to a different version from the main program.