flocker-docker-plugin不起作用

时间:2021-12-14 18:18:51

I have 2 centos 7.1 nodes and I'm trying to get flocker running on it. I've followed the installation steps exactly however when it comes to running the following command to test to see if flocker-docker-plugin works:

我有2个centos 7.1节点,我想让flocker在上面运行。但是,在运行下面的命令来测试flocker-docker-plugin是否有效时,我确实遵循了安装步骤:

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

docker运行-v苹果:/data -volume-driver flocker busybox sh -c "echo hello > /data/file.txt"

I get the error:

我得到了错误:

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

错误响应来自守护程序:错误查找卷插件flocker:插件没有找到。

The flocker-docker-plugin logs show the following:

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...

Also running uft-flocker-volumes --control-service=foo.bar.net list-nodes returns:

还运行uft-flocker-volume——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'>>]

Update:

更新:

I tried downgrading to docker 1.8.2 and tried rerunning the command, didn't work, same error.

我尝试对docker 1.8.2降级,并尝试重新运行该命令,但是没有工作,同样的错误。

Output of ls /etc/flocker:

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

Update:1/1/2016 I set the following environment variables as per the kubernetes docs http://kubernetes.io/v1.1/examples/flocker/.

更新:2016年1月1日,我根据kubernetes文档http://kubernet .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

And I got a different error when running the command

在运行这个命令时,我得到了一个不同的错误。

jonathan@ubuntu:~/Flocker/sc-test-cluster$ uft-flocker-volumes --control-service=sc-test1.cloudapp.net list-nodes

jonathan@ubuntu:~ /群/ sc-test-cluster uft-flocker-volumes美元——控制服务= 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
===========================================================================

So I set the flag to see what happens: jonathan@ubuntu:~/Flocker/sc-test-cluster$ export IGNORE_NETWORK_CHECK=1

因此,我设置了一个标志来查看发生了什么:jonathan@ubuntu:~/Flocker/sc-test-cluster$ export IGNORE_NETWORK_CHECK=1。

And bam! The same error :(

和bam !同样的错误:

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'>>]

Is the wget error a helpful clue as to what may be happening?

对于可能发生的事情,wget错误是一个有用的线索吗?

1 个解决方案

#1


1  

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

错误响应来自守护程序:错误查找卷插件flocker:插件没有找到。

This might be due to the control-service hostname on the agent.yml is not configured correctly. Make sure it's the host of the control-server node, not the agent node itself.

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

#1


1  

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

错误响应来自守护程序:错误查找卷插件flocker:插件没有找到。

This might be due to the control-service hostname on the agent.yml is not configured correctly. Make sure it's the host of the control-server node, not the agent node itself.

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