# In the code, Socket Path Name is Created, But The Socket Handler File isn't generated

**URL:** <https://forum.ansible.com/t/in-the-code-socket-path-name-is-created-but-the-socket-handler-file-isnt-generated/26171>\
**Category:** Ansible Developer\
**Created:** [November 30, 2017, 1:01am UTC](https://forum.ansible.com/t/in-the-code-socket-path-name-is-created-but-the-socket-handler-file-isnt-generated/26171 "2017-11-30T01:01:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![user45](https://avatars.discourse-cdn.com/v4/letter/u/7ab992/32.png) [@user45](https://forum.ansible.com/u/user45)\
**Post date:** [November 30, 2017, 1:01am UTC](https://forum.ansible.com/t/in-the-code-socket-path-name-is-created-but-the-socket-handler-file-isnt-generated/26171/1 "2017-11-30T01:01:27Z")

</div>

Good morning. I’m trying to develop a network module, but I’ve been stuck here for a few days.

I am having a hard time because of the persistent connection code.

I have noticed that there was a socket handler file in the “~/.ansible/pc” folder and we can use persistent connection through this handler.

But when I run the code, the socket path name is created, but the handler file is not created and an error occurred.

When I analyzed the code, I noticed that there was a problem with the “/usr/bin/ansible-connection” code. Exactly the problem occurred in the code below.

###################### ANSIBLE CODE in /usr/bin/ansible-connection #######################

def main():

.

.

server = Server(socket\_path, pc)

.

.

class Server():

.

.

self.connection = connection\_loader.get(play\_context.connection, play\_context, sys.stdin)

self.connection.\_connect()

.

.

---

<div class="post-metadata">

**Author:** ![psprygad](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@psprygad](https://forum.ansible.com/u/psprygad)\
**Post date:** [November 30, 2017, 1:31am UTC](https://forum.ansible.com/t/in-the-code-socket-path-name-is-created-but-the-socket-handler-file-isnt-generated/26171/2 "2017-11-30T01:31:40Z")

</div>

Are you developing directly against source from the devel branch? Take a look at this and see if it helps you.

[https://github.com/ansible/community/blob/master/group-network/network\_dev\_network\_cli.rst](https://github.com/ansible/community/blob/master/group-network/network_dev_network_cli.rst)

Is your code in a publicly viewable place?

---

<div class="post-metadata">

**Author:** ![user45](https://avatars.discourse-cdn.com/v4/letter/u/7ab992/32.png) [@user45](https://forum.ansible.com/u/user45)\
**Post date:** [November 30, 2017, 11:13am UTC](https://forum.ansible.com/t/in-the-code-socket-path-name-is-created-but-the-socket-handler-file-isnt-generated/26171/3 "2017-11-30T11:13:01Z")

</div>

2017년 11월 30일 목요일 오후 8시 7분 8초 UTC+9, 강동인 님의 말:

> **(attachments)**
>
> [ansible.log](https://forum.ansible.com/uploads/short-url/agnejn8cT50fIHo5bxBzYQCVHoE.log) (49.7 KB)

---

<div class="post-metadata">

**Author:** ![user45](https://avatars.discourse-cdn.com/v4/letter/u/7ab992/32.png) [@user45](https://forum.ansible.com/u/user45)\
**Post date:** [December 1, 2017, 12:50pm UTC](https://forum.ansible.com/t/in-the-code-socket-path-name-is-created-but-the-socket-handler-file-isnt-generated/26171/4 "2017-12-01T12:50:25Z")

</div>

The issue has been resolved. The cause of the error was the Terminal Module.

2017년 11월 30일 목요일 오후 8시 13분 1초 UTC+9, 강동인 님의 말:
