# Debugging connection issues

**URL:** <https://forum.ansible.com/t/debugging-connection-issues/25769>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [October 18, 2017, 4:35pm UTC](https://forum.ansible.com/t/debugging-connection-issues/25769 "2017-10-18T16:35:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cody\_John](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@Cody\_John](https://forum.ansible.com/u/Cody_John)\
**Post date:** [October 18, 2017, 4:35pm UTC](https://forum.ansible.com/t/debugging-connection-issues/25769/1 "2017-10-18T16:35:23Z")

</div>

I’m getting the dreaded “Unable to open shell” error when trying to run playbooks against my network devices in AWX. Typically I would set ANSIBLE\_DEBUG and ANSIBLE\_LOG\_PATH environment variables to debug…how can I do the same when launching a job from a template in AWX?

---

<div class="post-metadata">

**Author:** ![Cody\_John](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@Cody\_John](https://forum.ansible.com/u/Cody_John)\
**Post date:** [October 18, 2017, 5:04pm UTC](https://forum.ansible.com/t/debugging-connection-issues/25769/2 "2017-10-18T17:04:27Z")

</div>

I was able to get more logging enabled by setting the ‘log\_path’ option in ansible.cfg. Now I see this:

2017-10-18 17:00:19,094 p=4009 u=root | Traceback (most recent call last):

`

File “/usr/bin/ansible-connection”, line 316, in main

server = Server(socket\_path, pc)

File “/usr/bin/ansible-connection”, line 111, in **init**

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

File “/usr/lib/python2.7/site-packages/ansible/plugins/loader.py”, line 363, in get

self.\_module\_cache[path] = self.\_load\_module\_source(name, path)

File “/usr/lib/python2.7/site-packages/ansible/plugins/loader.py”, line 339, in \_load\_module\_source

module = imp.load\_source(full\_name, path, module\_file)

File “/usr/lib/python2.7/site-packages/ansible/plugins/connection/netconf.py”, line 90, in

raise AnsibleError(“ncclient is not installed”)

AnsibleError: ncclient is not installed

`

I know that ncclient was a new pre-requisite added in 2.3, but it doesn’t appear that it’s installed in awx\_task by default.

---

<div class="post-metadata">

**Author:** ![matburt](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/matburt/32/3612_2.png) [@matburt](https://forum.ansible.com/u/matburt)\
**Post date:** [October 18, 2017, 7:08pm UTC](https://forum.ansible.com/t/debugging-connection-issues/25769/3 "2017-10-18T19:08:26Z")

</div>

We’re working on a system which would allow you to manage this in a better way but for the moment if you need more dependencies you may need to create your own image based on ours as a base and add that dependency.

---

<div class="post-metadata">

**Author:** ![Cody\_John](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@Cody\_John](https://forum.ansible.com/u/Cody_John)\
**Post date:** [October 18, 2017, 8:46pm UTC](https://forum.ansible.com/t/debugging-connection-issues/25769/4 "2017-10-18T20:46:33Z")

</div>

Understood. But in this case, this is really an ansible dependency and should be included in the awx\_task build by default. This package is required for using many network modules in 2.3+.

---

<div class="post-metadata">

**Author:** ![matburt](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/matburt/32/3612_2.png) [@matburt](https://forum.ansible.com/u/matburt)\
**Post date:** [October 19, 2017, 12:07pm UTC](https://forum.ansible.com/t/debugging-connection-issues/25769/5 "2017-10-19T12:07:13Z")

</div>

I understand how you feel, there are a lot of separate dependencies for modules on Ansible. In general we don’t want to add _all_ of them but perhaps this is one that we could include if you wanted to submit it as a PR?
