I've been trying for a bit to get aegir working on my netbook using Ubuntu 9.10 Karmic Koala netbook remix.

I have previously gotten an earlier version partly working, but am now trying to install once more as that version wasn't working.

I have repeatedly run into the issue of the script not properly calling php for the drush.php script. Here's where I'm currently stuck.

aegir@carl-dannegar:~/hostmaster$ sh install.sh.txt
==> Aegir automated install script
==> This script makes the following assumptions: 
 * you have read INSTALL.txt and prepared the platform accordingly
 * you are running as your "aegir" user
 * the following settings are correct:
AEGIR_DOMAIN=aegir.example.com
AEGIR_VERSION=HEAD
AEGIR_HOME=/var/aegir
WEB_GROUP=www-data
HOSTMASTER_DIR=/var/aegir/hostmaster-HEAD
DRUSH=/var/aegir/drush/drush.php
DRUSH_VERSION=All-Versions-2.1

Some of those settings can be changed on the commandline, see:

 install.sh.txt -h

for more information.
Do you want to proceed with the install? [Y/n] Y
==> Creating basic directory structure
/usr/bin/drush
==> Drush is in the path, good
==> Drush seems to be functionning properly
==> Drush make already seems to be installed
==> Provision already seems to be installed
==> Deploying hostmaster application
The command could not be executed successfully (returned: /var/aegir/drush/drush.php: 1: cannot open ?php: No such[error]
file
/var/aegir/drush/drush.php: 2: //: Permission denied
/var/aegir/drush/drush.php: 4: /bin: Permission denied
/var/aegir/drush/drush.php: 5: HINTS_CentOS.txt: not found
/var/aegir/drush/drush.php: 6: HINTS_CentOS.txt: not found
/var/aegir/drush/drush.php: 7: HINTS_CentOS.txt: not found
/var/aegir/drush/drush.php: 8: HINTS_CentOS.txt: not found
/var/aegir/drush/drush.php: 9: */: not found
/var/aegir/drush/drush.php: 11: //: Permission denied
/var/aegir/drush/drush.php: 12: Syntax error: Bad function name
, code: 2)
An error occurred at function : drush_provision_hostmaster_make                                                   [error]

I've been searching for about a week for a solution and find some similar issues but nothing exactly matching my problem. Not even anything close enough.

Comments

Anonymous’s picture

Status: Active » Fixed

This issue is specific to Ubuntu's default use of Dash shell for /bin/sh, causing an issue that makes the drush.php unable to be executed.

Please make one of the following actions:

1) use Drush HEAD which has fixed the issue, or
2) apply the patch to Drush from #637574: drush finds the wrong php executable when executing under dash which fixed it, or
3) Don't touch Drush at all and modify the install.sh's shebang from #!/bin/sh to #!/bin/bash and execute it like bash install.sh.txt instead of sh

3) might be the quickest and will fix your issue. Thanks and please re-open this ticket if none of the options above fix your problem.

Anonymous’s picture

I also note that your install.sh has these variables:

AEGIR_DOMAIN=aegir.example.com
AEGIR_VERSION=HEAD

I recommend you at least change AEGIR_DOMAIN to the real domain you'll be using to access Aegir. And you may not want HEAD but the 6.x-0.4-alpha3 release. If you want to use HEAD, I recommend you follow the new instructions on our git server here and the corresponding install.sh , as we are no longer committing changes to CVS on drupal.org.

carlthuringer’s picture

It worked! Full console dump below.

I next tried using the latest version from Git.

It was also successful!

Based on http://www.serverwatch.com/news/article.php/3727941/The-Hybridization-of... and the preponderance of Ubuntu as a PC, development and server platform (23% of servers according to the above link) wouldn't it be good to include, maybe even as a separate tips file, some known issues like this?

Thanks for your prompt response! I hope this will help others in a similar situation to mine.

aegir@carl-dannegar:~$ ls
backups  config  drush	hostmaster  hostmaster-6.x-0.4-alpha3.tar.gz
aegir@carl-dannegar:~$ rm -R *
aegir@carl-dannegar:~$ wget http://ftp.drupal.org/files/projects/hostmaster-6.x-0.4-alpha3.tar.gz
--2009-11-30 07:36:03--  http://ftp.drupal.org/files/projects/hostmaster-6.x-0.4-alpha3.tar.gz
Resolving ftp.drupal.org... 64.50.236.52
Connecting to ftp.drupal.org|64.50.236.52|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 23311 (23K) [application/x-gzip]
Saving to: `hostmaster-6.x-0.4-alpha3.tar.gz'

100%[===================================================================================>] 23,311      25.7K/s   in 0.9s    

2009-11-30 07:36:05 (25.7 KB/s) - `hostmaster-6.x-0.4-alpha3.tar.gz' saved [23311/23311]

aegir@carl-dannegar:~$ tar zxvmf hostmaster-6.x-0.4-alpha3.tar.gz 
hostmaster/
hostmaster/LICENSE.txt
hostmaster/HINTS_CentOS.txt
hostmaster/INSTALL.txt
hostmaster/README.txt
hostmaster/UPGRADE.txt
hostmaster/apache2.conf.txt
hostmaster/hostmaster.forms.inc
hostmaster/hostmaster.make
hostmaster/hostmaster.profile
hostmaster/install.sh.txt
hostmaster/reset.txt
aegir@carl-dannegar:~$ cd hostmaster
aegir@carl-dannegar:~/hostmaster$ ls
apache2.conf.txt  hostmaster.forms.inc	hostmaster.profile  INSTALL.txt  README.txt  UPGRADE.txt
HINTS_CentOS.txt  hostmaster.make	install.sh.txt	    LICENSE.txt  reset.txt
aegir@carl-dannegar:~/hostmaster$ nano install.sh.txt
/* edited the first line to read `#! /bin/bash` */
aegir@carl-dannegar:~/hostmaster$ bash install.sh.txt
==> Aegir automated install script
==> This script makes the following assumptions: 
 * you have read INSTALL.txt and prepared the platform accordingly
 * you are running as your "aegir" user
 * the following settings are correct:
AEGIR_DOMAIN=aegir.example.com
AEGIR_VERSION=HEAD
AEGIR_HOME=/var/aegir
WEB_GROUP=www-data
HOSTMASTER_DIR=/var/aegir/hostmaster-HEAD
DRUSH=/var/aegir/drush/drush.php
DRUSH_VERSION=All-Versions-2.1

Some of those settings can be changed on the commandline, see:

 install.sh.txt -h

for more information.
Do you want to proceed with the install? [Y/n] Y
==> Creating basic directory structure
==> Installing drush in /var/aegir
--2009-11-30 07:36:36--  http://ftp.drupal.org/files/projects/drush-All-Versions-2.1.tar.gz
Resolving ftp.drupal.org... 64.50.236.52
Connecting to ftp.drupal.org|64.50.236.52|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 80209 (78K) [application/x-gzip]
Saving to: `drush-All-Versions-2.1.tar.gz'

100%[===================================================================================>] 80,209      33.5K/s   in 2.3s    

2009-11-30 07:36:40 (33.5 KB/s) - `drush-All-Versions-2.1.tar.gz' saved [80209/80209]

==> Drush seems to be functionning properly
==> Drush make already seems to be installed
==> Provision already seems to be installed
==> Deploying hostmaster application
Project information for drupal retrieved.                            [ok]
drupal downloaded from                                               [ok]
http://ftp.drupal.org/files/projects/drupal-6.14.tar.gz.
hostmaster export from contributions/profiles/hostmaster.            [ok]
Project information for admin_menu retrieved.                        [ok]
Project information for install_profile_api retrieved.               [ok]
hosting export from contributions/profiles/hosting.                  [ok]
eldir export from contributions/themes/eldir.                        [ok]
admin_menu downloaded from                                           [ok]
http://ftp.drupal.org/files/projects/admin_menu-6.x-1.5.tar.gz.
install_profile_api downloaded from                                  [ok]
http://ftp.drupal.org/files/projects/install_profile_api-6.x-2.1.tar.gz.
==> Installed apache configuration file for aegir.example.com, you will need to restart apache
==> Install process complete: follow the wizard
Now point your browser to http://aegir.example.com/install.php and proceed
with the remainder of the installation using the Hostmaster Install profile.
Some of the instructions given, you will already have completed, but carefully
read each step in turn to ensure you don't miss anything.
jlab’s picture

I was getting the same error:

So I modified my install.sh to look like this:

########################################################################
# basic variables, change before release
AEGIR_DOMAIN=aegir.mydomain.co.za 
AEGIR_VERSION=6.x-0.4-alpha3
AEGIR_HOME=$HOME
WEB_GROUP=www-data
DRUSH="$AEGIR_HOME/drush/drush.php"
DRUSH_VERSION=All-Versions-HEAD
# when adding a variable here, add it to the display below

# no configurable settings below this line
HOSTMASTER_DIR=$AEGIR_HOME/hostmaster-$AEGIR_VERSION

I run the script using "bash install.sh" But now I get the following errors:

==> Drush seems to be functionning properly
==> Installing drush make in /var/aegir/.drush
Project drush_make (6.x-2.0-beta3) downloaded to /var/aegir/.drush/. [success]
==> Installing provision backend in /var/aegir/.drush
Project provision (6.x-0.4-alpha3) downloaded to /var/aegir/.drush/. [success]
==> Deploying hostmaster application
Project information for drupal retrieved.                            [ok]
drupal downloaded from                                               [ok]
http://ftp.drupal.org/files/projects/drupal-6.14.tar.gz.
Unable to export hostmaster from                                     [error]
pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib
contributions/profiles/hostmaster.
An error occurred at function : drush_drush_make_make                [error]
An error occurred at function : drush_provision_hostmaster_make      [error]

What am I doing wrong? Because I was thinking of just installing Aegir version 3.0 and get it over with... But I'm afraid that I will have a much more difficult time to upgrade to a stable 0.4 at a later stage...

jlab’s picture

I used the instructions above from #3 but I still get errors:

==> Deploying hostmaster application
Project information for drupal retrieved.                            [ok]
drupal downloaded from                                               [ok]
http://ftp.drupal.org/files/projects/drupal-6.14.tar.gz.
Unable to export hostmaster from                                     [error]
pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib
contributions/profiles/hostmaster.
An error occurred at function : drush_drush_make_make                [error]
An error occurred at function : drush_provision_hostmaster_make      [error]

It seems that things are going a bit further maybe I'm just missing something trivial here...

Anonymous’s picture

Unable to export hostmaster from                                     [error]
pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib
contributions/profiles/hostmaster.

I am not sure what this is, but it seems almost like a CVS error. Do you have the CVS program installed? Otherwise it might be a network error?

manogolf’s picture

The same occurred during my attempted install.

aegir@webserver:/root$ bash install.sh.txt
==> Aegir automated install script
==> This script makes the following assumptions:
 * you have read INSTALL.txt and prepared the platform accordingly
 * you are running as your "aegir" user
 * the following settings are correct:
AEGIR_DOMAIN=insertedmydomainname.com
AEGIR_VERSION=6.x-0.4-alpha3
AEGIR_HOME=/var/aegir
WEB_GROUP=www-data
HOSTMASTER_DIR=/var/aegir/hostmaster-6.x-0.4-alpha3
DRUSH=/var/aegir/drush/drush.php
DRUSH_VERSION=All-Versions-2.1

Some of those settings can be changed on the commandline, see:

 install.sh.txt -h

for more information.
Do you want to proceed with the install? [Y/n] Y
==> Creating basic directory structure
==> Installing drush in /var/aegir
--23:07:57--  http://ftp.drupal.org/files/projects/drush-All-Versions-2.1.tar.gz
           => `drush-All-Versions-2.1.tar.gz'
Resolving ftp.drupal.org... 140.211.166.134, 140.211.166.142
Connecting to ftp.drupal.org|140.211.166.134|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 80,209 (78K) [application/x-gzip]

100%[=================================>] 80,209       183.24K/s

23:07:58 (182.52 KB/s) - `drush-All-Versions-2.1.tar.gz' saved [80209/80209]

==> Drush seems to be functionning properly
==> Installing drush make in /var/aegir/.drush
Project drush_make (6.x-2.0-beta3) downloaded to /var/aegir/.drush/. [success]
==> Installing provision backend in /var/aegir/.drush
Project provision (6.x-0.4-alpha3) downloaded to /var/aegir/.drush/. [success]
==> Deploying hostmaster application
Project information for drupal retrieved.                            [ok]
drupal downloaded from                                               [ok]
http://ftp.drupal.org/files/projects/drupal-6.14.tar.gz.
Unable to export hostmaster from                                     [error]
pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib
contributions/profiles/hostmaster.
An error occurred at function : drush_drush_make_make                [error]
An error occurred at function : drush_provision_hostmaster_make      [error]

Since Ubuntu failed I'm off to give Debian a shot.

manogolf’s picture

Status: Fixed » Active

The same errors occurred during a Debian install but were not included this time. See any of the other examples above.

After the step echo "Include /var/aegir/config/vhost.d/" > /etc/apache2/conf.d/aegir in the install text there is no instruction to restart Apache so I didn't. After the script install errors I restarted Apache and noticed what is at the bottom of the following.

webserver:~# su -s /bin/bash aegir
aegir@webserver:/root$ bash install.sh.txt
==> Aegir automated install script
==> This script makes the following assumptions:
 * you have read INSTALL.txt and prepared the platform accordingly
 * you are running as your "aegir" user
 * the following settings are correct:
AEGIR_DOMAIN=aegir.example.com
AEGIR_VERSION=6.x-0.4-alpha3
AEGIR_HOME=/var/aegir
WEB_GROUP=www-data
HOSTMASTER_DIR=/var/aegir/hostmaster-6.x-0.4-alpha3
DRUSH=/var/aegir/drush/drush.php
DRUSH_VERSION=All-Versions-2.1

Some of those settings can be changed on the commandline, see:

 install.sh.txt -h

for more information.
Do you want to proceed with the install? [Y/n] y
==> Creating basic directory structure
==> Drush found in /var/aegir/drush/drush.php, good
==> Drush seems to be functionning properly
==> Drush make already seems to be installed
==> Provision already seems to be installed
sed: can't read /var/aegir/hostmaster-6.x-0.4-alpha3/profiles/hostmaster/apache2.conf.txt: No such file or directory
Anonymous’s picture

There are different issues going on here that have nothing to do with the Dash/Drush2.1 issue that this ticket was made for.

sed not finding the template apache text file is only a symptom of drush_make failing to build the frontend entirely. So you need to work out why /var/aegir/hostmaster-6.x-0.4-alpha3/ or /var/aegir/hostmaster-6.x-0.4-alpha3/profiles/hostmaster isn't there. Usually it means the build failed for a reason like:

a) unzip isn't installed, so jquery.ui library failed to extract, breaking the build, or
b) CVS isn't installed ,couldn't cvs co some stuff, or
c) network issue, it couldn't retrieve the components from Drupal's CVS or other locations (jquery.ui from googlecode)
d) maybe permissions problems.

You can add a '--debug' to the end of the $DRUSH hostmaster make $HOSTMASTER_DIR in the install.sh script to get more output on what Drush is doing, to discover where it's going wrong.

But this is really not related to the original problem this ticket is regarding.

After the step echo "Include /var/aegir/config/vhost.d/" > /etc/apache2/conf.d/aegir in the install text there is no instruction to restart Apache so I didn't.

If the install completes, there is indeed the instruction 'You will need to restart apache' output by the install.sh script, I promise.

	if ! [ -e $AEGIR_HOME/config/vhost.d/$AEGIR_DOMAIN ]; then
	sed -e "s#DocumentRoot .*#DocumentRoot $HOSTMASTER_DIR#" -e "s#Directory .*#Directory $HOSTMASTER_DIR>#" -e "s/ServerName .*/ServerName $AEGIR_DOMAIN/" $HOSTMASTER_DIR/profiles/hostmaster/apache2.conf.txt > $AEGIR_HOME/config/vhost.d/$AEGIR_DOMAIN
	msg "Installed apache configuration file for $AEGIR_DOMAIN, you will need to restart apache"
	fi 
manogolf’s picture

Sorry I missed the change shebang instruction. Worked fine once I followed ALL instruction given.

However I got a 404 error when browsing to mydomain.com/install.php

Sheesh.

manogolf’s picture

Status: Active » Fixed
Anonymous’s picture

The 404 may be not restarting Apache, or look at the vhost config written to /var/aegir/config/vhost.d/ and make sure the ServerName and Directory and DocumentRoot stuff is ok. It only writes in to this file, the information you provide in the variables in the install.sh script. I notice you had 'aegir.example.com' as the $AEGIR_DOMAIN in your last paste, so it could be something like that.

I can't reproduce any 404 following the install.txt / install script on Debian, to the letter.

manogolf’s picture

/var/aegir/config/vhost.d was empty so I added


ServerName mydomainname.com
DocumentRoot /var/aegir/hostmaster-6.x-0.4-alpha3

Does this look correct?

I also changed 'aegir.exaple.com' to 'mydomainname.com'

Anonymous’s picture

That looks a bit bare. And the install.sh is meant to copy that apache2.conf.txt template from the hostmaster profile and use sed to replace the variables, perhaps that failed for you again orw as a remnant from before.

I would recommend you copy the apache2.txt from the hostmaster profile, name it mydomainname.com, and adjust those two parameters above (they look correct) as well as the contents of the < Directory > tags. Then restart Apache.

manogolf’s picture

Yeah something went wrong for sure. There is no mydomain.com folder and subfolders in the /sites folder. I also do not seem to find the apache2.txt file anywhere.

I do see empty files mydomain.com and aegir.example.com in /var/aegir/config/vhost.d.

Anonymous’s picture

I would blow it all away (i.e, /var/aegir, the user, the database) and start again. Your system sounds like it's missing too much. Probably missing the actual frontend if you can't find the vhost template, which means you won't get very far.. sounds like your build didn't actually work as well as you'd hoped.

If you're still not getting anywhere, ping me on IRC, maybe i can look at your machine over SSH or something if it's publically accessible.

jlab’s picture

I am not sure what this is, but it seems almost like a CVS error. Do you have the CVS program installed? Otherwise it might be a network error?

I checked and I have cvs installed I also checked that I have unzip installed as well...

I can checkout the the following files from cvs as the aegir user using the command:

cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout contributions/profiles/hostmaster

What I can't really comprehend is that there is no reference to the above code in the install script or the hostmaster.make file

I also tested the following command as the aegir user:

wget http://jquery-ui.googlecode.com/files/jquery.ui-1.6.zip

And it downloaded the file successfully... So I'm kind of ruling out the network errors...

The installation seems to break when Deploying hostmaster application... at the stage where it has to checkout a installation profile for hostmaster... But I'm not sure where this gets executed...

Maybe I should I test installation on another Linux Distro other than "Karmic Koala".

jlab’s picture

Ok it seems this problem is related to Ubuntu 9.10 Server (Karmic Koala)

I re did all the steps on a Ubuntu 9.04 Server (Jaunty Jackalope) on a virtual machine... And I have a functioning Aegir 0.4 Alpha 3 installation.

I'm still a bit confused as to why it doesn't work on Karmic Koala...

qbnflaco’s picture

I'm having the same issue with Ubuntu 8.04.2 LTS

qbnflaco’s picture

I gave up and just installed Jaunty and it seems to be working right.

Status: Fixed » Closed (fixed)

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