Skip to content
This repository has been archived by the owner on Apr 18, 2018. It is now read-only.

Cannot build on OSX when submitting to Ubuntu cluster #129

Open
emaadmanzoor opened this issue Jun 17, 2015 · 9 comments
Open

Cannot build on OSX when submitting to Ubuntu cluster #129

emaadmanzoor opened this issue Jun 17, 2015 · 9 comments

Comments

@emaadmanzoor
Copy link

I am building the provided exclamation topology on OSX (Python 2.7.9) and submitting it to a cluster running Ubuntu (Python 2.7.6).

I get the following error in Storm's logs:

java.lang.RuntimeException: Error when launching multilang subprocess bash: pyleus_venv/bin/python: cannot execute binary file: Exec format error

I think this is related to #110.

I extracted the pyleus_venv directory from the topology JAR, copied it to a cluster machine and tried running pyleus_venv/bin/python; it causes the same error.

I guess I need to be careful with where I build the topology. It would be nice if the documentation included a warning to this effect.

@emaadmanzoor
Copy link
Author

For completeness sake, here is the output of file on the OSX and Ubuntu python executables:

  • OSX: ./python: Mach-O 64-bit x86_64 executable
  • Ubuntu: /usr/bin/python2.7: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=b313837f8cb07f474cc78fbba5a1255faa0bdecd, stripped

@poros
Copy link
Contributor

poros commented Jun 17, 2015

I'm sorry you have been unlucky enough to experience #110, but could you be a bit more precise? What kind of alert should be added to the documentation?

@mzbyszynski
Copy link
Contributor

I've never done a mac -> ubuntu deployment, but I have had trouble whenever there was a difference between the python version that my pyleus jar was built with vs. the python version the storm cluster is using. Maybe the documentation should specify that you need to compile your jar using the same python version you are going to deploy to?

@emaadmanzoor
Copy link
Author

I am not sure what exactly causes the problem (Python versions, OS specifics, etc.), but I can look into it if it will help.

I think mentioning that the Python versions need to be the same is a good idea, but would OSX->Ubuntu really work if Python versions were the same? Let me try using the same Python version on OSX. TODO

If cross-platform deployments do happen often, I guess a good place to add a "warning" (like the Python 3 incompatibility warning in the docs) would be near the first time pyleus submit is mentioned.

@poros
Copy link
Contributor

poros commented Jun 17, 2015

Cool, we can definitely do that. Let me know about yours OSX->Ubuntu experiment. Cross-platform development is a pretty unusual scenario for me, but it might be not the case for other users.

@hellp
Copy link
Contributor

hellp commented Jun 17, 2015

I even ran into problems running a topology built on Ubuntu on Debian. Even if the very simple exclamation topology would (somehow) run OSX->Ubuntu, I guess as soon as you start using python packages that use C extensions you'd be out of luck doing it cross platform. You'd need two systems that are very much alike regarding installed libraries etc.

I'm using one of our machines as a build machine and deploy from there to the other (pretty much identical) Storm nodes.

@poros
Copy link
Contributor

poros commented Jun 17, 2015

Good point, I forgot about C extensions. Ok, I'm going to add a warning in the library in case of cross-platform development.

@poros poros self-assigned this Jun 17, 2015
@alialshehab
Copy link

Hi, Have this issue been resolved?
I am having a similar issue to the one listed in this thread. This happens by simply trying to run the exclamation_topology example on git.

On my machine I am using:
OSX version 10.10.5
pyleus 0.3.0
storm 0.9.5
Python 2.7.10

And on my clusters I have:
Ubuntu-14.04
Python 2.7.6
storm 0.9.5

Below is the error output I get on my Storm UI:

java.lang.RuntimeException: Error when launching multilang subprocess bash: pyleus_venv/bin/python: cannot execute binary file: Exec format error at backtype.storm.utils.ShellProcess.launch(ShellProcess.java:66) at backtype.storm.spout.ShellSpout.open(ShellSpout.java:74) at backtype.storm.daemon.executor$fn__6579$fn__6594.invoke(executor.clj:522) at backtype.storm.util$async_loop$fn__459.invoke(util.clj:461) at clojure.lang.AFn.run(AFn.java:24) at java.lang.Thread.run(Thread.java:745) Caused by: java.io.IOException: Stream closed at java.lang.ProcessBuilder$NullOutputStream.write(ProcessBuilder.java:434) at java.io.OutputStream.write(OutputStream.java:116) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) at java.io.DataOutputStream.flush(DataOutputStream.java:123) at com.yelp.pyleus.serializer.MessagePackSerializer.writeMessage(MessagePackSerializer.java:215) at com.yelp.pyleus.serializer.MessagePackSerializer.connect(MessagePackSerializer.java:65) at backtype.storm.utils.ShellProcess.launch(ShellProcess.java:64) ... 5 more

@poros poros removed their assignment Sep 16, 2015
@westover
Copy link

Maybe a good use of docker? I have been experimenting with using Docker to do this. But have issues getting the storm binary to behave

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants