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
108 views

1 answer to this question.

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

+1 vote
1 answer
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
35 views
0 votes
1 answer
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
216 views
0 votes
1 answer
0 votes
1 answer