Shuja Ahmed
Shuja Ahmed

Reputation: 752

org.apache.storm.multilang.NoOutputException: Pipe to subprocess seems to be broken! python: can't open file [Errno 2] No such file or directory

Whenever I try to run my storm topology locally I get the following

error: java.lang.RuntimeException: org.apache.storm.multilang.NoOutputException: Pipe to subprocess seems to be broken! No output read. Serializer Exception: python: can't open file 'parser_bolt.py': [Errno 2] No such file or directory I have searched everywhere on the internet but not able to resolve this issue. I can see the respective python file in the resources folder when I unzip the compiled jar but somehow when deploying the jar its unable to find the python files from the topology.

Upvotes: 1

Views: 766

Answers (1)

Crackerman
Crackerman

Reputation: 733

I too had the same error with a Python bolt that I created. My issue was I forgot to call run on the class at the bottom of the Python code. Example code below.

import storm

class TestStuff(storm.BasicBolt)

     def initialize(self,conf,context):
          self._conf = conf;
          self._context = context;

     def process(self, tuple):
          storm.logInfo("test")

TestStuff().run()

The last line of the sample code is what I forgot to put in, thus causing the error. Make sure you have that.

Upvotes: 1

Related Questions