Error saying "ConnectionError(ProtocolError('Connection aborted.', error(2, 'No such file or directory')),)"

0 votes

I have a private insecure docker registry running at http://registry.myserver.com:5000.

Ansible version: 1.9
docker.py version: 1.1.0
docker: 1.9.1

I have an ansible task to start a container using a pulled image from this remote registry:

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

I get the following error:

failed: [bniapp1] => {"changed": false, "failed": true} 
msg: ConnectionError(ProtocolError('Connection aborted.', error(2, 'No such file or directory')),)
Feb 1 in Ansible by Nisha
35 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hey @Nisha, you get this error when your docker daemon isn't working. Add the following in your playbook to start the Docker daemon. 

# 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
answered Feb 1 by Kunal

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer

Error saying "DistributionNotFound jinja2<2.9"

Hey @Kiara, update your distribution instead of jinja ...READ MORE

answered Jan 14 in Ansible by Rahul
12 views
0 votes
1 answer
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.