I'm getting keep getting this message: Warning [30425]

Hello Everyone,

I’m new to this forum. I am a Asterisk novice. I don’t know the forum rules yet so please forgive me for any mistake.

When I log in to Asterisk I keep getting two warning messages. Both have the same code [30425]. This is what the error messages look like:

[color=#FF0000]WARNING[/color][30425]: db.c:119 dbinit: Unable to open Asterisk database ‘/var/lib/asterisk/astdb’: Permission denied
[color=#FF0000]WARNING[/color][30425]: db.c:600 ast_db_gettree: Database unavailable

I’ve tried googling these error messages but I haven’t found anything.

Can someone please give me some guidance as to what these warning messages mean and how can I fix them?

Thanks very much!

Is /var/lib/asterisk/astdb readable by the user that’s running Asterisk?

Yes it is readable.

This is the result from running ls -l /var/lib/asterisk/astdb:

-rw-r–r-- root root 8192 Sep 26 17:37 /var/lib/asterisk/astdb

I should mention that I’m logged in as root.

What user is running Asterisk? The /var/lib/asterisk/astdb must be readable by that user.

For future reference, the 30425 is the process ID of the thread reporting the error, and does not indicate the cause of the error, although you can use it to tie together messages from the same thread.

It’s run by root as it is the only existing user on the server…For knowledge, how do I check what user is running Asterisk?

Good to know! I thought it was similar to Windows. This just shows my level of knowledge on Asterisk or Linux for that matter. :blush:

ps -aux |grep asterisk

will show you

[quote=“ianplain”]ps -aux |grep asterisk

will show you[/quote]

Thanks! I confirmed that root is running asterisk.

Now that I know that root is running Asterisk, how can I fix the warning messages that I’m getting?

Welp, dbinit is failing. Have you tried deleting (temporarily renaming) the existing astdb and letting Asterisk create it when it starts up?

I haven’t tried this. What would be the consequences of deleting/renaming dbinit? My server is already in production and I don’t want to break anything.

After I rename dbinit, do I have to restart the whole server or just the Asterisk service?

No, I mean housing the existing astdb (dbinit is a function from db.c that’s trying to unsuccessfully run and throwing that warning) and letting Asterisk create one from scratch.

The consequences are that any entries you’ve got in astdb would be unavailable.

If this is a production FreePBX system or anything like that, I’d say no, because killing its astdb is disastrous.

[quote=“malcolmd”]No, I mean housing the existing astdb (dbinit is a function from db.c that’s trying to unsuccessfully run and throwing that warning) and letting Asterisk create one from scratch.

The consequences are that any entries you’ve got in astdb would be unavailable.

If this is a production FreePBX system or anything like that, I’d say no, because killing its astdb is disastrous.[/quote]

My mistake, I meant astdb.

Yes, it is a production FreePBX system. So you’re saying I shouldn’t try renaming astdb because my server is on production? What else would you suggest for fixing this issue? What consequences could show in the future if I don’t fix this issue? (Asterisk has been working just fine regardless of the warning messages)

For fixing the issue? Unknown, sorry. I don’t know why Asterisk isn’t able to initialize your astdb. I’ve housed the astdb before on a FreePBX system and had dire (flush it and start over) consequences. So, I do not recommend doing that.

The warning means that Asterisk isn’t able to do anything that involves the astdb, and there’s a lot of stuff in FreePBX that writes to and reads from the astdb. So, while things are working, there are probably other things that aren’t working.

[quote=“malcolmd”]For fixing the issue? Unknown, sorry. I don’t know why Asterisk isn’t able to initialize your astdb. I’ve housed the astdb before on a FreePBX system and had dire (flush it and start over) consequences. So, I do not recommend doing that.

The warning means that Asterisk isn’t able to do anything that involves the astdb, and there’s a lot of stuff in FreePBX that writes to and reads from the astdb. So, while things are working, there are probably other things that aren’t working.[/quote]

My asterisk server is running on a VM so I will try renaming astdb and then rebooting the server. I will take a snapshot so I can restore the VM in case I break it.

I will let you know if it worked. Thanks for your help and guidance!