403使用Toil

时间:2017-06-03 04:27:51

标签: python amazon-web-services amazon-s3 boto

我是Toil和AWS的新手,试图在Toil文档中运行HelloWorld.py示例。我已经在我的本地mac笔记本电脑上成功安装了toil和相关的python包,并在AWS上设置了我的帐户。我创建了一个小型领导者/工作者群组

$ cgcloud create-cluster toil -s 2 -t m3.large 
and started it:
$ cgcloud ssh toil-leader 

这改变了我的屏幕提示:

mesosbox@ip-172-31-25-135:~$

然后从我Mac上的另一个窗口,我用with命令启动了Toil HellowWorld示例:

$ python2.7 HelloWorld.py --batchSystem=mesos --mesosMaster=mesos-master:5050 aws:us-west-2:my-aws-jobstore

我得到了以下输出:

Apples-Air 2017-06-02 19:30:53,524 MainThread INFO toil.lib.bioio: Root logger is at level 'INFO', 'toil' logger at level 'INFO'.
    Apples-Air 2017-06-02 19:30:53,524 MainThread INFO toil.lib.bioio: Root logger is at level 'INFO', 'toil' logger at level 'INFO'.
    Apples-Air 2017-06-02 19:30:54,852 MainThread WARNING toil.jobStores.aws.jobStore: Exception during panic
    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/site-packages/toil/jobStores/aws/jobStore.py", line 209, in initialize
        self.destroy()
      File "/usr/local/lib/python2.7/site-packages/toil/jobStores/aws/jobStore.py", line 1334, in destroy
        self._bind(create=False, block=False)
      File "/usr/local/lib/python2.7/site-packages/toil/jobStores/aws/jobStore.py", line 241, in _bind
        versioning=True)
      File "/usr/local/lib/python2.7/site-packages/toil/jobStores/aws/jobStore.py", line 721, in _bindBucket
        bucket = self.s3.get_bucket(bucket_name, validate=True)
      File "/usr/local/lib/python2.7/site-packages/boto/s3/connection.py", line 502, in get_bucket
        return self.head_bucket(bucket_name, headers=headers)
      File "/usr/local/lib/python2.7/site-packages/boto/s3/connection.py", line 535, in head_bucket
        raise err
    S3ResponseError: S3ResponseError: 403 Forbidden

    Traceback (most recent call last):
      File "helloWorld.py", line 22, in <module>
        print(Job.Runner.startToil(j, options)) #Prints Hello, world!, ….
      File "/usr/local/lib/python2.7/site-packages/toil/job.py", line 740, in startToil
        with Toil(options) as toil:
      File "/usr/local/lib/python2.7/site-packages/toil/common.py", line 614, in __enter__
        jobStore.initialize(config)
      File "/usr/local/lib/python2.7/site-packages/toil/jobStores/aws/jobStore.py", line 209, in initialize
        self.destroy()
      File "/usr/local/lib/python2.7/site-packages/toil/jobStores/aws/jobStore.py", line 206, in initialize
        self._bind(create=True)
      File "/usr/local/lib/python2.7/site-packages/toil/jobStores/aws/jobStore.py", line 241, in _bind
        versioning=True)
      File "/usr/local/lib/python2.7/site-packages/toil/jobStores/aws/jobStore.py", line 721, in _bindBucket
        bucket = self.s3.get_bucket(bucket_name, validate=True)
      File "/usr/local/lib/python2.7/site-packages/boto/s3/connection.py", line 502, in get_bucket
        return self.head_bucket(bucket_name, headers=headers)
      File "/usr/local/lib/python2.7/site-packages/boto/s3/connection.py", line 535, in head_bucket
        raise err
    boto.exception.S3ResponseError: S3ResponseError: 403 Forbidden

请帮助。
谢谢。
---约翰

1 个答案:

答案 0 :(得分:0)

我意识到这个答案有点晚了。我注意到的一个问题是使用mesosMaster参数。

相反,您的命令应该看起来像

python2.7 HelloWorld.py --batchSystem=mesos --mesosMaster=172.31.25.135:5050 aws:us-west-2:my-aws-jobstore

请注意,我将mesos-master替换为

中的实际IP地址
mesosbox@ip-172-31-25-135:~$

希望将来不需要传递这一论点,但截至2017年7月26日尚未实施。

对于Toil的进一步问题,你可能会有更好的运气posting a new issue到Toil Github页面。