When installing aegir I was given the option of installing Drupal or Hostmaster and I chose hostmaster and skipped Drupal. When going through the install I get to the point where I have to run the command below and get this error.

/home/aegir/drush/drush.php --uri=http://aegir.domain.net hosting setup
A Drupal installation directory could not be found [error]
The command 'drush.php hosting setup' could not be found. [error]

Is it necessary to run the Drupal installation as well, or even before, or can I simply use --root=/home/aegir/drupal-6.14?

Comments

voipfc’s picture

On further examination it appears that the wrapper script for executing drush is stripping of the leading / in the path to drush.

This is the command showing in the installation page.

cd /home/aegir/fcgi-bin
home/aegir/drush/drush.php --uri=http://aegir.domain.net hosting setup

php-cli is on my path so the cd /home/aegir/fcgi-bin isn't really necessary.

When I correct the command by prefixing the slash i.e /home/aegir/drush/drush.php --uri=http://aegir.domain.net hosting setup, the error report

php 'home/aegir/drush/drush.php' hosting dispatch --root='/home/aegir/drupal-6.14' --uri=http://aegir.domain.net Could not open input file: home/aegir/drush/drush.php
Dispatch command could not be run. Returned: 

Shows the slash stripped out. I can adjust my path and alias drush to see if it runs okay, but there is some bug in there.

Anonymous’s picture

Status: Active » Postponed (maintainer needs more info)

Per the instructions given, did you cd into your drupal root directory first before executing /home/aegir/drush/drush.php --uri=http://aegir.domain.net hosting setup ?

i.e if your drupal installation is /var/aegir/drupal-6.14, then :

cd /var/aegir/drupal-6.14
/home/aegir/drush/drush.php --uri=http://aegir.domain.net hosting setup
voipfc’s picture

Yes, I cd'd into it.

When you look at the error report, you will see the message is :php 'home/aegir/drush/drush.php'. The leading / to the home/aegir has been stripped out. What is noticeable is that the installation guide on the web page also has the leading slash also stripped out, as shown in my follow up.

I believe it is where the problem lies. The command may only work if executed from the computers root, ie '/' directory

voipfc’s picture

After taking the output error and moving the 'hosting dispatch' command to the end, the command run without errors. I don't know the details of what the am not quite sure what the home/aegir/drush/drush.php --uri=http://aegir.domain.net hosting setup.

How can I be sure that aegir is installed and working correctly?

Anonymous’s picture

I admit I'm confused, we're now talking about two separate commands. Your original one was the hosting setup command that sets about preparing the system for Aegir, one of its tasks being creating the crontab entry for the Aegir user.

/home/aegir/drush/drush.php --uri=http://aegir.domain.net hosting setup

If you ran this while your drupal root was the current working directory, then it should've worked.

In your last comment you mention the hosting dispatch command, which is the command that is in the Aegir user's crontab and is executed once per minute to kick off any tasks that have been created through the frontend. The crontab entry should look like this (your paths may differ, I don't know where you've installed your Drupal platform, I presume /var/aegir/drupal-6.14 here):

*/1 * * * * (php '/home/aegir/drush/drush.php' hosting dispatch --root='/var/aegir/drupal-6.14' --uri=http://aegir.domain.net)

The most confusing thing is originally you said that this is the command given to you in the Installation page:

cd /home/aegir/fcgi-bin
home/aegir/drush/drush.php --uri=http://aegir.domain.net hosting setup

What is this fcgi-bin? If Aegir told you to cd into that dir first before running hosting setup, then it believes your Drupal platform (i.e drupal-6.14) is this directory.

In any case, to answer your final question, to test that it's working ok: try and create a site :)
If it enters the task queue, and after a minute or so it kicks off, you know that the Aegir crontab is working successfully. Then you can set about seeing what it did, i.e whether it's created an apache vhost in the correct place, whether the Aegir user successfully restarted Apache, etc. Provided the tasks are kicked off by the crontab, most of this information will be in the task's output log in the frontend, and any errors will be noticeable.

Anonymous’s picture

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

Closing old issues