Page 1 of 1

Asterisk dont start at boot

PostPosted: Wed Mar 10, 2010 8:40 am
by omarrodriguezt
Hello,

I'm receiving this error every time that the system boot:
Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)

The script /etc/init.d/vicidial its activated and run at boot.

I also added a new cron job that run at boot: perl /etc/init.d/vicidial start

But again, I need to start asterisk running this command manually: perl /etc/init.d/vicidial start

Any help?
Thank you in advance.

Re: Asterisk dont start at boot

PostPosted: Wed Mar 10, 2010 12:25 pm
by brett05
omarrodriguezt wrote:Hello,

I'm receiving this error every time that the system boot:
Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)

The script /etc/init.d/vicidial its activated and run at boot.

I also added a new cron job that run at boot: perl /etc/init.d/vicidial start

But again, I need to start asterisk running this command manually: perl /etc/init.d/vicidial start

Any help?
Thank you in advance.

cd /etc/init.d/
rm -R vicidial
wget http://download.vicidial.com/ubuntu/vicidial
chmod +x vicidial -R
update-rc.d -f vicidial defaults

Dont work

PostPosted: Wed Mar 10, 2010 2:29 pm
by omarrodriguezt
Thank you for reply, but it does not work.

PostPosted: Wed Mar 10, 2010 3:14 pm
by williamconley
How did you do your installation? Has this machine just stopped working or never worked? have you upgraded anything? is there any OTHER software running on this box?

Astguiclient is at version 2.0.1, Vicidial is at 2.2.0 ...

check your asterisk logs (var/www/asterisk) immediately after startup and find out what stopped asterisk.

helpful: clean out that directory immediately before reboot to make it easier to find your issue

also helpful: /etc/asterisk/logger.conf controls the information that gets written to the logs, the name(s) of the logs

1 more: asterisk -rx "logger rotate" is necessary to complete any changes made in logger.conf

also: have you checked processes to see if asterisk IS running but not visible to that process for some reason?

also: you can start asterisk manually (and often it will DIE during startup and the last command it attempted to execute is the culprit) by entering asterisk -vvvc (and "stop gracefully" to exit if it does start)

PostPosted: Thu Mar 11, 2010 9:17 am
by omarrodriguezt
How did you do your installation?

1st. Install ViciBox 2.05
2nd Upgrade Vicidial 2.20
3th change the Database server


Has this machine just stopped working or never worked? have you upgraded anything?
In the beginning it was working.

is there any OTHER software running on this box?
Apache, mysql, and the others that come with linux box.

Astguiclient is at version 2.0.1, Vicidial is at 2.2.0 ...

OK

check your asterisk logs (var/www/asterisk) immediately after startup and find out what stopped asterisk.

You mean /var/log/asterisk/

helpful: clean out that directory immediately before reboot to make it easier to find your issue


I can't see any files after I restarted. (I deleted before restart)


also helpful: /etc/asterisk/logger.conf controls the information that gets written to the logs, the name(s) of the logs

1 more: asterisk -rx "logger rotate" is necessary to complete any changes made in logger.conf

also: have you checked processes to see if asterisk IS running but not visible to that process for some reason?



These are the running processes:

1 root 08:55 /sbin/init
2899 root 08:56 /sbin/udevd --daemon
4914 root 08:56 /sbin/getty 38400 tty4
4915 root 08:56 /sbin/getty 38400 tty5
4917 root 08:56 /sbin/getty 38400 tty2
4919 root 08:56 /sbin/getty 38400 tty3
4921 root 08:56 /sbin/getty 38400 tty6
4994 syslog 08:56 /sbin/syslogd -u syslog
5013 root 08:56 /bin/dd bs 1 if /proc/kmsg of /var/run/klogd/kmsg
5015 klog 08:56 /sbin/klogd -P /var/run/klogd/kmsg
5034 root 08:56 /usr/sbin/sshd
5505 root 08:56 sshd: root@notty
5520 root 08:56 /usr/lib/openssh/sftp-server
6134 root 09:07 sshd: root@pts/0
6168 root 09:07 -bash
5089 root 08:56 /bin/sh /usr/bin/mysqld_safe
5131 mysql 08:56 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file ...
5132 root 08:56 logger -p daemon.err -t mysqld_safe -i -t mysqld
5204 root 08:56 /usr/sbin/nmbd -D
5206 root 08:56 /usr/sbin/smbd -D
5220 root 08:56 /usr/sbin/smbd -D
5222 root 08:56 /usr/sbin/winbindd
5241 root 08:56 /usr/sbin/winbindd
5260 daemon 08:56 /usr/sbin/atd
5271 root 08:56 /usr/sbin/cron
6192 root 09:08 /USR/SBIN/CRON
6194 root 09:08 /bin/sh -c /usr/share/astguiclient/AST_manager_kill_hung_congested.pl
6196 root 09:08 /usr/bin/perl /usr/share/astguiclient/AST_manager_kill_hung_congested.pl
5364 root 08:56 /usr/sbin/apache2 -k start
5398 www-data 08:56 /usr/sbin/apache2 -k start
5399 www-data 08:56 /usr/sbin/apache2 -k start
5400 www-data 08:56 /usr/sbin/apache2 -k start
5401 www-data 08:56 /usr/sbin/apache2 -k start
5402 www-data 08:56 /usr/sbin/apache2 -k start
5427 ntp 08:56 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 106:114 -g
5473 root 08:56 /usr/bin/SCREEN -d -m -S ASTVDadapt /usr/share/astguiclient/AST_VDadapt.pl --deb ...
5480 root 08:56 /usr/bin/perl /usr/share/astguiclient/AST_VDadapt.pl --debug
5475 root 08:56 /usr/bin/SCREEN -d -m -S ASTfastlog /usr/share/astguiclient/FastAGI_log.pl --deb ...
5481 root 08:56 /usr/bin/perl /usr/share/astguiclient/FastAGI_log.pl --debug
5506 root 08:56 /usr/bin/perl /usr/share/astguiclient/FastAGI_log.pl --debug
5507 root 08:56 /usr/bin/perl /usr/share/astguiclient/FastAGI_log.pl --debug
5508 root 08:56 /usr/bin/perl /usr/share/astguiclient/FastAGI_log.pl --debug
5509 root 08:56 /usr/bin/perl /usr/share/astguiclient/FastAGI_log.pl --debug
5510 root 08:56 /usr/bin/perl /usr/share/astguiclient/FastAGI_log.pl --debug
5478 root 08:56 ip_relay 40569 127.0.0.1 4569 9999999
5479 root 08:56 ip_relay 41569 127.0.0.1 4569 9999999
5512 root 08:56 /usr/bin/perl /usr/local/src/webmin-1.500/miniserv.pl /etc/webmin/miniserv.conf
6252 root 09:08 /usr/local/src/webmin-1.500/blue-theme/right.cgi
6278 root 09:08 sh -c (apt-get update) >/dev/null 2>/dev/null </dev/null
6279 root 09:08 apt-get update
6281 root 09:08 /usr/lib/apt/methods/http
6282 root 09:08 /usr/lib/apt/methods/http
6253 root 09:08 /usr/bin/perl /usr/local/src/webmin-1.500/miniserv.pl /etc/webmin/miniserv.conf
6258 root 09:08 /usr/local/src/webmin-1.500/blue-theme/right.cgi
6259 root 09:08 [miniserv.pl] <defunct>
6260 root 09:08 /usr/local/src/webmin-1.500/proc/index_tree.cgi
6261 root 09:08 /usr/bin/perl /usr/local/src/webmin-1.500/miniserv.pl /etc/webmin/miniserv.conf
6262 root 09:08 /usr/bin/perl /usr/local/src/webmin-1.500/miniserv.pl /etc/webmin/miniserv.conf
5519 root 08:56 /sbin/getty 38400 tty1
2 root 08:55 [kthreadd]
3 root 08:55 [migration/0]
4 root 08:55 [ksoftirqd/0]
5 root 08:55 [watchdog/0]
6 root 08:55 [migration/1]
7 root 08:55 [ksoftirqd/1]
8 root 08:55 [watchdog/1]
9 root 08:55 [migration/2]
10 root 08:55 [ksoftirqd/2]
11 root 08:55 [watchdog/2]
12 root 08:55 [migration/3]
13 root 08:55 [ksoftirqd/3]
14 root 08:55 [watchdog/3]
15 root 08:55 [migration/4]
16 root 08:55 [ksoftirqd/4]
17 root 08:55 [watchdog/4]
18 root 08:55 [migration/5]
19 root 08:55 [ksoftirqd/5]
20 root 08:55 [watchdog/5]
21 root 08:55 [migration/6]
22 root 08:55 [ksoftirqd/6]
23 root 08:55 [watchdog/6]
24 root 08:55 [migration/7]
25 root 08:55 [ksoftirqd/7]
26 root 08:55 [watchdog/7]
27 root 08:55 [events/0]
28 root 08:55 [events/1]
29 root 08:55 [events/2]
30 root 08:55 [events/3]
31 root 08:55 [events/4]
32 root 08:55 [events/5]
33 root 08:55 [events/6]
34 root 08:55 [events/7]
35 root 08:55 [khelper]
76 root 08:55 [kblockd/0]
77 root 08:55 [kblockd/1]
78 root 08:55 [kblockd/2]
79 root 08:55 [kblockd/3]
80 root 08:55 [kblockd/4]
81 root 08:55 [kblockd/5]
82 root 08:55 [kblockd/6]
83 root 08:55 [kblockd/7]
86 root 08:55 [kacpid]
87 root 08:55 [kacpi_notify]
195 root 08:55 [kseriod]
261 root 08:55 [pdflush]
262 root 08:55 [pdflush]
263 root 08:55 [kswapd0]
305 root 08:55 [aio/0]
306 root 08:55 [aio/1]
307 root 08:55 [aio/2]
308 root 08:55 [aio/3]
309 root 08:55 [aio/4]
310 root 08:55 [aio/5]
311 root 08:55 [aio/6]
312 root 08:55 [aio/7]
1625 root 08:55 [ksuspend_usbd]
1626 root 08:55 [khubd]
1718 root 08:55 [ata/0]
1724 root 08:55 [ata/1]
1732 root 08:55 [ata/2]
1734 root 08:55 [ata/3]
1739 root 08:55 [ata/4]
1743 root 08:55 [ata/5]
1744 root 08:55 [ata/6]
1745 root 08:55 [ata/7]
1746 root 08:55 [ata_aux]
2432 root 08:55 [scsi_eh_0]
2488 root 08:55 [scsi_eh_1]
2489 root 08:55 [scsi_eh_2]
2743 root 08:56 [kjournald]
3335 root 08:56 [edac-poller]
3538 root 08:56 [kpsmoused]


also: you can start asterisk manually (and often it will DIE during startup and the last command it attempted to execute is the culprit) by entering asterisk -vvvc (and "stop gracefully" to exit if it does start)

Yes I Can

I added a new boot action and now its working, but I know that there is something wrong in my configuration that don't allow vicidial script run at start up as should be. (By the way the vicidial script run at start up, for any reason asterisk dont start)
Thank you for your support.
.

PostPosted: Thu Mar 11, 2010 10:16 am
by williamconley
there are several "delays" in the vicidial startup script. you may want to consider altering the script and put a final 20 second delay before starting asterisk to see if there is something taking a little too long to get going which causes asterisk to not start.

also, if you do not have anything in your asterisk log folder after asterisk attempts to boot ... perhaps the "asterisk" app is not being told to start for some reason

when your system boots ... does it go through the same screen information as when you later manually (successfully) run the vicidial startup script?

Yes

PostPosted: Thu Mar 11, 2010 10:30 am
by omarrodriguezt
Yes. it show me the same information when the system boot, so the vicidial script its running since the beginning.

This is a log that i found a few minutes ago after I reboot:

Mar 11 11:21:08 NOTICE[18835] dnsmgr.c: Managed DNS entries will be refreshed every 300 seconds.
Mar 11 11:21:08 NOTICE[18835] cdr.c: CDR simple logging enabled.
Mar 11 11:21:08 ERROR[18835] res_config_mysql.c: MySQL RealTime: Failed to connect database server on (err 2002). Check debug for more info.
Mar 11 11:21:08 WARNING[18835] res_config_mysql.c: MySQL RealTime: Couldn't establish connection. Check debug.
Mar 11 11:21:08 NOTICE[18835] config.c: Registered Config Engine mysql
Mar 11 11:21:08 WARNING[18835] pbx_config.c: The use of '_.' for an extension is strongly discouraged and can have unexpected behavior. Please use '_X.' instead at line 33
Mar 11 11:21:08 WARNING[18835] pbx_config.c: The use of '_.' for an extension is strongly discouraged and can have unexpected behavior. Please use '_X.' instead at line 34
Mar 11 11:22:19 NOTICE[18910] dnsmgr.c: Managed DNS entries will be refreshed every 300 seconds.
Mar 11 11:22:19 NOTICE[18910] cdr.c: CDR simple logging enabled.
Mar 11 11:22:19 ERROR[18910] res_config_mysql.c: MySQL RealTime: Failed to connect database server on (err 2002). Check debug for more info.
Mar 11 11:22:19 WARNING[18910] res_config_mysql.c: MySQL RealTime: Couldn't establish connection. Check debug.
Mar 11 11:22:19 NOTICE[18910] config.c: Registered Config Engine mysql
Mar 11 11:22:19 WARNING[18910] pbx_config.c: The use of '_.' for an extension is strongly discouraged and can have unexpected behavior. Please use '_X.' instead at line 33
Mar 11 11:22:19 WARNING[18910] pbx_config.c: The use of '_.' for an extension is strongly discouraged and can have unexpected behavior. Please use '_X.' instead at line 34

Asterisk Disconnecting itself

PostPosted: Thu Mar 11, 2010 10:38 am
by omarrodriguezt
This is really wear.
Now asterisk is disconnecting itself. Any Idea?

PostPosted: Thu Mar 11, 2010 10:39 am
by omarrodriguezt
This is the last information on the log:
[Mar 11 11:26:25] VERBOSE[5016]: [Mar 11 11:26:25] == Registered channel type 'IAX2' (Inter Asterisk eXchange Driver (Ver 2))
Mar 11 11:29:25 NOTICE[5393] dnsmgr.c: Managed DNS entries will be refreshed every 300 seconds.
Mar 11 11:29:25 NOTICE[5393] cdr.c: CDR simple logging enabled.
Mar 11 11:29:25 ERROR[5393] res_config_mysql.c: MySQL RealTime: Failed to connect database server on (err 2002). Check debug for more info.
Mar 11 11:29:25 WARNING[5393] res_config_mysql.c: MySQL RealTime: Couldn't establish connection. Check debug.
Mar 11 11:29:25 NOTICE[5393] config.c: Registered Config Engine mysql
Mar 11 11:29:25 WARNING[5393] pbx_config.c: The use of '_.' for an extension is strongly discouraged and can have unexpected behavior. Please use '_X.' instead at line 33
Mar 11 11:29:25 WARNING[5393] pbx_config.c: The use of '_.' for an extension is strongly discouraged and can have unexpected behavior. Please use '_X.' instead at line 34
Mar 11 11:36:03 NOTICE[5834] dnsmgr.c: Managed DNS entries will be refreshed every 300 seconds.
Mar 11 11:36:03 NOTICE[5834] cdr.c: CDR simple logging enabled.
Mar 11 11:36:03 ERROR[5834] res_config_mysql.c: MySQL RealTime: Failed to connect database server on (err 2002). Check debug for more info.
Mar 11 11:36:03 WARNING[5834] res_config_mysql.c: MySQL RealTime: Couldn't establish connection. Check debug.
Mar 11 11:36:03 NOTICE[5834] config.c: Registered Config Engine mysql
Mar 11 11:36:03 WARNING[5834] pbx_config.c: The use of '_.' for an extension is strongly discouraged and can have unexpected behavior. Please use '_X.' instead at line 33
Mar 11 11:36:03 WARNING[5834] pbx_config.c: The use of '_.' for an extension is strongly discouraged and can have unexpected behavior. Please use '_X.' instead at line 34

Chapter #N

PostPosted: Thu Mar 11, 2010 11:08 am
by omarrodriguezt
This another chapter in my situation.
After I restarted the Data Base server and the asterisk server, everything its working as should be.
Thank you for your attention.

PostPosted: Thu Mar 11, 2010 11:46 am
by williamconley
The use of '_.' for an extension is strongly discouraged and can have unexpected behavior. Please use '_X.'

not a joke, you need to revise that entry

ok

PostPosted: Thu Mar 11, 2010 12:14 pm
by omarrodriguezt
I only found this context in extension-vicidial

; custom dialplan entries
exten => _.,1,AGI(agi-NVA_recording.agi,BOTH------Y---Y---Y)
exten => _.,n,Goto(default,${EXTEN},1)

Should I deleted?

PostPosted: Thu Mar 11, 2010 12:20 pm
by williamconley
did you put it there? or is it from 2.2.0?

No I dont.

PostPosted: Thu Mar 11, 2010 1:33 pm
by omarrodriguezt
May be was ViciDial.

PostPosted: Thu Mar 11, 2010 6:52 pm
by mflorell
is that in the vicidial-auto context or another one?

PostPosted: Mon Mar 15, 2010 7:56 am
by omarrodriguezt
It is in extension-vicidial

; custom dialplan entries
exten => _.,1,AGI(agi-NVA_recording.agi,BOTH------Y---Y---Y)
exten => _.,n,Goto(default,${EXTEN},1)

I'm having same situation again :(

PostPosted: Mon Mar 15, 2010 8:01 am
by omarrodriguezt
I'm having same situation again :(

PostPosted: Mon Mar 15, 2010 9:41 am
by williamconley
how did you do your installation?

PostPosted: Mon Mar 15, 2010 9:51 am
by omarrodriguezt
1st. Install ViciBox 2.05
2nd Upgrade Vicidial 2.20
3th change the Database server

PostPosted: Mon Mar 15, 2010 9:52 am
by williamconley
omarrodriguezt wrote:It is in extension-vicidial

; custom dialplan entries
exten => _.,1,AGI(agi-NVA_recording.agi,BOTH------Y---Y---Y)
exten => _.,n,Goto(default,${EXTEN},1)


are you saying that this entry is in vicibox or your download for vicidial 2.2.0 or did you enter it yourself during the "upgrade"?

PostPosted: Mon Mar 15, 2010 10:03 am
by Michael_N
williamconley wrote:
omarrodriguezt wrote:It is in extension-vicidial

; custom dialplan entries
exten => _.,1,AGI(agi-NVA_recording.agi,BOTH------Y---Y---Y)
exten => _.,n,Goto(default,${EXTEN},1)


are you saying that this entry is in vicibox or your download for vicidial 2.2.0 or did you enter it yourself during the "upgrade"?


I did a upgrade on vicibox to 2.2.0

i chose copy sample to extension.conf when doing setup script .

and i also have

; custom dialplan entries
exten => _.,1,AGI(agi-NVA_recording.agi,BOTH------Y---Y---Y)
exten => _.,n,Goto(default,${EXTEN},1)[/quote]

in dialplan

PostPosted: Mon Mar 15, 2010 10:06 am
by williamconley
interesting

you may want to file a ticket on http://www.vicidial.org/VICIDIALmantis saying that this entry tosses a warning and it's "stock" in 2.2.0

PostPosted: Mon Mar 15, 2010 10:19 am
by Michael_N
williamconley wrote:interesting

you may want to file a ticket on http://www.vicidial.org/VICIDIALmantis saying that this entry tosses a warning and it's "stock" in 2.2.0


i have reported it.

could you check if it needs more data?