I got my drush aliases file (aec.aliases.drushrc.php) set up properly from what i understand, drush @aec.local status returns the expected results, but when i do 'drush @aec.live status' i get

The command could not be executed successfully (returned: jailshell: [error] drush: command not found

I can ssh in to these sites from terminal, the connection works, but i get this first and can continue normally...

-jailshell: /sbin/consoletype: No such file or directory

'drush status' from within the dev folder, the live site, etc. work fine...what could I be missing? This is my first time working with a VM (thanks, btw!! this was so much easier than trying to get drush installed on windows and using cygwin), and there may be something simple i'm overlooking. Sought community help at a camp and in IRC and nothing...thanks in advance!

Comments

bhosmer’s picture

When you SSH into your server, are you able to run drush status from the shell?

Edit:

I suspect that this may an issue with your host not having drush installed?

scotwith1t’s picture

yes, drush status once connected to the server works fine. i use drush in putty/winscp all the time in the windows environment with no issues...was really just hoping to make use of drush aliases (thanks ultimike for the DrupalCampAtlanta session!!) for rapid development (especially if i can start learning to make use of features).

anyway, "yes" is the short answer. :)

bhosmer’s picture

What version is your host using?

scotwith1t’s picture

oh geez...if that's all it is...it's 3.3 on the remote. i'll check localhost later on and report back...i bet you're right. :(

scotwith1t’s picture

versions are matching and still no luck...maybe i just don't know what the hell i'm doing...totally possible. here's how i've got the aliases file set up now. i've tried some variations, but i'm out of ideas...

$aliases['local'] = array(
  'uri' => 'aec7.dev',
  'root' => '/home/quickstart/websites/aec7.dev/',
  'path-aliases' => array(
    '%dump-dir' => '/home/quickstart/websites/aec7.dev/sites/default/files/backup/',
    '%files' => '/home/quickstart/websites/aec7.dev/sites/default/files/',
   ),
);
  
$aliases['dev'] = array(
  'uri' => 'dev.aeconline.org',
  'root' => '/home/alabamar/public_html/dev/',
  'remote-host' => 'dev.aeconline.org',
  'remote-user' => 'alabamar',
  'ssh-options' => '-o PasswordAuthentication=yes',
  'path-aliases' => array(
    '%dump-dir' => '/home/alabamar/public_html/dev/sites/default/files/backups/',
    '%files' => '/home/alabamar/public_html/dev/sites/default/files/',
  ),
);

$aliases['live'] = array(
  'uri' => 'aeconline.org',
  'root' => '/home/alabamar/public_html/aeconline/',
  'remote-host' => 'aeconline.org',
  'remote-user' => 'alabamar',
  'ssh-options' => '-o PasswordAuthentication=yes',
  'path-aliases' => array(
    '%dump-dir' => '/home/alabamar/public_html/aeconline/sites/default/files/backups/',
    '%files' => '/home/alabamar/public_html/aeconline/sites/default/files/',
  ),
);
cvining’s picture

Did this ever get resolved? I've the same problem with a shared host I'm using. It's not a Drush issue, but there could be a drush fix, I think.

Here's what's happening (in my case anyway). When logging in, the shared host runs things like /etc/profile, ~/.bash_profile and ~/.bashrc. The first one calls a bunch of scripts, including
/sbin/consoletype
which no longer exists on my host. I suppose it did in some previous version of the OS, and the system /etc/profile just didn't get properly updated. Doesn't seem to harm anything except, as phrancescot says, that annoying little file missing error when you start an SSH session.

But drush hits that error message and crashes. The proper fix is to fix the host, but it seems possible to me that drush could be set to ignore any such session startup messages.

Any, that's what I think's happening. I've contacted my host to see if they'll fix this for me.

-- Cronin

leandro713’s picture

i had drush 4.5 both in local as in Hostgator. both were working with this config in my .bashrc in Hostgator:

Export COLUMNS
alias drush='/usr/bin/php ~/public_html/drush/drush.php'
alias php='/usr/bin/php'

afterwards, i updated in local to drush 5.0 and i got always this error in Hostgator

jailshell: drush: command not found

so, in order to work i finally added this code to my .bashrc in Hostgator and it worked again!

PATH=$PATH:$HOME/bin:/home/leandro/public_html/drush
export PATH

I had to comment out the «Export COLUMNS» aswell.
Hope this helps somebody :)

Antonio01’s picture

That's help a lot !! thank you i had the same problem. Could you explain why doing that it working ?

jumoke’s picture

Leandro, your solution helped me as well. Thank you :)

MichaelCole’s picture

Status: Active » Closed (fixed)

Thanks Leandro for the issue help!

g35nightrider’s picture

Leonardo,
I followed your instructions, but I'm getting another error...any clues?

Warning: fwrite(): supplied argument is not a valid stream resource in /home3/papanic/public_html/drush/includes/output.inc on line 35

bhosmer’s picture

This doesn't appear to be a quickstart related issue, but more of a hosting issue with drush.

I don't know anything about your hosting company, but I did find this: https://drupal.org/node/1064690

demandajmenso’s picture

This is how i managed to get the job done with hostgator and drush folder inside home folder not site's root

this is my .bashrc additions
----------
# User specific aliases and functions

export DRUSH_PHP=/opt/php53/bin/php
alias drush='/opt/php53/bin/php ~/drush/drush.php'
alias php='/opt/php53/bin/php'

PATH=$PATH:/home/{username}/drush
export PATH
-----------

replace {username} with your username

guillaumeduveau’s picture

Issue summary: View changes

@demandajmenso : thanks, just what I needed :)