ssl - flocker-docker-plugin 不起作用

标签 ssl docker twisted twisted.web

我有 2 个 centos 7.1 节点,我正在尝试让 flocker 在其上运行。我完全按照安装步骤进行操作,但是在运行以下命令以测试 flocker-docker-plugin 是否有效时:

docker run -v apples:/data --volume-driver flocker busybox sh -c "echo hello >/data/file.txt"

我得到错误:

来自守护程序的错误响应:查找卷插件 flocker 时出错:找不到插件

flocker-docker-plugin 日志显示如下:

{"request_body": null, "url": "https://foo.bar.com:4523/v1/state/nodes/by_era/b72bb203-b174-4241-a03a-6171cbc10f30", "timestamp": 1451201332.659948, "action_status": "started", "task_uuid": "1ae63069-286c-44fa-9dd2-6751ca0efe63", "action_type": "flocker:apiclient:http_request", "method": "GET", "task_level": [1]}
{"task_uuid": "1ae63069-286c-44fa-9dd2-6751ca0efe63", "error": false, "timestamp": 1451201332.749499, "message": "Starting factory <twisted.web.client._HTTP11ClientFactory instance at 0x2fc7710>", "message_type": "twisted:log", "task_level": [3]}
{"exception": "twisted.web._newclient.ResponseNeverReceived", "task_level": [4], "action_type": "flocker:apiclient:http_request", "reason": "[<twisted.python.failure.Failure <class 'OpenSSL.SSL.Error'>>]", "timestamp": 1451201333.050012, "task_uuid": "1ae63069-286c-44fa-9dd2-6751ca0efe63", "action_status": "failed"}
{"task_uuid": "c8d28668-f21b-4863-bf20-6c30f54c3d25", "error": true, "timestamp": 1451201333.05045, "message": "Unhandled Error\nTraceback (most recent call last):\nFailure: twisted.web._newclient.ResponseNeverReceived: [<twisted.python.failure.Failure <class 'OpenSSL.SSL.Error'>>]\n", "message_type": "twisted:log", "task_level": [1]}
{"task_uuid": "36f1ddd5-c5fa-4438-85d7-131e7752f8d3", "error": true, "timestamp": 1451201333.050727, "message": "main function encountered error\nTraceback (most recent call last):\nFailure: twisted.web._newclient.ResponseNeverReceived: [<twisted.python.failure.Failure <class 'OpenSSL.SSL.Error'>>]\n", "message_type": "twisted:log", "task_level": [1]}
{"task_uuid": "08bd8f13-0a8e-43f4-8b80-b4cf5b317f00", "error": false, "timestamp": 1451201333.051034, "message": "Stopping factory <twisted.web.client._HTTP11ClientFactory instance at 0x2fc7710>", "message_type": "twisted:log", "task_level": [1]}
{"task_uuid": "8f0fd1ef-19ca-4033-b16f-6d42e33eda1a", "error": false, "timestamp": 1451201333.052711, "message": "Main loop terminated.", "message_type": "twisted:log", "task_level": [1]}
flocker-docker-plugin.service: main process exited, code=exited, status=1/FAILURE
Unit flocker-docker-plugin.service entered failed state.
flocker-docker-plugin.service failed.
flocker-docker-plugin.service holdoff time over, scheduling restart.
Started Flocker Docker Plugin.
Starting Flocker Docker Plugin...

同时运行 uft-flocker-volumes --control-service=foo.bar.net list-nodes 返回:

jonathan@ubuntu:~/Flocker/sc-test-cluster$ uft-flocker-volumes --control-service=foo.bar.com list-nodes
Unhandled Error
Traceback (most recent call last):
Failure: twisted.web._newclient.ResponseNeverReceived
[<twisted.python.failure.Failure <class 'OpenSSL.SSL.Error'>>]

更新:

我尝试降级到 docker 1.8.2 并尝试重新运行命令,但没有用,同样的错误。

ls/etc/flocker 的输出:

[root@sc-test2 jonathan]# ls /etc/flocker
agent.yml  cluster.crt  node.crt  node.key  plugin.crt  plugin.key

[root@sc-test1 jonathan]# ls /etc/flocker
agent.yml    control-service.crt  node.crt  plugin.crt
cluster.crt  control-service.key  node.key  plugin.key

更新:1/1/2016 我根据 kubernetes 文档设置了以下环境变量 http://kubernetes.io/v1.1/examples/flocker/ .

export FLOCKER_CONTROL_SERVICE_HOST=foo.bar.com
export FLOCKER_CONTROL_SERVICE_CA_FILE=/etc/flocker/cluster.crt
export FLOCKER_CONTROL_SERVICE_CLIENT_CERT_FILE=/etc/flocker/node.crt
export FLOCKER_CONTROL_SERVICE_CLIENT_KEY_FILE=/etc/flocker/node.key
export FLOCKER_CONTROL_SERVICE_PORT=4523

我在运行命令时遇到了不同的错误

jonathan@ubuntu:~/Flocker/sc-test-cluster$ uft-flocker-volumes --control-service=sc-test1.cloudapp.net 列表节点

wget: error getting response: Connection reset by peer
===========================================================================
Unable to establish network connectivity from inside a container.

If you see an error message above, that may give you a clue how to fix it.

If you run docker in a VM, restarting the VM often helps, especially if
you have changed network (and/or DNS servers) since starting the VM.

If you are using docker-machine (e.g. as part of docker toolbox), you can
run the following command (or similar) to do that:

    docker-machine restart default && eval $(docker-machine env default)

To ignore this check, and proceed anyway (e.g. if you know you are offline)
set IGNORE_NETWORK_CHECK=1
===========================================================================

所以我设置标志看看会发生什么: jonathan@ubuntu:~/Flocker/sc-test-cluster$ export IGNORE_NETWORK_CHECK=1

砰!同样的错误:(

jonathan@ubuntu:~/Flocker/sc-test-cluster$ uft-flocker-volumes --control-service=sc-test1.cloudapp.net list-nodes
Unhandled Error
Traceback (most recent call last):
Failure: twisted.web._newclient.ResponseNeverReceived: [<twisted.python.failure.Failure <class 'OpenSSL.SSL.Error'>>]

wget 错误是否是关于可能发生的事情的有用线索?

最佳答案

Error response from daemon: Error looking up volume plugin flocker: Plugin not found

这可能是由于 agent.yml 上的控制服务主机名配置不正确。确保它是控制服务器节点的主机,而不是代理节点本身。

关于ssl - flocker-docker-plugin 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34472300/

相关文章:

Apache 重定向到 https 没有 mod_rewrite 不保留 URL

typescript - Monorepo中的后端 typescript :如何获取Docker的依赖关系?

perl - 远程调试Perl,Dancer,Starman,Docker

python - Tk Text 小部件的 Twisted 和 Tkinter 问题

python - 如何从控制台运行 twisted?

python - 使用twisted web登录网页

c# - 简单的 HTTPS 到 PHP 脚本

postgresql - 使用psql以SSL方式连接PostgreSQL

iOS 应用 SSL 握手失败

docker - 在哪里放置 kubernetes 和 dockerfiles