Asteriskuser missing/needed for CDR Database? (solved)

I installed a new Raspberry FreePBX image.

Then I copied the settings (only the mysql config, not the CDR Database) from a BeagleboneBlack system to the Raspberry system via Backup/Restore. (With the Beaglebone system I started with Freepbx 12, both sytems now have FreePBX 13 and Asterisk 11) .

After starting the Raspberry, the system sent mails “Asterisk Run Dir [/var/run/asterisk] is missing or not writable! Is Asterisk running?”

A fwconsole restart brought the following:

[email protected]:/etc# fwconsole restart
Asterisk not currently running
Running FreePBX shutdown…

Running FreePBX startup…
Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
Setting Permissions…

[Exception]
Unable to connect to CDR Database using string:mysql:host=localhost;port=3306;dbname=asteriskcdrdb,asteriskuser,rasp_amp

restart [-i|–immediate] [args1] … [argsN]

The Raspberry database has only a “freepbxuser”, but no "asteriskuser"
I removed the CDR Moduels from the system (via Module Admin), same problem.

My Questions:
-Who/which module needs the asteriskuser,when the CDR module is not installed any more?
-Where can I change the database user (from asteriskuser to freepbxuser) and the password for the CDR?

I fixed the issue while adding the asteriskuser to the database with the rasp_amp password.
But I think that is not the best way.

Michael

I don’t know why you’d think that setting the password in the database to match your “*MySQL*conf” username would be suboptimal.

As long as they match, I’m pretty sure none of us (or the system) cares. There’s nothing magical about asteriskuser or freepbxuser. It’s only used in the database connection string (IIRC), so you should be fine.

If your OCD kicks in and you want to make it “freepbxuser” again, log in as “root” at the console and
use the following command to find the places it’s set:

grep -l asteriskuser `find /etc -type f`

Those (around the find command) are backticks (lower case tilde"~").

This will give you a list of all of the files with the word “asteriskuser” in them. Edit these files and change asteriskuser to freepbxuser and you’ve switched from one to the other.

Ok, thanks.

I "grep"ed the files and found both freepbxuser and asteriskuser. Asteriskuser is apparently (still) the default user for the CDR database.
Freepbxuser is apparently the new default user for the rest of the system. (In the old Beaglebone-system I did not found the freepbxuser)

So I think the adding of the asteriskuser into the database will be a steady fix for me.

But I wonder if this is a bug (missing user in database) or a problem caused by the restore from the old system?

It should say somewhere in the restore module that backups from previous versions will mess up your system.

If you look back through the archives here, you’ll find dozens of places where people have done that and messed up their systems.