[BioRuby] command not found: blastall and broken pipe from apache2 and passenger (mod_rails)
Matt Scilipoti
mattscilipoti at possiamo.com
Thu Jun 26 16:10:45 UTC 2008
Thank you for this additional help.In the short term, I chose to use a
constant in the environment files as well. We have developers on different
platforms, so this is still problematic.
I tried updating the PATH in /etc/profile and restarting apache, but it
still couldn't find blastall. This is a client's hosted machine. This
process has alerted me to the fact that both apache and passenger are
running as root. I will research if this is standard on SUSE, or just my
client, and correct accordingly. This also answers why passenger still
couldn't find blastall after I updated /etc/profile and restarted apache.
Root probably wasn't updated. I don't have the root password, so I can't
`source /etc/profile` as root.
Just to make sure my assumptions are right. If apache and passenger are
running under the 'www' user, once I make a change to /etc/profile, will
they get this change when I restart apache? Or is another action needed?
Thanks again,
matt
On Wed, Jun 25, 2008 at 3:59 PM, Adam Kraut <adamnkraut at gmail.com> wrote:
> One way to test the 'www' user's environment would be to switch to that
> user with 'su www' or 'sudo www'. That way you can check if blastall is
> actually in $PATH. Regarding the per-server configuration, do you use
> multiple production servers or do you mean the full path will be different
> between development and production? For the latter, you can set variables
> in development.rb and production.rb. Something like BLAST_PATH =
> '/path/to/blastall' can be set per environment and in your application set
> (factory.blastall = BLAST_PATH). That's the way I do it but there may be
> better solutions out there. Also, if you reply through the bioruby list
> more people can follow the discussion and offer advice.
> Best,
> Adam
>
> On Jun 25, 2008, at 3:41 PM, Matt Scilipoti wrote:
>
> Thank you. I tried adding the path to /etc/profile.local (recommended in
> SUSE), but I was unsure how to ensure that 'www' was using the new profile.
> I tried restarting apache, but the error still occurs. Is a server
> restart necessary? This is difficult, but possible.
>
> The problem is solved by assigning the full path for blastall
> (factory.blastall='/usr/local/bin/blastall'). But this solution requires
> me to provide some configuration for each server, so a path solution would
> be best.
>
> Thanks again,
> Matt
>
> On Wed, Jun 25, 2008 at 2:30 PM, Adam Kraut <adamnkraut at gmail.com> wrote:
>
>> It's possible that 'blastall' is not in the path of the user running the
>> apache process. On my system Apache runs as user 'www', so to run blastall
>> from a rails app I would edit the system-wide profile in /etc/profile. You
>> might also want to check how to set the user for Passenger as it may be
>> different from Apache. Using the full path (/usr/local/bin/blastall) should
>> also work for any user but I'm not sure if the bioruby wrapper lets you do
>> this.
>>
>> Cheers,
>> Adam
>>
>> On Wed, Jun 25, 2008 at 1:53 PM, Matt Scilipoti <
>> mattscilipoti at possiamo.com> wrote:
>>
>>> I am attempting to use bioruby (blast) with a rails application. It
>>> works on my dev machine (OSX), but not the Production Server (suse
>>> sles). When I attempt to perform a blast query on the Production
>>> server I receive "Errno::EPIPE (Broken pipe)" and "command not found:
>>> blastall". The permissions and path look correct to me. Is it
>>> possible that there is an apache permission issue? This occurred
>>> intermittently when I was using a mongrel_cluster (usually fixed when
>>> I restarted the cluster manually thru ssh. If I used capistrano to
>>> restart the cluster, it would not fix it.
>>>
>>> Production server config:
>>> Apache2
>>> passenger 2.0.1 (mod_rails)
>>>
>>> > which blastall
>>> /usr/local/bin/blastall
>>>
>>> > ls -lsa /usr/local/bin/blastall
>>> 0 lrwxrwxrwx 1 root root 40 2008-06-25 13:31 /usr/local/bin/blastall
>>> -> /usr/local/lib/blast-2.2.16/bin/blastall
>>>
>>> > ls -lsa /usr/local/lib/blast-2.2.16/bin/blastall
>>> 4388 -rwxr-xr-x 1 mpr mpr 4488387 2007-03-25 10:28
>>> /usr/local/lib/blast-2.2.16/bin/blastall
>>>
>>> > echo $PATH
>>>
>>> /usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin
>>>
>>> Errors:
>>> production.log:
>>> Errno::EPIPE (Broken pipe):
>>> /usr/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/command.rb:163:in
>>> `write'
>>> /usr/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/command.rb:163:in
>>> `print'
>>> /usr/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/command.rb:163:in
>>> `query_command_popen'
>>> /usr/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/command.rb:161:in
>>> `popen'
>>> /usr/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/command.rb:161:in
>>> `query_command_popen'
>>> /usr/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/command.rb:148:in
>>> `query_command'
>>> /usr/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/appl/blast.rb:245:in
>>> `exec_local'
>>> /usr/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/appl/blast.rb:212:in
>>> `send'
>>> /usr/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/appl/blast.rb:212:in
>>> `query'
>>> /app/models/blast_query.rb:83:in `query'
>>>
>>>
>>> The apache error.log indicates:
>>> /usr/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/appl/blast.rb:186:
>>> command not found: blastall -p blastp -d STYSiteAbstract -p blastp -m
>>> 7 -e 0.001 -F F -M Blosum62Phosbz -v 100 -b 100 -g F -T F -I T -U F -W
>>> 3
>>>
>>> Thank you,
>>> Matt
>>> --
>>> Matt Scilipoti | Possiamo Consulting LLC | 443-538-8656 | Coaching,
>>> Training & Development
>>> _______________________________________________
>>> BioRuby mailing list
>>> BioRuby at lists.open-bio.org
>>> http://lists.open-bio.org/mailman/listinfo/bioruby<https://lists.open-bio.org/mailman/listinfo/bioruby>
>>>
>>
>>
>
>
> --
> Matt Scilipoti | Possiamo Consulting LLC | 443-538-8656 | Coaching,
> Training & Development
>
>
>
--
Matt Scilipoti | Possiamo Consulting LLC | 443-538-8656 | Coaching, Training
& Development
More information about the BioRuby
mailing list