Cdr_adaptive_odbc - Unable to query database columns

Running Asterisk 16.5 (built from gerrit clone).

Problem relates to CDR and Adaptive ODBC module. It occurs when issuing a “core reload” in the CLI:

[2019-09-05 13:46:17] ERROR[8854]: cdr_adaptive_odbc.c:172 load_config: Unable to query database columns on connection ‘asterisk-db’. Skipping.

I’m recording CDR to MySQL via ODBC. On Asterisk load everything works fine but if I execute a “core reload” on the CLI, I am getting the error above. The effect is that CDR records stop being written. As a work around, I can execute “module reload res_odbc.so” and CDRs are once again written.

Can anyone shed light on the possible cause of this error and what I can do to fix it.

Thanks, A

It might be that module load order is causing problems on reload. Can you try adding this near the top of /etc/asterisk/modules.conf ?

preload=res_odbc.so

1 Like

great idea… I’ve updated my modules.conf and will monitor the restarts for 24 hours.

Thanks :slight_smile: