# error ansible.module\_utils.connection.ConnectionError: Socket is closed

**URL:** <https://forum.ansible.com/t/error-ansible-module-utils-connection-connectionerror-socket-is-closed/30818>\
**Category:** Ansible Project\
**Created:** [July 19, 2019, 8:36am UTC](https://forum.ansible.com/t/error-ansible-module-utils-connection-connectionerror-socket-is-closed/30818 "2019-07-19T08:36:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidoudou](https://avatars.discourse-cdn.com/v4/letter/d/ecc23a/32.png) [@davidoudou](https://forum.ansible.com/u/davidoudou)\
**Post date:** [July 19, 2019, 8:36am UTC](https://forum.ansible.com/t/error-ansible-module-utils-connection-connectionerror-socket-is-closed/30818/1 "2019-07-19T08:36:34Z")

</div>

Hi all!

I am facing an issue in my role.  
I am trying to configure a mikrotik router with the “routeros\_command” module.  
It works just fine. But, if I do a scp from my local machine to the router and then use the “routeros\_command” module, I get the error below:  
ansible.module\_utils.connection.ConnectionError: Socket is closed

Is there something to do about the ssh connection (reset it or anything else)?

Thank you for your feedback.

David
