我已经构建了mesos并且大致遵循了here指令在mesos中使用docker镜像。我在下面的第3步中遇到错误:HTTP/1.1 401 Unauthorized
。以下是我得到的步骤和错误。
在ubuntu vm上启动一个mesos master,如下所示:
./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/tmp/mesos
通过在同一台计算机上执行以下命令来启动mesos slave:
GLOG_v=1 ./bin/mesos-agent.sh --master=127.0.0.1:5050 --work_dir=/valib/mesos --isolation=docker/runtime,filesystem/linux --image_providers=docker --executor_environment_variables="{}" --docker_config=file:///home/user/.docker/config.json
然后,按如下方式运行一个mesos执行器:
src/mesos-execute --master=127.0.0.1:5050 --name=test --docker_image=library/redis --shell=false
第3步终止,并出现以下错误:
I0109 10:51:03.744791 16304 scheduler.cpp:184] Version: 1.2.0
I0109 10:51:03.746084 16313 scheduler.cpp:470] New master detected at master@127.0.0.1:5050
Subscribed with ID f8318398-ea94-49bf-ba39-a3de8d4b93f2-0000
Submitted task 'test' to agent 'f8318398-ea94-49bf-ba39-a3de8d4b93f2-S0'
Received status update TASK_FAILED for task 'test'
message: 'Failed to launch container: Failed to decode HTTP responses: No response decoded
HTTP/1.0 200 Connection established
HTTP/1.1 401 Unauthorized
Content-Type: application/json; charset=utf-8
Docker-Distribution-Api-Version: registry/2.0
Www-Authenticate: Bearer realm="https://auth.docker.io/token",service="registry.docker.io",scope="repository:library/redis:pull"
Date: Mon, 09 Jan 2017 15:56:58 GMT
Content-Length: 145
Strict-Transport-Security: max-age=31536000
{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":[{"Type":"repository","Name":"library/redis","Action":"pull"}]}]}
'
source: SOURCE_AGENT
reason: REASON_CONTAINER_LAUNCH_FAILED