Anyone had recent experiance with getting Asterisk and FreePBX going?

Avatar forum:VinceN 3 years, 11 months ago

Good Afternoon,

I was hoping someone may have the magic bullet for this one because I'm at a loss of what to do.

I'm currently following the guide provided at

~~[" target="_blank">]( … 04-precise">](

It's all going well up until I try to install FreePBX, then the system starts spitting errors out left and right. The biggest issue I'm having is that my asterisk database dosen't appear to be connecting.

DB Error: connect failed
Trace Back
/var/www/html/admin/libraries/db_connect.php:71 die_freepbx()
  [0]: DB Error: connect failed

/var/www/html/admin/bootstrap.php:85 require_once()
  [0]: /var/www/html/admin/libraries/db_connect.php

/etc/freepbx.conf:9 require_once()
  [0]: /var/www/html/admin/bootstrap.php

/var/www/html/admin/config.php:99 include_once()
  [0]: /etc/freepbx.conf

I tried to reload the AMPORTAL to see if maybe it just needed the configurations reset, but then I got this.

root@thecommnode:/var/www/html# amportal restart

Fetching FreePBX settings with gen_amp_conf.php..
/usr/local/sbin/amportal: line 49: [FATAL]: command not found

/var/lib/asterisk/bin/freepbx_engine: line 98: [FATAL]: command not found
astrundir in '/etc/asterisk' is set to  but the directory
does not exists. Attempting to create it with: 'mkdir -p '

mkdir: missing operand
Try `mkdir --help' for more information.
Attempt to execute 'mkdir -p ' failed with an exit code of 1
You must create this directory and the try again.

It seems to be referencing a non existent directory, but I can't figure out what it wants or where it's getting it's information from.

Has anyone had any experience with this who could help me figure this out?


4 Replies

Are the variables redeclared later in amportal.conf?

Good Morning,

Thanks for replying. I really have no idea. I have a very baseline understanding of all of this. One of the reasons I was wanting to build this is because I wanted to learn more about running this on a real server. Up to now I had been running a prebuilt virtual machine where the base OS (CentOS), FreePBX, and Asterisk was already installed and configured so you just had to setup trunks, users, and extensions. I'm pretty knowledgeable about it once it's up and running but getting it to that point is something I've never done myself before.

I'm thinking I'm missing something in the guide provided by linode or something has been upgraded in 12.04 since the guide was written.

Can you give me some pointers on exactly what locations, files, and variables I should be looking at?

I've got a full FreePBX 14 Distro (lastest Sangoma offers on the website) going, with full OpenVPN, ext to ext video calling, TLS, SRTP and cross platform compatibility. All calls in and out of the PBX work as well. How may I help you?

For starters, you'd be better off using the default FreePBX pre-packaged distro with CentOS 7. (amportal) is no longer used. The command is (fwconsole) without the ().


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct