2016-04-12 16 views
1

私は、1.9、ドッカーのpyバージョン1.1.0とドッカー1.9.1を実行しています。私はhttp://registry.myserver.com:5000で実行しているプラ​​イベートな安全なドッカーレジストリを持っています。潜在的なドッカーの接続エラー

failed: [bniapp1] => {"changed": false, "failed": true} msg: ConnectionError(ProtocolError('Connection aborted.', error(2, 'No such file or directory')),)

冗長な出力:

--- 
    - name: Start User Service Container 
    docker: 
     name: userService 
     image: user-service 
     registry: registry.myserver.com:5000 
     state: running 
     insecure_registry: yes 
     expose: 
      - 8355 

しかし、これは現在、以下のエラーを返して:

私はこのリモートレジストリから引かれた画像を使用してコンテナを起動するansibleタスクを持っています
<54.229.16.155> 
<54.229.16.155> image=discovery-service registry=http://registry.myserver.com:5000 name=discoveryService state=running 
<54.229.16.155> IdentityFile=/home/nfrstrctrescd/bni-api.pem ConnectTimeout=10 PasswordAuthentication=no KbdInteractiveAuthentication=no User=centos ControlPath =/home/nfrstrctrescd/.ansible/cp/ansible-ssh-%h-%p-%r PreferredAuthentications=g ssapi-with-mic,gssapi-keyex,hostbased,publickey ControlMaster=auto ControlPersis t=60s 
<54.229.16.155> 
<54.229.16.155> IdentityFile=/home/nfrstrctrescd/bni-api.pem ConnectTimeout=10 'sudo -k && sudo -H -S -p "[sudo via ansible, key=hxhptjipltjnteknbbxkqgcdwvwshen p] password: " -u root /bin/sh -c '"'"'echo SUDO-SUCCESS-hxhptjipltjnteknbbxkqgc dwvwshenp; LANG=C DOCKER_HOST=tcp://127.0.0.1:2376 DOCKER_TLS_VERIFY=1 LC_CTYPE= C DOCKER_CERT_PATH=/opt/docker/certs /usr/bin/python /home/centos/.ansible/tmp/a nsible-tmp-1460499148.45-268540710837667/docker; rm -rf /home/centos/.ansible/tm p/ansible-tmp-1460499148.45-268540710837667/ >/dev/null 2>&1'"'"'' PasswordAuthe ntication=no KbdInteractiveAuthentication=no User=centos ControlPath=/home/nfrst rctrescd/.ansible/cp/ansible-ssh-%h-%p-%r PreferredAuthentications=gssapi-with-m ic,gssapi-keyex,hostbased,publickey ControlMaster=auto ControlPersist=60s 
failed: [bniapp1] => {"changed": false, "failed": true} 
msg: ConnectionError(ProtocolError('Connection aborted.', error(2, 'No such file or directory')),) 

注:リモートサーバーで手動でコンテナを実行すると、イメージが取得され、コンテナが正しく開始されます。

docker run registry.myserver.com:5000/user-service 

答えて

0

私のドッカーデーモンが実行されていないため、このエラーが発生しました。

# Start Docker Service 
- name: Start Docker service 
    service: name=docker state=started 
    become: yes 
    become_method: sudo 
- name: Boot Docker on startup 
    service: name=docker enabled=yes 
    become: yes 
    become_method: sudo 
+1

「service:name = docker state = started enabled = yes'」という単一の呼び出しを行うことができます。 –

関連する問題