You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by adiya n <na...@yahoo.com> on 2014/06/05 17:46:43 UTC

Multilang shell bolts exceptions

If there is a failure in my php code in one of the shell bolts exec process, the error isn't obvious  in all the cases when the topology comes up /handles the request. 


Only in certain types of failures I see my exceptions getting printed but for some, it just doesnt do anything. 


here is a simple example: 

this is part of my code in my shell_bolt.php  under multilang/resources:

try {
     .....
     .....

      $fh = fopen("/tmp/pytrace.txt", 'a') or die("Can't open file");
      fwrite($fh, "hello world");
      fwrite($fh,print_r($tuple->values));

      fclose($fh);
      $this->emit(array($tuple->values[0], $word));
  } catch (Exception $e) {
        throw new Exception("exception " . $e);
  }

the problem area is print_r() function. If I remove print_r() and just print $tuple->values, everything works fine and the shell bolt emits the word.  With print_r, it just hangs and my drpc calls timeout .

What is the best way to figure out what is going on with the shell bolt exec process??


thanks!!



On , adiya n <na...@yahoo.com> wrote:
 


Should have looked at the wiki/links better. Troubleshooting guide helped.  thanks!



On Wednesday, June 4, 2014 11:29 PM, adiya n <na...@yahoo.com> wrote:
 


Hello all, 


What do negative id values mean in the logs?  Does that indicate any error?
I got these while running a local topology.  Also, is there any good documentation about understanding the logs. Most of it is self-explanatory from the log messages but if there is any existing documentation somewhere, that will really help.


5433 [Thread-19] INFO  backtype.storm.daemon.executor  - Processing received message source: prepare-request:7, stream: default, id: {-4212877050522192524=6354306792350206104}, [3323165896464350833, 33]
Tuple received by bolt is source: prepare-request:7, stream: default, id:
 {-4212877050522192524=6354306792350206104}, [3323165896464350833, 33]
5433 [Thread-10] INFO  backtype.storm.daemon.worker  - Worker 445b9038-ac6f-4629-a86f-82cd5eecf0e3 for storm drpc-demo-1-1401943429 on 9b5a127d-1a02-4362-883e-f5193c6f7a92:4 has finished loading
5434 [Thread-36] INFO  backtype.storm.daemon.executor  - Processing received message source: spout:8, stream: __ack_init, id: {}, [-4212877050522192524 -4291234877071288404 8]
5434 [Thread-19] INFO  backtype.storm.daemon.task  - Emitting: bolt0 default [3323165896464350833,  MyBolt is emitting: ]
5434 [Thread-36] INFO  backtype.storm.daemon.executor  - Processing received message source: prepare-request:7, stream: __ack_ack, id: {}, [-4212877050522192524 340043085440436800]
5435 [Thread-19]
 INFO  backtype.storm.daemon.task  - Emitting: bolt0 __ack_ack [-4212877050522192524 5906040704921991109]


thanks
Aiya

Re: Multilang shell bolts exceptions

Posted by Andrew Montalenti <an...@parsely.com>.
What multi-lang driver for PHP are you using? There is a way for multi-lang
drivers to report errors up to Storm (see ShellBolt's handling of the
"error" command here
<https://github.com/apache/incubator-storm/blob/master/storm-core/src/jvm/backtype/storm/task/ShellBolt.java#L114-L115>).
Perhaps your driver is not making use of this facility and that's why your
exceptions are being buried?


On Thu, Jun 5, 2014 at 11:46 AM, adiya n <na...@yahoo.com> wrote:

> If there is a failure in my php code in one of the shell bolts exec
> process, the error isn't obvious  in all the cases when the topology comes
> up /handles the request.
>
> Only in certain types of failures I see my exceptions getting printed but
> for some, it just doesnt do anything.
>
> here is a simple example:
> this is part of my code in my shell_bolt.php  under multilang/resources:
>
> try {
>      .....
>      .....
>       $fh = fopen("/tmp/pytrace.txt", 'a') or die("Can't open file");
>       fwrite($fh, "hello world");
>       fwrite($fh, print_r($tuple->values));
>       fclose($fh);
>       $this->emit(array($tuple->values[0], $word));
>   } catch (Exception $e) {
>         throw new Exception("exception " . $e);
>   }
>
> the problem area is print_r() function. If I remove print_r() and just
> print $tuple->values, everything works fine and the shell bolt emits the
> word.  With print_r, it just hangs and my drpc calls timeout .
>
> What is the best way to figure out what is going on with the shell bolt
> exec process??
>
>
> thanks!!
>
>
>   On , adiya n <na...@yahoo.com> wrote:
>
>
> Should have looked at the wiki/links better. Troubleshooting guide
> helped.  thanks!
>
>
>   On Wednesday, June 4, 2014 11:29 PM, adiya n <na...@yahoo.com>
> wrote:
>
>
> Hello all,
>
> What do negative id values mean in the logs?  Does that indicate any error?
> I got these while running a local topology.  Also, is there any good
> documentation about understanding the logs. Most of it is self-explanatory
> from the log messages but if there is any existing documentation somewhere,
> that will really help.
>
> 5433 [Thread-19] INFO  backtype.storm.daemon.executor  - Processing
> received message source: prepare-request:7, stream: default, id: {-
> 4212877050522192524=6354306792350206104}, [3323165896464350833, 33]
> Tuple received by bolt is source: prepare-request:7, stream: default, id:
> {-4212877050522192524=6354306792350206104}, [3323165896464350833, 33]
> 5433 [Thread-10] INFO  backtype.storm.daemon.worker  - Worker
> 445b9038-ac6f-4629-a86f-82cd5eecf0e3 for storm drpc-demo-1-1401943429 on
> 9b5a127d-1a02-4362-883e-f5193c6f7a92:4 has finished loading
> 5434 [Thread-36] INFO  backtype.storm.daemon.executor  - Processing
> received message source: spout:8, stream: __ack_init, id: {},
> [-4212877050522192524 -4291234877071288404 8]
> 5434 [Thread-19] INFO  backtype.storm.daemon.task  - Emitting: bolt0
> default [3323165896464350833,  MyBolt is emitting: ]
> 5434 [Thread-36] INFO  backtype.storm.daemon.executor  - Processing
> received message source: prepare-request:7, stream: __ack_ack, id: {}, [-
> 4212877050522192524 340043085440436800]
> 5435 [Thread-19] INFO  backtype.storm.daemon.task  - Emitting: bolt0
> __ack_ack [-4212877050522192524 5906040704921991109]
>
> thanks
> Aiya
>
>
>
>
>
>