0

I wanted to run a simple python framework on my Mesos Cluster (0.23) which runs on CentOS 7.1. I installed Mesos over the mesosphere packages everything works fine (I'm running some Marathon jobs). But when I wanted to start develop my own framework with Python I got stuck. I used this example from James J Porter, I know he tested it on mesos 0.20.0 but I thought I could run it with little effort on Mesos 0.23.

At first I got an import error from python which said that mesos.native and mesos.interface are not available. Then I tried to do an easy_install but I could not find mesos.native and trying to isntall "mesos" results in the following:

$ pip install mesos
Collecting mesos
/usr/lib/python2.7/site-packages/pip-7.1.0-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Could not find a version that satisfies the requirement mesos (from versions: )
No matching distribution found for mesos
$ easy_install mesos
Searching for mesos
Reading https://pypi.python.org/simple/mesos/
No local packages or download links found for mesos
error: Could not find suitable distribution for Requirement.parse('mesos')

Then I thought it would be a good idea to build everything by myself according to the getting started guide. But know I get the following error:

$ python hello_mesos.py 
Traceback (most recent call last):
  File "hello_mesos.py", line 7, in <module>
    from mesos.native import MesosExecutorDriver, MesosSchedulerDriver
  File "/usr/lib/python2.7/site-packages/mesos.native-0.23.0-py2.7.egg/mesos/native/__init__.py", line 17, in <module>
    from ._mesos import MesosExecutorDriverImpl
ImportError: libsvn_delta-1.so.1: cannot open shared object file: No such file or directory

When I tried to built it from source I got this warning and the following error:

../configure

checking whether we can build usable Python eggs... In file included from /usr/include/limits.h:26:0,
                 from /usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/limits.h:168,
                 from /usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/syslimits.h:7,
                 from /usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/limits.h:34,
                 from /usr/include/python2.7/Python.h:19,
                 from testpyegg.cpp:1:
/usr/include/features.h:330:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^

make:

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make[2]: *** [master/libmesos_no_3rdparty_la-master.lo] Error 1
make[2]: Leaving directory `/root/mesos-0.23.0/build/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/mesos-0.23.0/build/src'
make: *** [all-recursive] Error 1

Did I missed something?

joh.scheuer
  • 566
  • 3
  • 11

2 Answers2

1

I found my mistake. I just missed to install to install the python egg from mesosphere:

wget http://downloads.mesosphere.io/master/centos/7/mesos-0.23.0-py2.7-linux-x86_64.egg
easy_install mesos-0.23.0-py2.7-linux-x86_64.egg

Here ist a Link to all eggs.

joh.scheuer
  • 566
  • 3
  • 11
  • Download still works, however links are nowhere to be found. How would you install the package for greater mesos versions (0.28)? – odedfos Mar 31 '16 at 09:29
  • You can find all linkes here: http://open.mesosphere.com/downloads/mesos/#apache-mesos-0.28.0 - Link for Mesos 0.28 and CentOS 7 is here http://repos.mesosphere.com/el/7/x86_64/RPMS/mesos-0.28.0-2.0.16.centos701406.x86_64.rpm – joh.scheuer Apr 01 '16 at 20:56
  • I was referring to the python egg files for each version. They used to appear in the download page but are not there anymore. – odedfos Apr 03 '16 at 06:23
0

I suppose your packages are broken, and you better to install things from packages. I had used the following sequence to mitigate problem:

# Fetch the Apache Maven repo file.
$ sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo

# 'Mesos > 0.21.0' requires 'subversion > 1.8' devel package, which is
# not available in the default repositories.
# Add the WANdisco SVN repo file: '/etc/yum.repos.d/wandisco-svn.repo' with content:

  [WANdiscoSVN]
  name=WANdisco SVN Repo 1.9
  enabled=1
  baseurl=http://opensource.wandisco.com/centos/7/svn-1.9/RPMS/$basearch/
  gpgcheck=1
  gpgkey=http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco

# Install essential development tools.
$ sudo yum groupinstall -y "Development Tools"

# Install other Mesos dependencies.
$ sudo yum install -y apache-maven python-devel java-1.7.0-openjdk-devel zlib-devel libcurl-devel openssl-devel cyrus-sasl-devel cyrus-sasl-md5 apr-devel subversion-devel apr-util-devel
Vast Academician
  • 357
  • 4
  • 12