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, 2019 in Ansible by Nisha
1,925 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, 2019 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, 2019 in Ansible by Rahul
538 views
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,024 views
+2 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP