SOLVED cannot start amportal error below.

Ashley Drees

New Member
Joined
Jul 23, 2013
Messages
6
Reaction score
0
I recently built the PIAF on ubuntu, was working OK for a while and then i find that amportal is not happy... it throws...
Code:
root@pbx:/run/asterisk# amportal
 
Please wait...
/usr/local/sbin/amportal: line 49: [FATAL]: command not found
 
/var/lib/asterisk/bin/freepbx_engine: line 100: [FATAL]: command not found
**** WARNING: ERROR IN CONFIGURATION ****
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.
**** ERROR: COULD NOT CREATE  ****
Attempt to execute 'mkdir -p ' failed with an exit code of 1
You must create this directory and the try again.

Mysql is running, i check the DB, all seems good, the MySQL password is as it should be - the socket file is where it should be and gets deleted when MySQL is restarted... i can only surmise that something in the regular updates from Ubuntu has caused this.. /var/run/asterisk is really a link to /run/asterisk - would that make any difference - i have been looking for a solution for a few days now, but cannot find anything with quite the same issue.

Asterisk: UP Apache: UP MySQL: UP
SendMail: UP IPtables: UP SSH: UP
LAN port: UP Fail2Ban: UP Webmin: UP
RAM:149956 Ubuntu 14.04.2 LTS Disk:70G
Asterisk 11.18.0 Incredible GUI 12.0.30
Private IP: x.x.x.x
Public IP: x.x.x.x
System Time: Tue Jul 28 00:09:48 BST 2015
Code:
150728  0:48:33 InnoDB: 5.5.44 started; log sequence number 1595695[/FONT][/SIZE]
[SIZE=13px][FONT=monospace]150728  0:48:33 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306[/FONT][/SIZE]
[SIZE=13px][FONT=monospace]150728  0:48:33 [Note]  - '127.0.0.1' resolves to '127.0.0.1';[/FONT][/SIZE]
[SIZE=13px][FONT=monospace]150728  0:48:33 [Note] Server socket created on IP: '127.0.0.1'.[/FONT][/SIZE]
[SIZE=13px][FONT=monospace]150728  0:48:33 [Note] Event Scheduler: Loaded 0 events[/FONT][/SIZE]
[SIZE=13px][FONT=monospace]150728  0:48:33 [Note] /usr/sbin/mysqld: ready for connections.[/FONT][/SIZE]
[SIZE=13px][FONT=monospace]Version: '5.5.44-0ubuntu0.14.04.1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)

And of course if i try and open the GUI...
Code:
FATAL ERROR[/FONT][/SIZE]
 
[SIZE=13px][FONT=monospace]DB Error: extension not found[/FONT][/SIZE]
 
[SIZE=13px][FONT=monospace]Trace Back[/FONT][/SIZE]
 
[SIZE=13px][FONT=monospace]/var/www/html/admin/libraries/db_connect.php:71 die_freepbx()[/FONT][/SIZE]
[SIZE=13px][FONT=monospace]  [0]: DB Error: extension not found[/FONT][/SIZE]
 
[SIZE=13px][FONT=monospace]/var/www/html/admin/bootstrap.php:91 require_once()[/FONT][/SIZE]
[SIZE=13px][FONT=monospace]  [0]: /var/www/html/admin/libraries/db_connect.php[/FONT][/SIZE]
 
[SIZE=13px][FONT=monospace]/etc/freepbx.conf:9 require_once()[/FONT][/SIZE]
[SIZE=13px][FONT=monospace]  [0]: /var/www/html/admin/bootstrap.php[/FONT][/SIZE]
 
[SIZE=13px][FONT=monospace]/var/www/html/admin/config.php:99 include_once()[/FONT][/SIZE]
[SIZE=13px][FONT=monospace]  [0]: /etc/freepbx.conf[/FONT][/SIZE]
[SIZE=13px][FONT=monospace]
I have tried every "fix" i can find, and though there is little point putting a stope and start + delete socket command in rc.local - i will.

It WAS working and now it is not - i am not quite sure when AMPORTAL and the GUI bit the dust as asterisk itself is working fine with the config it has.
 

MacNix

Guru
Joined
Jun 21, 2011
Messages
198
Reaction score
31
Very intersted in this - experienced an identical GUI & AMPORTAL collapse after a system reboot.. reasons unknown...
 

matthew

Guru
Joined
May 22, 2013
Messages
83
Reaction score
26
I've never seen this before so I'm going out on a limb here. The error says that astrundir is set to ' '. ie nothing. When mkdir tries to create it, it fails because it needs an actual dir to create. Check that parameter is set correctly. On a CentOS system, mine is set in asterisk.conf as 'astrundir => /var/run/asterisk'.
 

Ashley Drees

New Member
Joined
Jul 23, 2013
Messages
6
Reaction score
0
Thanks for the above link, i have run through the page and indeed asterisk was running as root, and indeed /var/run/asterisk was owned by root, all fixed now....

I fixed my problem by running

sudo apt-get install php5-mysql

which appeared to be uninstalled somehow - i guess through automatic cleanup

 

Members online

No members online now.

Forum statistics

Threads
25,782
Messages
167,509
Members
19,202
Latest member
pbxnewguy
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top