White flag is up.

Starting from a fresh Ubutu image at vps.net and following the server prep instructions (loosely) and the latest readme at http://cvs.drupal.org/viewvc.py/drupal/contributions/profiles/hostmaster/INSTALL.txt?revision=1.52 is resulting in a less than desirable outcome for me.

Following other threads regarding su -s /bin/sh aegir or su -u /bin/bash aegir may or may not be causing problems but I personally don't think that is the issue as both seem to work. I've started over five times now, two attempts from the script and three from following the readme, a few overlapped but three times from a fresh Ubuntu image (I removed the .tmp files as suggested in another thread), consequently I'm getting faster building the install.

During the install I documented when problems, warnings, errors were encountered.

root@webserver:~# a2enmod rewrite
Module rewrite installed; run /etc/init.d/apache2 force-reload to enable.
root@webserver:~# echo "Include /var/aegir/config/vhost.d/" > /etc/apache2/conf.d/aegir

root@webserver:~# /etc/init.d/apache2 restart
 * Restarting web server apache2                                                
Warning: DocumentRoot [/var/aegir/drupal-6.x] does not exist
Warning: DocumentRoot [/var/aegir/drupal-6.x] does not exist
[Mon Oct 26 16:23:47 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
[Mon Oct 26 16:23:47 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
[Mon Oct 26 16:23:47 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
Warning: DocumentRoot [/var/aegir/drupal-6.x] does not exist
Warning: DocumentRoot [/var/aegir/drupal-6.x] does not exist
[Mon Oct 26 16:23:58 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
[Mon Oct 26 16:23:58 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
[Mon Oct 26 16:23:58 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
                                                                         [ OK ]

root@webserver:/var/aegir/drupal-6.14# su -s /bin/bash aegir
aegir@webserver:~/drupal-6.14$ /var/aegir/drush/drush.php hosting setup

Fatal error: Cannot redeclare provision_ssl_provision_apache_vhost_config() in /var/aegir/.drush/provision/ssl/provision_ssl.drush.inc on line 22
Drush command could not be completed.                                [error]
aegir@webserver:~/drupal-6.14$ php /var/drush/drush.php --uri=http://aegir.loc --root='/var/aegir/drupal-6.14' hosting setup --debug
Could not open input file: /var/drush/drush.php
aegir@webserver:~/drupal-6.14$ php /var/drush/drush.php --uri=http://aegir.loc --root='/var/aegir/drupal-6.14' provision verify --debug
Could not open input file: /var/drush/drush.php

I don't remember which attempt this was encountered and may not remain applicable.

Could not move build into place. Directory already exists:           [error]
tmp1256522297/hostmaster-0.4-alpha2
Could not move build into place. Directory already exists:           [error]
hostmaster-0.4-alpha2
hosting export from contributions/profiles/hosting.
eldir export from contributions/themes/eldir.
admin_menu downloaded from http://ftp.drupal.org/files/projects/admin_menu-6.x-1.5.tar.gz.
install_profile_api downloaded from http://ftp.drupal.org/files/projects/install_profile_api-6.x-2.1.tar.gz.
An error occurred at function : drush_provision_hostmaster_make      [error]

I suspect server configuration and not aegir installation issues and was therefore reluctant to create this post but I'm unsure where to go from here. Obviously I can keep starting over but when the end result is the same that action defines...well you know.

Thanks for any guidance, suggestions, comments, or indifference.

Comments

manogolf’s picture

Category: support » bug
StatusFileSize
new7.63 KB

Thought it more appropriate to report in category 'bug report' (not intentionally bumping).

Also attached txt file showing first error encounters for clarity.

Can you answer this for me please?


From the install.txt

The provision framework is not a drupal module but a drush extension,
and it *must* always be run as Aegir's user to avoid further permission
problems. So we will place it in ``/var/aegir/.drush`` to ensure that.

Does

export CVSROOT=:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal
 cvs co -d .drush/provision -r$AEGIR_TAG contributions/modules/provision

automatically put what is needed into '/var/aegir/.drush' or are you instucting to navigate to that destination first? I assume everything is done for you but I'm just making sure.

The image is a fresh Debian LAMP. Wanted to see if Debian was any friendlier than Ubuntu, but no.

Anonymous’s picture

Category: bug » support
Warning: DocumentRoot [/var/aegir/drupal-6.x] does not exist 

You need to edit the apache vhost config that you copied into /var/aegir/config/vhost.d/ from profiles/hostmaster/apache2.conf, it is a template and we instruct that it needs to be edited to match your configuration (specifically the DocumentRoot, Directory contents, and ServerName must be modified to suit)

Could not move build into place. Directory already exists:           [error]
tmp1256522297/hostmaster-0.4-alpha2

This is an issue with drush_make, I'm not sure what causes it, but it should be harmless

export CVSROOT=:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal
cvs co -d .drush/provision -r$AEGIR_TAG contributions/modules/provision
automatically put what is needed into '/var/aegir/.drush' or are you instucting to navigate to that destination first? I assume everything is done for you but I'm just making sure. 

No, it is automatically put into .drush/provision. In the INSTALL.txt, if you've followed each step in turn, you will already be sitting inside the /var/aegir dir when you run that.

Fatal error: Cannot redeclare provision_ssl_provision_apache_vhost_config() in /var/aegir/.drush/provision/ssl/provision_ssl.drush.inc on line 22

This looks like a symptom of having a 'provision.tmp' folder inside /var/aegir/.drush/provision, which you mentioned you found from the other ticket and fixed.

manogolf’s picture

I did brush by the necessity to edit the aegir.example.com file but mainly because when I opened that file I saw:

# This will be replaced by aegir when the base platform will be verified
<Directory /var/aegir/drupal-6.x>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>

<VirtualHost *:80>
    RewriteEngine On
    ServerAdmin webmaster@localhost
    ServerName aegir.example.com

    DocumentRoot /var/aegir/drupal-6.x
</VirtualHost>

The following was pasted over NameVirtualHost *:80. Please take a look at DocumentRoot and let me know if I am closing in :) I hacked this together from another server running a Debian LAMP.

NameVirtualHost XX.XXX.XX.XX:80
<VirtualHost XX.XXX.XX.XX:80>
	ServerName mydomainname.com
	DocumentRoot /var/aegir/hostmaster-0.4-alpha2/sites/aegir.example.com
	ServerAlias www.mydomainname.com *.mydomainname.com
	ServerAdmin webmaster@mydomainname.com
	php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f webmaster@mydomainname.com"
	AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml
	AddType application/x-httpd-php-source .phps
</VirtualHost>

An example of a trimmed version appropriately included somewhere in the wiki might be useful for others like myself.

In spite of including the virtual host information this error is showing when restarting apache:

webserver:/var/aegir/config/vhost.d# /etc/init.d/apache2 restart
Restarting web server: apache2Warning: DocumentRoot [/var/aegir/drupal-6.x                           ] does not exist
 ... waiting Warning: DocumentRoot [/var/aegir/drupal-6.x] does not exist

I don't really believe this is an issue since subsequent steps occur.

Unfortunately I am still encountering errors with hostmaster make.
The attached text above and post pointed out I was using a fresh image install. This was a first run install and I attached the file so someone could see the point of failure. I ran the command again and results are:

aegir@webserver:~$ php drush/drush.php hostmaster make $HOSTMASTER_DIR
Missing argument 1 for drush_provision_hostmaster_make()             [warning]
Could not move build into place. Directory already exists:           [error]
tmp1256596939
Build complete.                                                      [completed]
hosting export from contributions/profiles/hosting.
eldir export from contributions/themes/eldir.
admin_menu downloaded from http://ftp.drupal.org/files/projects/admin_menu-6.x-1.5.tar.gz.
install_profile_api downloaded from http://ftp.drupal.org/files/projects/install_profile_api-6.x-2.1.tar.gz.
An error occurred at function : drush_provision_hostmaster_make      [error]

I appreciate your looking in on me :)

Anonymous’s picture

DocumentRoot should be /var/aegir/hostmaster-0.4-alpha2/ and not the full path to the site itself inside sites/ . I still think it would be better to use the template as advised and edit where required.

aegir@webserver:~$ php drush/drush.php hostmaster make $HOSTMASTER_DIR
Missing argument 1 for drush_provision_hostmaster_make()             [warning]

You're probably missing the environment variable $HOSTMASTER_DIR ?

webserver:/var/aegir/config/vhost.d# /etc/init.d/apache2 restart
Restarting web server: apache2Warning: DocumentRoot [/var/aegir/drupal-6.x                           ] does not exist
... waiting Warning: DocumentRoot [/var/aegir/drupal-6.x] does not exist

There's no magic happening here, you must have that DocumentRoot defined *somewhere* for Apache to read it and give that warning.

If you follow the steps from INSTALL.txt from start to finish without skipping any steps, I am sure some of these errors will go away.

manogolf’s picture

OK so maybe I can't follow instructions very well.

The image which returned those errors was deleted and a fresh Debian image created (vps.net makes this stuff easy, I'm sure others do as well).

This time I took the install script approach, which I really like BTW. This is from the published website Verify Your Configuration Screen:

Task starts processing
Running: php /var/aegir/drush/drush.php --root='/var/aegir/drupal-6.14' 'provision' 'verify' --backend
Drush bootstrap phase : _drush_bootstrap_drush()
Drush bootstrap phase : _drush_bootstrap_drupal_root()
Initialized Drupal 6.14 root directory at /var/aegir/drupal-6.14
Found command: provision verify
Initializing drush commandfile: provision_apache
Undefined index: base_url
Initializing drush commandfile: provision_drupal
Initializing drush commandfile: provision_mysql
Undefined index: db_url
Undefined index: user
Undefined index: pass
Undefined index: host
Undefined index: host
Undefined index: scheme
Undefined index: scheme
Including /var/aegir/.drush/provision/web_server/verify.provision.inc
Including /var/aegir/.drush/provision/platform/verify.provision.inc
Including /var/aegir/.drush/provision/db_server/verify.provision.inc
Including /var/aegir/.drush/provision/ssl/verify.provision.inc
Could not connect to the master database.
An error occurred at function : drush_provision_mysql_provision_verify_validate
Command dispatch complete
Removing task from hosting queue
An error occurred at function : drush_hosting_hosting_task
Changes for drush_hosting_hosting_task module have been rolled back.
Command dispatch complete

Still not clean. What do you think? Good enough? Should I proceed and finish?

Anonymous’s picture

Could not connect to the master database. 

The most common cause of this, I think, is that the mysql aegir superuser wasn't created or not created with the right permissions. Double check the mysql users in the mysql database, and cross reference that with the user in the hosting_db_server table in the aegir database.

Or add the grant again manually. ie for the mysql superuser:

'GRANT ALL PRIVILEGES ON *.* TO 'aegir_root'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
manogolf’s picture

StatusFileSize
new35.95 KB

screen capture attached

Anonymous’s picture

Yep, so you won't be able to go backward to the 'Database server' step, which is where you needed to create a mysql superuser (commands were given in the 'How do I configure this' help link.

So you'll just need to press on with the install, and fix this up once it's finished and you're in the frontend. Presuming that it's the mysql superuser missing or having the wrong grants, that is.

manogolf’s picture

What tripped me up was while stepping through the screens and arrived at super user db section, read that if the aegir user has db privileges you probably won't need to do anything here, so I moved on.

I did create the aegir superuser with password during the script install and added GRANT permissions with your snippet above.

Thanks

manogolf’s picture

[success]

Thanks for listening, helping.

Jerry

Anonymous’s picture

Status: Active » Fixed

No probs!

manogolf’s picture

Status: Fixed » Active

Re-opened for new errors during setup.

I installed another instance of aegir and received the following during initialize the hosting system:

root@webserver:~# su -s /bin/bash aegir
aegir@webserver:/root$ cd /var/aegir/drupal-6.14
aegir@webserver:~/drupal-6.14$ /var/aegir/drush/drush.php --uri=http://xxxxxxxxxx.com hosting setup
/var/aegir/drush/drush.php: line 1: ?php: No such file or directory
/var/aegir/drush/drush.php: line 2: //: is a directory
/var/aegir/drush/drush.php: line 4: /bin: is a directory
/var/aegir/drush/drush.php: line 5: CHANGELOG.txt: command not found
/var/aegir/drush/drush.php: line 6: CHANGELOG.txt: command not found
/var/aegir/drush/drush.php: line 7: CHANGELOG.txt: command not found
/var/aegir/drush/drush.php: line 8: CHANGELOG.txt: command not found
/var/aegir/drush/drush.php: line 9: includes/: is a directory
/var/aegir/drush/drush.php: line 11: //: is a directory
/var/aegir/drush/drush.php: line 12: syntax error near unexpected token `)'
/var/aegir/drush/drush.php: line 12: `if (!drush_verify_cli()) {'

Two attempts with the same result. Any suggestions?

manogolf’s picture

I learned on IRC that drush updates cause the errors noted above and if instead it's run as

php /var/aegir/drush/drush.php --uri=http://xxxxxxxx.com hosting setup

the problem goes away. That's correct but a whole new set of issues result.

Reading http://drupal.org/node/613402 explains one of the current issues I'm having. After executing

php /var/aegir/drush/drush.php --uri=http://xxxxxxxx.com hosting setup

cron is rewritten as shown in that post.

If I replace with correct cron file /var/mail/aegir receives this every minute:

From aegir@webserver.xxxxxxxx.com  Fri Oct 30 13:07:01 2009
Return-Path: <aegir@webserver.xxxxxxxx.com>
X-Original-To: aegir
Delivered-To: aegir@webserver.xxxxxxxx.com
Received: by webserver.xxxxxxxx.com (Postfix, from userid 110)
        id 8044E2A2BD; Fri, 30 Oct 2009 20:07:01 +0000 (GMT)
From: root@webserver.xxxxxxxx.com (Cron Daemon)
To: aegir@webserver.xxxxxxxx.com
Subject: Cron <aegir@webserver> (php  '/var/aegir/drush/drush.php' hosting dispatch --root='/var/aegir/drupal-6.14' --uri=http://xxxxxx.com
Content-Type: text/plain; charset=UTF-8
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/var/aegir>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=aegir>
Message-Id: <20091030200701.8044E2A2BD@webserver.xxxxxxxx.com>
Date: Fri, 30 Oct 2009 20:07:01 +0000 (GMT)

Unable to automatically determine the path to the PHP interpreter.       [error]
Please supply the --php argument.
/var/aegir/drush/drush.php: 1: cannot open ?php: No such file
/var/aegir/drush/drush.php: 2: //: Permission denied
/var/aegir/drush/drush.php: 4: /bin: Permission denied
Unable to automatically determine the path to the PHP interpreter.       [error]
Please supply the --php argument.
/var/aegir/drush/drush.php: 5: CHANGELOG.txt: not found
/var/aegir/drush/drush.php: 6: CHANGELOG.txt: not found
/var/aegir/drush/drush.php: 7: CHANGELOG.txt: not found
/var/aegir/drush/drush.php: 8: CHANGELOG.txt: not found
/var/aegir/drush/drush.php: 9: includes/: Permission denied
/var/aegir/drush/drush.php: 11: //: Permission denied
/var/aegir/drush/drush.php: 12: Syntax error: Bad function name
/var/aegir/drush/drush.php: 1: cannot open ?php: No such file
/var/aegir/drush/drush.php: 2: //: Permission denied
/var/aegir/drush/drush.php: 4: /bin: Permission denied
/var/aegir/drush/drush.php: 5: CHANGELOG.txt: not found
/var/aegir/drush/drush.php: 6: CHANGELOG.txt: not found
/var/aegir/drush/drush.php: 7: CHANGELOG.txt: not found
/var/aegir/drush/drush.php: 8: CHANGELOG.txt: not found
/var/aegir/drush/drush.php: 9: includes/: Permission denied
/var/aegir/drush/drush.php: 11: //: Permission denied
/var/aegir/drush/drush.php: 12: Syntax error: Bad function name

I'm not sure just how many of these were in the mail after letting run all night but let's just say a lot of minutes passed.

Stopped the madness by putting > /dev/null back into cron line disabling cron but tasks won't run. Classic catch 22.

I sense you are aware of this and working on it. Is there anything suggested in the meantime aside from disabling cron or ignoring mail?

Also when creating a platform and following on page instruction prefixed with php results as follows:

aegir@webserver:~$ cd drupal-6.14
aegir@webserver:~/drupal-6.14$ php /var/aegir/drush/drush.php hosting setup
Could not find a Drupal settings.php file at                         [error]
./sites/default/settings.php.
The command 'drush.php hosting setup' could not be found.            [error]

as ./drush/drush.php dl drupal

aegir@webserver:~$ ./drush/drush.php dl drupal
./drush/drush.php: line 1: ?php: No such file or directory
./drush/drush.php: line 2: //: is a directory
./drush/drush.php: line 4: /bin: is a directory
./drush/drush.php: line 5: backups: command not found
./drush/drush.php: line 6: backups: command not found
./drush/drush.php: line 7: backups: command not found
./drush/drush.php: line 8: backups: command not found
./drush/drush.php: line 9: backups/: is a directory
./drush/drush.php: line 11: //: is a directory
./drush/drush.php: line 12: syntax error near unexpected token `)'
./drush/drush.php: line 12: `if (!drush_verify_cli()) {'

carlthuringer’s picture

I'm actually having the same issues as #13. Not sure what to do. Ubuntu 9.10 Netbook Remix.

Anonymous’s picture

Status: Active » Fixed

This issue:

aegir@webserver:~$ ./drush/drush.php dl drupal
./drush/drush.php: line 1: ?php: No such file or directory
./drush/drush.php: line 2: //: is a directory

is caused by changes in Drush 2.1. We committed a workaround in #615364: hosting fails on ubuntu with drush wrapper script or via cron, and there is also a patch submitted to Drush that fixes the issue and may soon be committed. You should apply the patch to drush contained in that issue (mentioned in our issue above in my last comment) until we release a new version of Aegir.

A quick fix is also to put SHELL=/bin/bash at the top of your aegir user's crontab and ensure the start of the crontab command itself is prefixed with 'php'

Also, this in #13:

aegir@webserver:~$ cd drupal-6.14
aegir@webserver:~/drupal-6.14$ php /var/aegir/drush/drush.php hosting setup
Could not find a Drupal settings.php file at                         [error]
./sites/default/settings.php.
The command 'drush.php hosting setup' could not be found.            [error]

Is clearly wrong, no --uri argument has been given as instructed.

I'm closing this as I feel the issues mentioned are resolvable with the instructions given.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

emackn’s picture

Status: Closed (fixed) » Active

I also ran into #7 with alfa3, I'm still looking into it. My aegir_root account is setup correctly, but I was surprised to find that calls to drush_get_option() for 'master_db_host', 'master_db_user' and 'master_db_passwd' were all blank, (/var/aegir/.drush/provision/db_server/provision.mysql.inc).

Is there another way to set those values?

Anonymous’s picture

Make sure they are set and correct in the Database Server's node in the frontend. Or check the hosting_db_server table directly in the aegir database.

Anonymous’s picture

Status: Active » Postponed (maintainer needs more info)
adrian’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

No response for this in several months.