Freepbx-2.9.0 does not see /etc/asterisk dir

I am having some dificulty getting freepbx to install. I think I have googled and searched here unable to find a answer so here I go

I am running Debian

uname -r

freepbx-2.9.0 (attempting to install)

I thought it was my mysql user and password so I went to defaults

./start_asterisk start

all good here

created the databases no problem and loaded in the tables no issues
created user
GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY ‘amp109’;
GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY ‘amp109’;

all good til I try to run the install
everything is happy till can not seem to find the /etc/asterisk dir. I mean its there it just filled it with files a sec ago… now it does not seem to get it there?

Connecting to database…OK
Checking current version of AMP…2.9.0
Installing new FreePBX files…OK (759 files copied, 0 skipped)
Configuring install for your environment…amportal…fpbx…freepbx_engine…done
apply username/password changes to conf files…/usr/src/freepbx-2.9.0/ line 51: [FATAL]: command not found
sed: can’t read /cdr_mysql.conf: No such file or directory
sed: can’t read /cdr_mysql.conf: No such file or directory
sed: can’t read /cdr_mysql.conf: No such file or directory
sed: can’t read /manager.conf: No such file or directory
sed: can’t read /manager.conf: No such file or directory
creating missing #include files…OK
Setting permissions on files…/usr/local/sbin/amportal: line 46: [FATAL]: command not found
/var/lib/asterisk/bin/freepbx_engine: line 98: [FATAL]: command not found
mkdir: missing operand
Try `mkdir --help’ for more information.
Checking for upgrades…No upgrades found
Creating or updating freepbx_conf settings…OK
Generating AMP configs…
Generating Configurations.conf, (if Asterisk is not running, you will get an error
In case of error, start Asterisk and hit the red bar in the GUI to generate the Configurations.conf files
[FATAL] DB Error: connect failed

Trace Back:

/var/www/html/admin/common/db_connect.php:63 die_freepbx()
[0]: DB Error: connect failed

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

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

/var/lib/asterisk/bin/retrieve_conf:6 include_once()
[0]: /etc/freepbx.conf

Generating AMP configs…OK
PHP Notice: Undefined index: FOPRUN in /usr/src/freepbx-2.9.0/install_amp on line 1166
Checking dashboard… dependencies pending
Checking core… dependencies pending
Checking framework… dependencies pending
Checking fw_ari… dependencies pending
Checking customappsreg… dependencies pending
Checking voicemail… dependencies pending
Checking featurecodeadmin… dependencies pending
Checking music… dependencies pending
Checking fw_fop… dependencies pending
Checking recordings… dependencies pending
Checking infoservices… dependencies pending
Checking dashboard… [FATAL] DB Error: connect failed

Trace Back:

/var/www/html/admin/common/db_connect.php:63 die_freepbx()
[0]: DB Error: connect failed

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

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

/var/lib/asterisk/bin/module_admin:23 include_once()
[0]: /etc/freepbx.conf

[FATAL] DB Error: connect failed

Trace Back: this repeats over and over…

seems because the manager and changes have not been applied it fails

is there a way I can fix this is this a bug?

let me know if you need to see anything.

why it puts this in I dunno but I corrected the manager.confi file with the [admin] secret amp111

but still the errors

read = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate
write = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate

same with cdr_mysql.conf

hostname = localhost
password = AMPDBPASS

even tried password amp109
user asteriskuser

the defaults I did everything using the defaults. And its not like I have not done this before

is this a bug?


I’ve just been having the exact same issue and stumbled over your post.

After pulling my hair out for the last half hour I eventually found how to get it to work.

The first time you run ./install_amp it seems to save the database password in /etc/freepbx.conf - Any subsequent runs on install_amp don’t update this value here which seems to be whats causing issues.

In my case I’d set a password with funky characters and initially not enclosed it in quotes.

If you edit the login details for the database in /etc/freepbx.conf I beleive this will solve your problem.

Hope if works for you as well!

Exactly like you said the original login credentials for database that I used before… ugh

Some one who knows how to log bugs should point that out…

I knew it was simple…

Thank you soo soo much… lol

Anouther point I should make is alot of folk on the almighty (C I A backed) google broght up alot of folks who just reloaded everything fresh and it fixed the problem.

So for refrence for othere folks who need to do it fresh

Debian or Debian based distros ones anyway

rm /etc/asterisk
rm /etc/freepbx.config
rm /etc/amportal.config

mysql -u root -p
DROP DATABASE asteriskcdrdb;

CREATE DATABASE asteriskcdrdb;


cd /usr/src/freepbx-2.9.0 #or where your source is located dir
and start fresh

Just edit /etc/freepbx.conf. The credentials are there.

Yes that works…
i actually changed the asteriskuser password and forgot to update the same in /etc/freepbx.conf.
now i did it correctly…
you rock!!!