1.3.6 Docker image does not work with Mesos

Issue #55 resolved
bmerry created an issue

I'm trying to run the scheduler with the provided Docker image (osallou/go-docker:1.3.6) with the executor set to 'mesos' and GODOCKER_MESOS_MASTER set to an external Zookeeper URL. I get this error:

scheduler_1  | ERROR:mesoshttp.client:Mesos:Subscribe:Failed for zk://192.168.1.184:2181/mesos: the JSON object must be str, not 'bytes'
scheduler_1  | Traceback (most recent call last):
scheduler_1  |   File "/usr/local/lib/python3.5/dist-packages/mesoshttp/client.py", line 588, in __register
scheduler_1  |     zk_url = self.__zk_detect(zk_info[0], '/'.join(zk_info[1:]))
scheduler_1  |   File "/usr/local/lib/python3.5/dist-packages/mesoshttp/client.py", line 534, in __zk_detect
scheduler_1  |     master_info = json.loads(data)
scheduler_1  |   File "/usr/lib/python3.5/json/__init__.py", line 312, in loads
scheduler_1  |     s.__class__.__name__))
scheduler_1  | TypeError: the JSON object must be str, not 'bytes'

I don't get the same problem with 1.3.5 and Python 2 (I can't use Python 2 with 1.3.6 because it doesn't appear to be installed in the image).

Comments (5)

  1. Olivier Sallou repo owner

    arrgh, seems a python 2 vs 3 issue with strings and bytes... should be easy to fix but needs some testing. Thanks

  2. Olivier Sallou repo owner

    I could fix with mesoshttp lib version 0.2.10, indeed zookeeper result was not decoded for python 3 . I regenerated godocker "master" docker image and created a docker image 1.3.6-2 with the new mesoshttp dependency fix. Images build is in progress, you can check on docker hub once build is ok.

  3. bmerry reporter

    Thanks for the quick fix. I can confirm that I'm now able to run a job through Mesos with 1.3.6-2.

  4. Log in to comment