Ticket #2128 (closed Bugs: fixed)

Opened 6 years ago

Last modified 6 years ago

AMPDBPASS not set on beta2

Reported by: pnlarsson Assigned to:
Priority: major Milestone: 2.4
Component: Installation Version: 2.3-branch
Keywords: Cc:
Confirmation: Distro:
Backend Engine: All Distro Ver:
Backend Ver: SVN Revision (if applicable):

Description

On a fresh install of beta2, amportal.conf has two lines of AMPDBPASS

./install_amp 
Checking for PEAR DB..OK
Checking for PEAR Console::Getopt..OK
Checking user..OK
Checking for /etc/amportal.conf../etc/amportal.conf does not exist, copying default
Creating new /etc/amportal.conf
Enter your USERNAME to connect to the 'asterisk' database:
 [asteriskuser] 
Enter your PASSWORD to connect to the 'asterisk' database:
 [amp109] 
Enter the hostname of the 'asterisk' database:
 [localhost] 
Enter a USERNAME to connect to the Asterisk Manager interface:
 [admin] 
Enter a PASSWORD to connect to the Asterisk Manager interface:
 [amp111] 
Enter the path to use for your AMP web root:
 [/var/www/html] 

Created /var/www/html
Enter the IP ADDRESS or hostname used to access the AMP web-admin:
 [xx.xx.xx.xx] 172.18.1.250
Enter a PASSWORD to perform call transfers with the Flash Operator Panel:
 [passw0rd] 
Use simple Extensions [extensions] admin or separate Devices and Users [deviceanduser]?
 [extensions] 
Enter directory in which to store AMP executable scripts:
 [/var/lib/asterisk/bin] 

Enter directory in which to store super-user scripts:
 [/usr/local/sbin] 

/etc/amportal.conf writtenAssuming new install, --install-moh added to command line
OK
Reading /etc/amportal.conf..OK
Checking for /etc/asterisk/asterisk.conf..OK
Reading /etc/asterisk/asterisk.conf..OK
Using asterisk as PBX Engine
Checking for Asterisk version..Checking for selinux..OK
Connecting to database..FAILED
Try running ./install_amp --username=user --password=pass  (using your own user and pass)
[FATAL] Cannot connect to database
plus:/usr/src/freepbx-2.3.0beta2# ./install_amp 
Checking for PEAR DB..OK
Checking for PEAR Console::Getopt..OK
Checking user..OK
Checking for /etc/amportal.conf..OK
Reading /etc/amportal.conf..OK
Checking for /etc/asterisk/asterisk.conf..OK
Reading /etc/asterisk/asterisk.conf..OK
Using asterisk as PBX Engine
Checking for Asterisk version..Checking for selinux..OK
Connecting to database..FAILED
Try running ./install_amp --username=user --password=pass  (using your own user and pass)
[FATAL] Cannot connect to database
cat /etc/amportal.conf 
# This file contains settings for components of the Asterisk Management Portal
# Spaces are not allowed!
# Run /usr/src/AMP/apply_conf.sh after making changes to this file

# AMPDBHOST: the host to connect to the database named 'asterisk'
AMPDBHOST=localhost

# AMPDBUSER: the user to connect to the database named 'asterisk'
AMPDBUSER=asteriskuser

# AMPDBENGINE: the type of database to use
AMPDBENGINE=mysql

# AMPDBPASS: the password for AMPDBUSER
AMPDBPASS=

# AMPENGINE: the telephony backend engine to use
AMPENGINE=asterisk

# AMPMGRUSER: the user to access the Asterisk manager interface
AMPMGRUSER=admin

# AMPMGRPASS: the password for AMPMGRUSER
AMPMGRPASS=amp111

# AMPBIN: where command line scripts live
AMPBIN=/var/lib/asterisk/bin

#AMPSBIN: where (root) command line scripts live
AMPSBIN=/usr/local/sbin

# AMPWEBROOT: the path to Apache's webroot (leave off trailing slash)
AMPWEBROOT=/var/www/html

# AMPCGIBIN: the path to Apache's cgi-bin dir (leave off trailing slash)
AMPCGIBIN=/var/www/cgi-bin 

# AMPWEBADDRESS: the IP address or host name used to access the AMP web admin
#AMPWEBADDRESS=192.168.1.101
AMPWEBADDRESS=172.18.1.250

# FOPWEBROOT:web root for the Flash Operator Panel
FOPWEBROOT=/var/www/html/panel

# FOPPASSWORD: the secret code for performing transfers and hangups in the Flash Operator Panel
FOPPASSWORD=passw0rd

# FOPSORT: FOP should sort extensions by Last Name [lastname] or by Extension [extension]
FOPSORT=extension

# FOPRUN: set to true if you want FOP started by freepbx_engine (amportal_start)
FOPRUN=false

# AUTHTYPE: authentication type to use for web admin
# If type set to 'database', the primary AMP admin credentials will be the AMPDBUSER/AMPDBPASS above
# valid: none, database
AUTHTYPE=none

# AMPADMINLOGO: Defines the logo that is to be displayed at the TOP RIGHT of the admin screen.
#        This enables you to customize the look of the administration screen.
# NOTE: images need to be saved in the ..../admin/images directory of your AMP install
# This image should be 55px in height
AMPADMINLOGO=logo.png

# USECATEGORIES: Controls if the menu items in the admin interface are sorted by category (true),
#                or sorted alphebetically with no categories shown (false). Defaults to true.
#USECATEGORIES=false

# AMPEXTENSIONS: the type of view for extensions admin 
# If set to 'deviceanduser' Devices and Users will be administered seperately, and Users will be able to "login" to devices.
# If set to 'extensions' Devices and Users will me administered in a single screen.
AMPEXTENSIONS=extensions

# POST_RELOAD: automatically execute a script after applying changes in the AMP admin
# Set POST_RELOAD to the script you wish to execute after applying changes
# If POST_RELOAD_DEBUG=true, you will see the output of the script in the web page
# POST_RELOAD=
# POST_RELOAD_DEBUG=false

# ENABLECW: Enable call waiting by default when an extension is created (DEFAULT is yes)
# Set to 'no' to if you don't want phones to be commissioned with call waiting already
# enabled. The user would then be required to dial the CW feature code (*70 default) to 
# enable their phone. Most installations should leave this alone. It allows multi-line
# phones to receive multiple calls on their line appearances.
ENABLECW=yes

#CWINUSEBUSY: Set to yes for extensions that have CW enabled to report as busy if
# they don't answer (resulting in busy voicemail greeting). Otherwise they simply
# report as no-answer (e.g. busy greeting servers no purpose
CWINUSEBUSY=yes

# The following are used to optionally have the freepbx backup program optionally
# send the generated backup to an ftp server
#
# FTPBACKUP=YES to enable
# FTPUSER, FTPPASSWORD, FTPSERVER must be set
# FTPSUBDIR is an optional subdirectory at the ftp server, it will cause ftp to do a cd
#
# There is no error checking so you should check to make sure these are set correctly. The
# ftp is saved after the backup, so it will not cause the local backup file to be effected
#
# FTPBACKUP=yes
#FTPUSER=asterisk
#FTPPASSWORD=password
#FTPSUBDIR=mybackupfolder
#FTPSERVER=myftpserver

# SSH BACKUP INFO: must have a valid SSHRSAKEY file and server, only supported through
# ssh. SUBDIR is optional and will be created if it does not exist.
#
# If SSHUSER is not set, it will default to the current user which is asterisk in any
# standard configuration.
#
#SSHBACKUP=yes
#SSHUSER=backups
#SSHRSAKEY=/etc/asterisk/backup_rsa
#SSHSUBDIR=mysubdir
#SSHSERVER=mybackupserver.com

# AMPPROVROOT=/var/ftp /tftpboot
# One or more directories where there are provisioning files that should be included in the backup. Currently
# these get backed up only, the FreePBX utility does not automatically restore them.
#
#AMPPROVROOT=/var/ftp /tftpboot
# AMPPROVEXCLUDE=/var/ftp/exclude-from-file-list
# a list of files to exclude, to be used in tar's --exclude-from argument
#
#AMPPROVEXCLUDE=/var/ftp/exclude-from-file-list

AMPDBPASS=
AMPDBNAME=asterisk
ASTETCDIR=/etc/asterisk
ASTMODDIR=/usr/lib/asterisk/modules
ASTVARLIBDIR=/var/lib/asterisk
ASTAGIDIR=/var/lib/asterisk/agi-bin
ASTSPOOLDIR=/var/spool/asterisk
ASTRUNDIR=/var/run/asterisk
ASTLOGDIR=/var/log/asterisk

After removing the second AMPDBPASS, and adding amp109 to the first things worked better.

Change History

07/21/07 08:49:59 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to fixed.

r4478 fixed
you now must have asterisk running or install_amp will fail right away, since it needs a connection to asterisk to do the proper packaged module installation.