Return-Path: X-Original-To: apmail-storm-user-archive@minotaur.apache.org Delivered-To: apmail-storm-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B76FD11770 for ; Sat, 5 Jul 2014 20:14:24 +0000 (UTC) Received: (qmail 85707 invoked by uid 500); 5 Jul 2014 20:14:23 -0000 Delivered-To: apmail-storm-user-archive@storm.apache.org Received: (qmail 85669 invoked by uid 500); 5 Jul 2014 20:14:23 -0000 Mailing-List: contact user-help@storm.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@storm.incubator.apache.org Delivered-To: mailing list user@storm.incubator.apache.org Received: (qmail 85659 invoked by uid 99); 5 Jul 2014 20:14:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Jul 2014 20:14:23 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of merritt.alex@gmail.com designates 74.125.82.172 as permitted sender) Received: from [74.125.82.172] (HELO mail-we0-f172.google.com) (74.125.82.172) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Jul 2014 20:14:18 +0000 Received: by mail-we0-f172.google.com with SMTP id u57so2739132wes.3 for ; Sat, 05 Jul 2014 13:13:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=5/X9OabY027hmTZVFIWtalt9jgJwOJjZLgvwFIzVcEk=; b=y6JRYGREuIvrj6fOlgt7F7LFPT0vj2na9Fl2iuinrSKl+h7JmUGBOZw0+5fb378bzN yrYShYUZmtYewZn1irjBJDVMzS2qWf1TAQRy5vQWC9AdBjcHltLgk+gIBNKWpN4T1rTc UpJrD9tMKzbKQHEgUVghW5UQVeLpMLll+5sJeYHnNXNoBIzkeBVQDp3N8lUtdwq+JNrd DII5i0XffqPZZ5HANceG4n9BzkTu4ge3TB0DChhsOHP7m9LUMBR1gQDQaflmJOFgFtzc VGFkxXaqxTxKx0YGXQXfvUuKXxmvwLVm/4DBBh7gDvXGvVe2EHv31G9uy8QW1GdwENjV lQpQ== X-Received: by 10.180.212.9 with SMTP id ng9mr29252259wic.46.1404591237242; Sat, 05 Jul 2014 13:13:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.217.61.194 with HTTP; Sat, 5 Jul 2014 13:13:37 -0700 (PDT) In-Reply-To: References: From: Alex Merritt Date: Sat, 5 Jul 2014 13:13:37 -0700 Message-ID: Subject: Re: ShellSpout Cannot Execute Arbitrary Command To: user Content-Type: multipart/alternative; boundary=001a11c34f5ec0296004fd77e169 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c34f5ec0296004fd77e169 Content-Type: text/plain; charset=UTF-8 I seemed to have missed this page https://storm.incubator.apache.org/documentation/Multilang-protocol.html -Alex On Fri, Jul 4, 2014 at 4:53 PM, Alex Merritt wrote: > In ShellProcess.java, method launch, this line seems to cause the > IOException: > > builder.directory(new File(context.getCodeDir())); > > The path it is attempting to use is > "/tmp/c86c165a-762b-42aa-8238-ea291f14c577/supervisor/stormdist/stitcher-1-1404517781/resources" > (my topology name is 'stitcher') and does NOT exist. It is not true that > ShellProcess is unable to find the command as I originally suspected. > > Investigating further, it seems that when I package my class files into a > jar for submission to storm, I must include a 'resources' directory; this > seems to remove the IOException thrown. > > I have not found any documentation stating this must be done. I am not > using maven in my workflow; I am manually compiling the class files and > packaging them into a jar file. Perhaps that is the reason? > > -Alex > > > On Thu, Jul 3, 2014 at 2:02 PM, Alex Merritt > wrote: > >> Hello, >> >> I'm creating a simple topology and invoke the superclass constructor for >> ShellSpout in its constructor by passing in an array of String, such as >> {"/bin/ls"}. When executing the topology locally, the code returns an >> IOException stating it cannot find the command. I've tried relative, >> absolute paths, other commands, etc. I wrote a stand-alone code which uses >> ProcessBuilder outside of Storm and it works as expected. Any ideas what is >> going on here? >> >> Using Ubuntu Linux 64-bit, Storm 0.9.2 and java version 7 from Oracle. >> >> Thanks, >> Alex >> > > --001a11c34f5ec0296004fd77e169 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Fri, Jul 4, 2014 at 4:53 PM, Alex Merritt <merritt.alex@gmail.com> wrote:
In ShellProcess.java, metho= d launch, this line seems to cause the IOException:

builder.directory(new File(context.getCodeDir()));

Th= e path it is attempting to use is "/tmp/c86c165a-762b-42aa-8238-ea291f= 14c577/supervisor/stormdist/stitcher-1-1404517781/resources" (my topol= ogy name is 'stitcher') and does NOT exist. It is not true that She= llProcess is unable to find the command as I originally suspected.

Investigating further, it seems that when I package my class files into = a jar for submission to storm, I must include a 'resources' directo= ry; this seems to remove the IOException thrown.

I have not found any documentation stating this must be done. I am not usin= g maven in my workflow; I am manually compiling the class files and packagi= ng them into a jar file. Perhaps that is the reason?

-Alex



On Thu, Jul 3, 2014 at= 2:02 PM, Alex Merritt <merritt.alex@gmail.com> wrote:<= br>
Hello,

I= 'm creating a simple topology and invoke the superclass constructor for= ShellSpout in its constructor by passing in an array of String, such as {&= quot;/bin/ls"}. When executing the topology locally, the code returns = an IOException stating it cannot find the command. I've tried relative,= absolute paths, other commands, etc. I wrote a stand-alone code which uses= ProcessBuilder outside of Storm and it works as expected. Any ideas what i= s going on here?

Using Ubuntu Linux 64-bit, Storm 0.9.2 and java version= 7 from Oracle.

Thanks,
Alex


--001a11c34f5ec0296004fd77e169--