我正在尝试将 Chronos 配置为使用https://github.com/mesosphere/mesos-docker/上的自定义 mesos-docker 执行程序。每次我尝试运行命令它都会失败。
我使用以下命令创建了任务
echo '{"schedule":"R/2014-02-14T00:52:00Z/PT90M", "name":"testing_docker_executor", "command":"docker_ubuntu_test /root/docker_test.sh", "epsilon":"PT15M", "executor":"/var/lib/mesos/executors/docker" }' | http POST localhost:8080/scheduler/iso8601
我还在执行程序中配置了日志记录,下面是我在失败时得到的日志
Feb 11 13:51:36 ip6-localhost docker[13895]: Ready to serve!
Feb 11 13:51:36 ip6-localhost docker[13895]: Registered with Mesos slave
Feb 11 13:51:36 ip6-localhost docker[13895]: Task is: ct:1392126755612:2:testing_docker_executor
Feb 11 13:51:36 ip6-localhost docker[13895]: JSON from framework is rubbish
Feb 11 13:51:36 ip6-localhost docker[13895]: No JSON object could be decoded
Feb 11 13:51:36 ip6-localhost docker[13895]: Traceback (most recent call last):
Feb 11 13:51:36 ip6-localhost docker[13895]: File "/var/lib/mesos/executors/docker", line 120, in launchTask
Feb 11 13:51:36 ip6-localhost docker[13895]: self.data = json.loads(task.data) if task.data else {}
Feb 11 13:51:36 ip6-localhost docker[13895]: File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
Feb 11 13:51:36 ip6-localhost docker[13895]: return _default_decoder.decode(s)
Feb 11 13:51:36 ip6-localhost docker[13895]: File "/usr/lib/python2.7/json/decoder.py", line 365, in decode
Feb 11 13:51:36 ip6-localhost docker[13895]: obj, end = self.raw_decode(s, idx=_w(s, 0).end())
Feb 11 13:51:36 ip6-localhost docker[13895]: File "/usr/lib/python2.7/json/decoder.py", line 383, in raw_decode
Feb 11 13:51:36 ip6-localhost docker[13895]: raise ValueError("No JSON object could be decoded")
Feb 11 13:51:36 ip6-localhost docker[13895]: ValueError: No JSON object could be decoded
Feb 11 13:51:36 ip6-localhost docker[13895]: []
Feb 11 13:51:36 ip6-localhost docker[13895]: Traceback (most recent call last):
Feb 11 13:51:36 ip6-localhost docker[13895]: File "/var/lib/mesos/executors/docker", line 67, in run
Feb 11 13:51:36 ip6-localhost docker[13895]: img = self.args[0]
Feb 11 13:51:36 ip6-localhost docker[13895]: IndexError: list index out of range
有什么我想念的吗。我是否需要在命令中提供 JSON。