[asterisk-bugs] [JIRA] (ASTERISK-25424) asterisk.conf syntax error causes inscrutable crash

Boris Rybalkin (JIRA) noreply at issues.asterisk.org
Sun Mar 27 06:50:56 CDT 2016


    [ https://issues.asterisk.org/jira/browse/ASTERISK-25424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=230035#comment-230035 ] 

Boris Rybalkin commented on ASTERISK-25424:
-------------------------------------------

Hello,

I am having the same issue (probably because I am new to the project). 
I have compiled 13.7.2. (I had working setup using debian package v11)

Asterisk was compiled only with --prefix /opt/app/talk/asterisk, but I thought I can override everything in asterisk.conf
  
Took this config:
https://github.com/asterisk/asterisk/blob/13.7/configs/basic-pbx/asterisk.conf

{code}
[directories]
astetcdir = /opt/app/talk/config/asterisk
astmoddir = /opt/app/talk/asterisk/lib/asterisk/modules
astvarlibdir = /opt/app/talk/asterisk/var/lib/asterisk
astdbdir = /opt/app/talk/asterisk/var/lib/asterisk
astkeydir = /opt/app/talk/asterisk/var/lib/asterisk
astdatadir = /opt/data/talk/asterisk
astagidir = /opt/app/talk/asterisk/var/lib/asterisk/agi-bin
astspooldir = /opt/data/talk/asterisk/spool
astrundir = /opt/data/talk/asterisk/run
astlogdir = /opt/data/talk/log
astsbindir = /opt/app/talk/asterisk/sbin
...
{code}

Started:

{code}
/opt/app/talk/asterisk/sbin/asterisk -vvcf -C /opt/app/talk/config/asterisk/asterisk.conf
{code}

Now I get the error:
{code}
Parsing '/opt/app/talk/config/asterisk/asterisk.conf': Found
  == Sorcery registered wizard 'bucket'
  == Sorcery registered wizard 'bucket_file'
Cannot update type 'bucket' in module 'core' because it has no existing documentation!
Failed to register 'bucket' object type in Bucket sorcery
Failed: ast_bucket_init
{code}

At the same time I see that this sample has template format (which is confusing, not sure what is the right ):
https://github.com/asterisk/asterisk/blob/13.7/configs/samples/asterisk.conf.sample

{code}
[directories](!)
astetcdir => /etc/asterisk
astmoddir => /usr/lib/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdbdir => /var/lib/asterisk
astkeydir => /var/lib/asterisk
astdatadir => /var/lib/asterisk
astagidir => /var/lib/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk
astlogdir => /var/log/asterisk
astsbindir => /usr/sbin
...
{code}

So I believe I have several questions:

1. How can I debug the error?
2. Is this the right format of overriding directories?
3. Is it possible to override directories in run time as opposed to compile time flags?

Thank you.

> asterisk.conf syntax error causes inscrutable crash
> ---------------------------------------------------
>
>                 Key: ASTERISK-25424
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25424
>             Project: Asterisk
>          Issue Type: Improvement
>      Security Level: None
>          Components: Core/Sorcery
>    Affects Versions: 13.5.0
>         Environment: Ubuntu 14.04. Freepbx 2.11.0.43. Previous system had been 12.04 and Asterisk 1.8. 
>            Reporter: Norman Henderson
>            Assignee: Unassigned
>            Severity: Minor
>
> After upgrade, I installed Asterisk 13.5.0 from source. I ended up with the following first line in asterisk.conf:
> {noformat}
> [directories];(!) ; remove the (!) to enable this
> This appears to have caused Asterisk to crash during startup with:
>  == Parsing '/etc/asterisk/asterisk.conf': Found
>   == Sorcery registered wizard 'bucket'
>   == Sorcery registered wizard 'bucket_file'
> Cannot update type 'bucket' in module 'core' because it has no existing documentation!
> Failed to register 'bucket' object type in Bucket sorcery
> Failed: ast_bucket_init
> {noformat}
> Apparently the correct syntax from 13.5.0 asterisk.conf.dpkg-dist is
> {noformat}
> [directories](!)
> {noformat}
> (1) This syntax and its meaning or effect does not appear to be documented. Nor is there much relevant to the Sorcery / bucket issue in extensive searching - eventually I found one IRC comment in which an unrelated asterisk.conf error caused a similar crash.
> (2) Config file syntax errors should provide a meaningful error message; this is a basic principle of system design.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list