none of the following worked

   drush hostmaster-install
   drush hostmaster-install --aegir_db_user=root --aegir_db_pass=password  
   drush hostmaster-install --aegir_db_user=aegir --aegir_db_pass=password

with similar message to

SQLSTATE[28000] [1045] Access denied for user 'aegir'@'localhost' (using password: NO)                                                                       [error]
Unable to connect to database server.                  [error]

*_NOTE_* that whether i state the user is root or aegir the script always fails with aegir@localhost as mentioned in #1134526

my OS is centos 5.6

the steps i did to reach that stage are:

cat /etc/redhat-release| grep CentOS > /dev/null
if [ $? -eq 0 ]
then
        rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5.5/i386/epel-release-1-1.ius.el5.noarch.rpm http://dl.iuscommunity.org/pub/ius/stable/Redhat/5.5/i386/ius-release-1.0-6.ius.el5.noarch.rpm
        yum -y install yum-plugin-replace
        yum -y replace php --replace-with php53
        yum -y install httpd postfix sudo unzip mysql-server php53u-pdo php53u-process php53u-mysql
else
        yum -y install httpd postfix sudo unzip mysql-server php php-mysql php-process
fi
sed -i 's/^memory_limit = .*$/memory_limit = 192M/g' /etc/php.ini 
service httpd restart
service mysqld restart
/usr/bin/mysql_secure_installation
export WEBHOME=/var/www/html/aegir
echo " INFO: User creation"
useradd --home-dir $WEBHOME aegir
gpasswd -a aegir apache
chmod -R 755 $WEBHOME
! [ -d $WEBHOME ] || mkdir $WEBHOME 
chown aegir.apache $WEBHOME
grep aegir /etc/sudoers > /dev/null
if ! [ $? -eq 0 ]
then
        echo "aegir ALL=NOPASSWD: /usr/sbin/apachectl" >> /etc/sudoers
fi
echo " INFO: Creating MySQL user: $AEGIR_DB_USER"
mysql -uroot -ppassword -e "CREATE USER aegir@localhost IDENTIFIED BY 'password';" 
mysql -uroot -ppassword -e "CREATE USER aegir@'`hostname`' IDENTIFIED BY 'password';" 
mysql -uroot -ppassword -e "GRANT ALL ON *.* TO aegir@'`hostname`'"
mysql -uroot -ppassword -e "GRANT ALL ON *.* TO aegir@localhost"
su -c -l aegir '
export DRUSH_VERSION=7.x-4.4
export WEBHOME=/var/www/html/aegir
export HOME=$WEBHOME
export drush="$WEBHOME/bin/drush/drush" 
export DRUPAL_VER=6.x
export AEGIR_DB_USER=aegir
export AEGIR_DB_PASS=password
mkdir ~/bin/
cd $HOME/bin
wget http://ftp.drupal.org/files/projects/drush-$DRUSH_VERSION.tar.gz 
gunzip -c drush-$DRUSH_VERSION.tar.gz | tar -xf -
rm -rf drush-$DRUSH_VERSION.tar.gz
alias drush="$HOME/bin/drush/drush" >> $HOME/.bashrc
. $HOME/.bashrc
cd $HOME
$drush -y self-update
$drush --destination=$HOME dl drupal-$DRUPAL_VER
echo Installing drupal module : provision
$drush dl --destination=$HOME/.drush provision-6.x
echo Running hostmaster install
echo ---
echo $drush hostmaster-install --aegir_db_user=$AEGIR_DB_USER --aegir_db_pass=$AEGIR_DB_PASS
echo ---
$drush hostmaster-install
'

Comments

anarcat’s picture

There's an error in your procedure:

echo " INFO: Creating MySQL user: $AEGIR_DB_USER"
mysql -uroot -ppassword -e "CREATE USER aegir@localhost IDENTIFIED BY 'password';" 
mysql -uroot -ppassword -e "CREATE USER aegir@'`hostname`' IDENTIFIED BY 'password';" 
mysql -uroot -ppassword -e "GRANT ALL ON *.* TO aegir@'`hostname`'"
mysql -uroot -ppassword -e "GRANT ALL ON *.* TO aegir@localhost"

that user will have access only to one database. the user you pass to hostmaster-install should have root access.

unless you are trying to write a script or package for this platform, please follow the documented way to install and upgrade your platform (more specifically this).

where does this procedure come from?

anarcat’s picture

Category: bug » support
Status: Active » Postponed (maintainer needs more info)
marafa’s picture

anarcat

i cant see where the mistake is? could you point it out to me?

thanks

anarcat’s picture

Status: Postponed (maintainer needs more info) » Fixed

As I said:

that user will have access only to one database. the user you pass to hostmaster-install should have root access.

Which means that the mysql user you are creating is wrong - you need to give it more (ie. root) privileges.

You should really follow the right install instructions.

marafa’s picture

Status: Fixed » Postponed (maintainer needs more info)

The only specific references to the mysql user that i can find are belo:

- "Aegir will create database users and will require the use of the MySQL 'root' user."
- "The installer will prompt you for your MySQL root user password. The root user will be used to make administrative tasks such as creating new databases, and granting and revoking access to those databases for sites."

so it does not say aegir requires root priveledges. but no matter because even when i say it

   drush hostmaster-install --aegir_db_user=root --aegir_db_pass=password  

it fails too

pls advise as to what i am missing also, if you could give me the command to give the aegir user root priveledges i would appreciate it.

thanks

anarcat’s picture

Can you show us how it fails when you call it with db_user=root?

marafa’s picture

another attempt:

[aegir@aegir ~]$ drush hostmaster-install --debug --aegir_db_user=root
Bootstrap to phase 0. [0.01 sec, 2.47 MB]                            [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.01 sec, 2.67 MB] [bootstrap]
Bootstrap to phase 0. [0.04 sec, 7.69 MB]                                                                                                                    [bootstrap]
Found command: hostmaster-install (commandfile=provision) [0.04 sec, 7.7 MB]                                                                                 [bootstrap]
Initializing drush commandfile: provision [0.04 sec, 7.7 MB]                                                                                                 [bootstrap]
Load alias @self [0.04 sec, 7.7 MB]                                                                                                                             [notice]
Load alias @server_master [0.04 sec, 7.71 MB]                                                                                                                   [notice]
Loading mysql driver for the db service [0.05 sec, 7.73 MB]                                                                                                     [notice]
Loading apache driver for the http service [0.05 sec, 7.74 MB]                                                                                                  [notice]
Initializing drush commandfile: user [0.05 sec, 7.75 MB]                                                                                                     [bootstrap]
Including /var/www/html/aegir/.drush/provision/install.hostmaster.inc [0.05 sec, 7.75 MB]                                                                    [bootstrap]
Aegir 6.x-1.1 automated install script
==============================================================================
Some settings have not been provided and will now be prompted.
Don't worry: you will get to review those settings after the final install
Aegir frontend URL [localhost.localdomain]: 
MySQL privileged user ("root") password: 
Admin user e-mail [webmaster@localhost.localdomain]: 

This script will operate the following changes in your system:

1. Create server-level configuration directories
2. Download drush_make
3. Create the Hostmaster frontend platform
4. Install the frontend site
5. Setup the dispatcher (a user cron job)

We are making the following assumptions:
 * you have read INSTALL.txt and prepared the platform accordingly
 * the FQDN of this machine is valid and resolves
 * you are executing this script as your "aegir" user

The following settings will be used:
 Aegir frontend URL: localhost.localdomain
 Master server FQDN: localhost.localdomain
 Aegir root: /var/www/html/aegir
 Aegir user: aegir
 Web group: apache
 Web server: apache
 Aegir DB host: localhost
 Aegir DB user: root
 Aegir DB password: <prompted>
 Drush make version: 6.x-2.2
 Aegir version: 6.x-1.1
 Aegir platform path: /var/www/html/aegir/hostmaster-6.x-1.1
 Aegir makefile: /var/www/html/aegir/.drush/provision/aegir.make
 Admin email: webmaster@localhost.localdomain

Do you really want to proceed with the install (y/n): y
Running: /var/www/html/aegir/drush/drush.php  --remote_host='localhost' --context_type='server' --db_service_type='mysql'                                      [command]
--master_db='mysql://root:password@localhost' provision-save '@server_localhost' --backend  2>&1 [12.73 sec, 7.84 MB]
Bootstrap to phase 0. [12.79 sec, 7.87 MB]                                                                                                                   [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [12.79 sec, 7.87 MB]                                                                                        [bootstrap]
Bootstrap to phase 0. [12.79 sec, 7.87 MB]                                                                                                                   [bootstrap]
Found command: provision-save (commandfile=provision) [12.79 sec, 7.88 MB]                                                                                   [bootstrap]
Initializing drush commandfile: provision [12.79 sec, 7.88 MB]                                                                                               [bootstrap]
Load alias @self [12.79 sec, 7.88 MB]                                                                                                                           [notice]
Load alias @server_master [12.79 sec, 7.88 MB]                                                                                                                  [notice]
Loading mysql driver for the db service [12.79 sec, 7.88 MB]                                                                                                    [notice]
Loading apache driver for the http service [12.79 sec, 7.88 MB]                                                                                                 [notice]
Loading mysql driver for the db service [12.79 sec, 7.88 MB]                                                                                                    [notice]
Initializing drush commandfile: user [12.79 sec, 7.88 MB]                                                                                                    [bootstrap]
Load alias @server_localhost [12.79 sec, 7.88 MB]                                                                                                               [notice]
Loading mysql driver for the db service [12.79 sec, 7.88 MB]                                                                                                    [notice]
Template loaded: /var/www/html/aegir/.drush/provision/provision_drushrc_alias.tpl.php [12.79 sec, 7.89 MB]                                                      [notice]
Changed permissions of /var/www/html/aegir/.drush/server_localhost.alias.drushrc.php to 600 [12.79 sec, 7.89 MB]                                               [message]
Generated config Drush configuration file [12.79 sec, 7.89 MB]                                                                                                 [message]
Changed permissions of /var/www/html/aegir/.drush/server_localhost.alias.drushrc.php to 400 [12.79 sec, 7.89 MB]                                               [message]
Command dispatch complete [12.79 sec, 7.89 MB]                                                                                                                  [notice]
Peak memory usage was 7.9 MB [12.79 sec, 7.89 MB]                                                                                                               [memory]
Running: /var/www/html/aegir/drush/drush.php  @server_localhost provision-verify --backend  2>&1 [12.79 sec, 7.86 MB]                                          [command]
Bootstrap to phase 0. [12.86 sec, 7.92 MB]                                                                                                                   [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [12.86 sec, 7.92 MB]                                                                                        [bootstrap]
Load alias @server_localhost [12.86 sec, 7.92 MB]                                                                                                               [notice]
Bootstrap to phase 0. [12.86 sec, 7.92 MB]                                                                                                                   [bootstrap]
Found command: provision-verify (commandfile=provision) [12.86 sec, 7.92 MB]                                                                                 [bootstrap]
Initializing drush commandfile: provision [12.86 sec, 7.93 MB]                                                                                               [bootstrap]
Load alias @server_master [12.86 sec, 7.93 MB]                                                                                                                  [notice]
Loading mysql driver for the db service [12.86 sec, 7.93 MB]                                                                                                    [notice]
Loading apache driver for the http service [12.86 sec, 7.93 MB]                                                                                                 [notice]
Loading mysql driver for the db service [12.86 sec, 7.93 MB]                                                                                                    [notice]
Initializing drush commandfile: user [12.86 sec, 7.93 MB]                                                                                                    [bootstrap]
Including /var/www/html/aegir/.drush/provision/dns/verify.provision.inc [12.86 sec, 7.93 MB]                                                                 [bootstrap]
Including /var/www/html/aegir/.drush/provision/platform/backupmigrate/verify.provision.inc [12.86 sec, 7.93 MB]                                              [bootstrap]
Including /var/www/html/aegir/.drush/provision/platform/verify.provision.inc [12.86 sec, 7.93 MB]                                                            [bootstrap]
Provision configuration root path /var/www/html/aegir/config exists. [12.86 sec, 7.93 MB]                                                                      [message]
Provision configuration root ownership of /var/www/html/aegir/config has been changed to aegir. [12.86 sec, 7.94 MB]                                           [message]
Provision configuration root permissions of /var/www/html/aegir/config have been changed to 711. [12.86 sec, 7.94 MB]                                          [message]
Provision configuration root path /var/www/html/aegir/config is writable. [12.86 sec, 7.94 MB]                                                                 [message]
Provision configuration path /var/www/html/aegir/config/server_localhost exists. [12.86 sec, 7.94 MB]                                                          [message]
Provision configuration ownership of /var/www/html/aegir/config/server_localhost has been changed to aegir. [12.86 sec, 7.94 MB]                               [message]
Provision configuration permissions of /var/www/html/aegir/config/server_localhost have been changed to 711. [12.86 sec, 7.94 MB]                              [message]
Provision configuration path /var/www/html/aegir/config/server_localhost is writable. [12.86 sec, 7.94 MB]                                                     [message]
Provision client home path /var/www/html/aegir/clients exists. [12.86 sec, 7.94 MB]                                                                            [message]
Provision client home ownership of /var/www/html/aegir/clients has been changed to aegir. [12.86 sec, 7.94 MB]                                                 [message]
Provision client home permissions of /var/www/html/aegir/clients have been changed to 711. [12.86 sec, 7.94 MB]                                                [message]
Provision client home path /var/www/html/aegir/clients is writable. [12.86 sec, 7.95 MB]                                                                       [message]
Provision can create new databases. [12.86 sec, 7.95 MB]                                                                                                       [message]
Command dispatch complete [12.86 sec, 7.95 MB]                                                                                                                  [notice]
Peak memory usage was 7.91 MB [12.86 sec, 7.95 MB]                                                                                                              [memory]
Running: /var/www/html/aegir/drush/drush.php  --context_type='server' --remote_host='localhost.localdomain' --aegir_root='/var/www/html/aegir'                 [command]
--script_user='aegir' --http_service_type='apache' --web_group='apache' --master_url='http://localhost.localdomain' provision-save '@server_master' --backend
 2>&1 [12.86 sec, 7.89 MB]
Bootstrap to phase 0. [12.92 sec, 7.93 MB]                                                                                                                   [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [12.92 sec, 7.93 MB]                                                                                        [bootstrap]
Bootstrap to phase 0. [12.93 sec, 7.93 MB]                                                                                                                   [bootstrap]
Found command: provision-save (commandfile=provision) [12.93 sec, 7.93 MB]                                                                                   [bootstrap]
Initializing drush commandfile: provision [12.93 sec, 7.93 MB]                                                                                               [bootstrap]
Load alias @self [12.93 sec, 7.93 MB]                                                                                                                           [notice]
Load alias @server_master [12.93 sec, 7.93 MB]                                                                                                                  [notice]
Loading mysql driver for the db service [12.93 sec, 7.93 MB]                                                                                                    [notice]
Loading apache driver for the http service [12.93 sec, 7.93 MB]                                                                                                 [notice]
Loading apache driver for the http service [12.93 sec, 7.94 MB]                                                                                                 [notice]
Initializing drush commandfile: user [12.93 sec, 7.94 MB]                                                                                                    [bootstrap]
Template loaded: /var/www/html/aegir/.drush/provision/provision_drushrc_alias.tpl.php [12.93 sec, 7.94 MB]                                                      [notice]
Changed permissions of /var/www/html/aegir/.drush/server_master.alias.drushrc.php to 600 [12.93 sec, 7.94 MB]                                                  [message]
Generated config Drush configuration file [12.93 sec, 7.94 MB]                                                                                                 [message]
Changed permissions of /var/www/html/aegir/.drush/server_master.alias.drushrc.php to 400 [12.93 sec, 7.94 MB]                                                  [message]
Command dispatch complete [12.93 sec, 7.94 MB]                                                                                                                  [notice]
Peak memory usage was 7.88 MB [12.93 sec, 7.94 MB]                                                                                                              [memory]
Running: /var/www/html/aegir/drush/drush.php  @server_master provision-verify --backend  2>&1 [12.93 sec, 7.91 MB]                                             [command]
Bootstrap to phase 0. [13.24 sec, 8.04 MB]                                                                                                                   [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [13.24 sec, 8.04 MB]                                                                                        [bootstrap]
Load alias @server_master [13.24 sec, 8.04 MB]                                                                                                                  [notice]
Bootstrap to phase 0. [13.24 sec, 8.04 MB]                                                                                                                   [bootstrap]
Found command: provision-verify (commandfile=provision) [13.24 sec, 8.04 MB]                                                                                 [bootstrap]
Initializing drush commandfile: provision [13.24 sec, 8.05 MB]                                                                                               [bootstrap]
Loading mysql driver for the db service [13.24 sec, 8.05 MB]                                                                                                    [notice]
Loading apache driver for the http service [13.24 sec, 8.05 MB]                                                                                                 [notice]
Initializing drush commandfile: user [13.24 sec, 8.05 MB]                                                                                                    [bootstrap]
Including /var/www/html/aegir/.drush/provision/dns/verify.provision.inc [13.24 sec, 8.05 MB]                                                                 [bootstrap]
Including /var/www/html/aegir/.drush/provision/platform/backupmigrate/verify.provision.inc [13.24 sec, 8.05 MB]                                              [bootstrap]
Including /var/www/html/aegir/.drush/provision/platform/verify.provision.inc [13.24 sec, 8.05 MB]                                                            [bootstrap]
Provision configuration root path /var/www/html/aegir/config exists. [13.24 sec, 8.05 MB]                                                                      [message]
Provision configuration root ownership of /var/www/html/aegir/config has been changed to aegir. [13.24 sec, 8.05 MB]                                           [message]
Provision configuration root permissions of /var/www/html/aegir/config have been changed to 711. [13.24 sec, 8.05 MB]                                          [message]
Provision configuration root path /var/www/html/aegir/config is writable. [13.24 sec, 8.06 MB]                                                                 [message]
Provision configuration path /var/www/html/aegir/config/server_master exists. [13.24 sec, 8.06 MB]                                                             [message]
Provision configuration ownership of /var/www/html/aegir/config/server_master has been changed to aegir. [13.24 sec, 8.06 MB]                                  [message]
Provision configuration permissions of /var/www/html/aegir/config/server_master have been changed to 711. [13.24 sec, 8.06 MB]                                 [message]
Provision configuration path /var/www/html/aegir/config/server_master is writable. [13.24 sec, 8.06 MB]                                                        [message]
Provision client home path /var/www/html/aegir/clients exists. [13.24 sec, 8.06 MB]                                                                            [message]
Provision client home ownership of /var/www/html/aegir/clients has been changed to aegir. [13.24 sec, 8.06 MB]                                                 [message]
Provision client home permissions of /var/www/html/aegir/clients have been changed to 711. [13.24 sec, 8.06 MB]                                                [message]
Provision client home path /var/www/html/aegir/clients is writable. [13.24 sec, 8.06 MB]                                                                       [message]
Backup path /var/www/html/aegir/backups exists. [13.25 sec, 8.06 MB]                                                                                           [message]
Backup ownership of /var/www/html/aegir/backups has been changed to aegir. [13.25 sec, 8.07 MB]                                                                [message]
Backup permissions of /var/www/html/aegir/backups have been changed to 700. [13.25 sec, 8.07 MB]                                                               [message]
Backup path /var/www/html/aegir/backups is writable. [13.25 sec, 8.07 MB]                                                                                      [message]
Provision PHP configuration path /var/www/html/aegir/config/includes exists. [13.25 sec, 8.07 MB]                                                              [message]
Provision PHP configuration ownership of /var/www/html/aegir/config/includes has been changed to aegir. [13.25 sec, 8.07 MB]                                   [message]
Provision PHP configuration permissions of /var/www/html/aegir/config/includes have been changed to 711. [13.25 sec, 8.07 MB]                                  [message]
Provision PHP configuration path /var/www/html/aegir/config/includes is writable. [13.25 sec, 8.07 MB]                                                         [message]
Global configuration file exists [13.25 sec, 8.07 MB]                                                                                                          [message]
Undefined index: user db.drush.inc:288 [13.25 sec, 8.07 MB]                                                                                                     [notice]
Undefined index: pass db.drush.inc:288 [13.25 sec, 8.08 MB]                                                                                                     [notice]
SQLSTATE[28000] [1045] Access denied for user 'aegir'@'localhost' (using password: NO) [13.25 sec, 8.08 MB]                                                  [error]
Unable to connect to database server. [13.25 sec, 8.08 MB]                                                                                                   [error]
Webserver custom pre-configuration path /var/www/html/aegir/config/server_master/apache/pre.d exists. [13.25 sec, 8.08 MB]                                     [message]
Webserver custom pre-configuration ownership of /var/www/html/aegir/config/server_master/apache/pre.d has been changed to aegir. [13.25 sec, 8.08 MB]          [message]
Webserver custom pre-configuration permissions of /var/www/html/aegir/config/server_master/apache/pre.d have been changed to 700. [13.25 sec, 8.08 MB]         [message]
Webserver custom pre-configuration path /var/www/html/aegir/config/server_master/apache/pre.d is writable. [13.25 sec, 8.08 MB]                                [message]
Webserver custom post-configuration path /var/www/html/aegir/config/server_master/apache/post.d exists. [13.25 sec, 8.08 MB]                                   [message]
Webserver custom post-configuration ownership of /var/www/html/aegir/config/server_master/apache/post.d has been changed to aegir. [13.25 sec, 8.08 MB]        [message]
Webserver custom post-configuration permissions of /var/www/html/aegir/config/server_master/apache/post.d have been changed to 700. [13.25 sec, 8.09 MB]       [message]
Webserver custom post-configuration path /var/www/html/aegir/config/server_master/apache/post.d is writable. [13.25 sec, 8.09 MB]                              [message]
Webserver platform configuration path /var/www/html/aegir/config/server_master/apache/platform.d exists. [13.25 sec, 8.09 MB]                                  [message]
Webserver platform configuration ownership of /var/www/html/aegir/config/server_master/apache/platform.d has been changed to aegir. [13.25 sec, 8.09 MB]       [message]
Webserver platform configuration permissions of /var/www/html/aegir/config/server_master/apache/platform.d have been changed to 700. [13.25 sec, 8.09 MB]      [message]
Webserver platform configuration path /var/www/html/aegir/config/server_master/apache/platform.d is writable. [13.25 sec, 8.09 MB]                             [message]
Webserver virtual host configuration path /var/www/html/aegir/config/server_master/apache/vhost.d exists. [13.25 sec, 8.09 MB]                                 [message]
Webserver virtual host configuration ownership of /var/www/html/aegir/config/server_master/apache/vhost.d has been changed to aegir. [13.25 sec, 8.09 MB]      [message]
Webserver virtual host configuration permissions of /var/www/html/aegir/config/server_master/apache/vhost.d have been changed to 700. [13.25 sec, 8.1 MB]      [message]
Webserver virtual host configuration path /var/www/html/aegir/config/server_master/apache/vhost.d is writable. [13.25 sec, 8.1 MB]                             [message]
Platforms path /var/www/html/aegir/platforms exists. [13.25 sec, 8.1 MB]                                                                                       [message]
Platforms ownership of /var/www/html/aegir/platforms has been changed to aegir. [13.25 sec, 8.1 MB]                                                            [message]
Platforms permissions of /var/www/html/aegir/platforms have been changed to 755. [13.25 sec, 8.1 MB]                                                           [message]
Platforms path /var/www/html/aegir/platforms is writable. [13.25 sec, 8.1 MB]                                                                                  [message]
Template loaded: /var/www/html/aegir/.drush/provision/http/apache/server.tpl.php [13.25 sec, 8.1 MB]                                                            [notice]
Generated config web server configuration file [13.25 sec, 8.1 MB]                                                                                             [message]
Created symlink for apache.conf on localhost.localdomain [13.25 sec, 8.1 MB]                                                                                    [notice]
apache on localhost.localdomain has been restarted [13.25 sec, 8.1 MB]                                                                                          [notice]
Command dispatch complete [13.25 sec, 8.11 MB]                                                                                                                  [notice]
Peak memory usage was 7.99 MB [13.25 sec, 8.11 MB]                                                                                                              [memory]
Command dispatch complete [13.25 sec, 7.96 MB]                                                                                                                  [notice]
Peak memory usage was 8.13 MB [13.25 sec, 7.96 MB]                                                                                                              [memory]
[aegir@aegir ~]$ 

anarcat’s picture

Sorry for the delay. Please look in the ~/.drush/server_master.alias.php file if the password is properly stored there. Normally it should be passed down from hostmaster-install by provision-save.

marafa’s picture

apparently the directory /var/aegir has been hard coded into the script and that is why it kept failing with me. it worked when i used that directory instead of /var/www/html
in the redhat world web apps and data go into /var/www/html and i do believe this is an lsb standard but then again i am not a lawyer.

note that phpmyadmin goes into /usr/share/phpMyAdmin via /etc/httpd/conf.d/phpMyAdmin.conf file however it is an app and does not have data.

as to why when this directory was used it rejected all passwords is unknown as i am not a programmer.

socialnicheguru’s picture

Title: hostmaster 1.1 refuses to install » hostmaster 1.1 refuses to install - special characters in password are not escaped correctly (also on aegir 1.6)

#9 and anarcat. This should be placed in troubleshooting on community.aegirproject.org.

OK. I was having this on problem on Aegir 1.6.

In fact if you have a special character in your password it does NOT escape it correctly.

Edit. I think the file, /var/aegir/.drush/server_localhost.alias.drushrc.php, takes it's value from the database.
in phpmyadmin do a search for your database
The result should be something like:
1 match(es) inside table hosting_db_server

change it here. I believe that the above .drush file gets it's value from the database

steven jones’s picture

Title: hostmaster 1.1 refuses to install - special characters in password are not escaped correctly (also on aegir 1.6) » special characters in password are not escaped correctly
Version: 6.x-1.1 » 6.x-1.6
Status: Postponed (maintainer needs more info) » Needs work

Need to step through the code in a debugger and see what light that sheds...

This is a good candidate for getting some tests.

anarcat’s picture

@SocialNicheGuru - feel free to add to the troubleshooting section, it's a wiki.

@steven - i suspect the bug is higher up in the stack, probably in hostmaster-install, as we do have proper escape routines when writing, if i remember correctly.

chriszz’s picture

Same thing happened to me. Password with Special Characters was not saved correctly in the AEGIR Database. I was doing a debian apt-get install from 1.6. Changing the password in the database as recommended by #11 was the remedy.

thanks and best regards
Christian

vadym.kononenko’s picture

Hi all.
I've found workaround for this error.

1. I've tried to set correct password through SQL Query in my 'Mysql Query Browser', but special char '[' was replaced to '%5B' in updated record too.

2. In '/var/lib/aegir/.drush/server_localhost.alias.drushrc.php' I've replace '%55B' chars to '%5B' and made file unchangable thorough 'chattr +i /var/lib/aegir/.drush/server_localhost.alias.drushrc.php'
3. After this manipulations aegir verification procedule for 'localhost' server went to successfull state with such warnings:
Could not change permissions of /var/lib/aegir/.drush/server_localhost.alias.drushrc.php to 640 (chmod to 640 failed on /var/lib/aegir/.drush/server_localhost.alias.drushrc.php)
file_put_contents(/var/lib/aegir/.drush/server_localhost.alias.drushrc.php): failed to open stream: Permission denied provision.file.inc:430
Could not generate Drush configuration file

My configuration: dpkg -l | grep aegir
ii aegir 1.7 mass Drupal hosting system
ii aegir-cluster-slave 1.7 web frontend for the Aegir hosting system
ii aegir-hostmaster 1.7 mass Drupal hosting system - frontend
ii aegir-provision 1.7 mass Drupal hosting system - backend

steven jones’s picture

Status: Needs work » Closed (works as designed)

Just tried this again, and I really do think that we fixed it in recent releases of Aegir. If you can give me an example of a password that Aegir doesn't install with, please re-open.