# AWX cli problem

**URL:** <https://forum.ansible.com/t/awx-cli-problem/2193>\
**Category:** Get Help\
**Tags:** zscaler, awx\
**Created:** [November 7, 2023, 9:51am UTC](https://forum.ansible.com/t/awx-cli-problem/2193 "2023-11-07T09:51:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dawid.grygrzc](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@dawid.grygrzc](https://forum.ansible.com/u/dawid.grygrzc)\
**Post date:** [November 7, 2023, 9:51am UTC](https://forum.ansible.com/t/awx-cli-problem/2193/1 "2023-11-07T09:51:56Z")

</div>

Hi all,  
I have some problems with awxkit after some changes in the k8s configuration (SSL has been added). Previously it was working fine, but now it’s not.

awx --conf.host [https://my-domain.com](https://my-domain.com) --conf.username user–conf.password pass --conf.insecure export

I am getting the following error:

```auto
This endpoint raised an error: /api/v2/users/
This endpoint raised an error: /api/v2/organizations/
This endpoint raised an error: /api/v2/teams/
This endpoint raised an error: /api/v2/credential_types/
This endpoint raised an error: /api/v2/credentials/
This endpoint raised an error: /api/v2/notification_templates/
This endpoint raised an error: /api/v2/projects/
This endpoint raised an error: /api/v2/inventories/
This endpoint raised an error: /api/v2/inventory_sources/
This endpoint raised an error: /api/v2/job_templates/
This endpoint raised an error: /api/v2/workflow_job_templates/
This endpoint raised an error: /api/v2/execution_environments/
This endpoint raised an error: /api/v2/applications/
This endpoint raised an error: /api/v2/schedules/
{
     "users": null,
     "organizations": null,
     "teams": null,
     "credential_types": null,
     "credentials": null,
     "notification_templates": null,
     "projects": null,
     "inventory": null,
     "inventory_sources": null,
     "job_templates": null,
     "workflow_job_templates": null,
     "execution_environments": null,
     "applications": null,
     "schedules": null
}

```

Without ‘conf.insecure’:

```auto
Could not establish a secure connection.
Please add your server to your certificate authority.
You can also run this command by specifying -k or --conf.insecure

HTTPSConnectionPool(host='my-domain', port=443): Max retries exceeded with url: /api/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)')))

```

I have also testing the environment (without access over https) where the mentioned commands work fine.

awxkit version - 23.2.0

Any ideas?

---

<div class="post-metadata">

**Author:** ![jbericat](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jbericat/32/627_2.png) [@jbericat](https://forum.ansible.com/u/jbericat)\
**Post date:** [November 7, 2023, 10:20am UTC](https://forum.ansible.com/t/awx-cli-problem/2193/2 "2023-11-07T10:20:46Z")

</div>

Hello @dawid.grygrzc welcome to the Community!

just a quick thought…

```auto
HTTPSConnectionPool(host='my-domain', port=443): Max retries exceeded with url: /api/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)')))

```

I did hit this error a few times in a totally random manner, and I tell you that I got mad trying to workaround these… The last time I saw it, the problem was caused by an intermediate layer 7 firewall (zscaler). Can you double-check that there are no firewalls messing around in between your ansible node and AWX before investigating further?

---

<div class="post-metadata">

**Author:** ![dawid.grygrzc](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@dawid.grygrzc](https://forum.ansible.com/u/dawid.grygrzc)\
**Post date:** [November 8, 2023, 11:31am UTC](https://forum.ansible.com/t/awx-cli-problem/2193/3 "2023-11-08T11:31:33Z")

</div>

Thanks @jbericat for your respond.  
Unfortunately, firewall has been stopped previously.

---

<div class="post-metadata">

**Author:** ![djyasin](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/djyasin/32/114_2.png) [@djyasin](https://forum.ansible.com/u/djyasin)\
**Post date:** [November 8, 2023, 7:47pm UTC](https://forum.ansible.com/t/awx-cli-problem/2193/4 "2023-11-08T19:47:11Z")

</div>

Hello @dawid.grygrzc,

Welcome!! Congratulations on your first post!

We are happy to give you some additional information. There is an environment variable that you can set that sets which cert to look for and use.

```auto
export REQUESTS_CA_BUNDLE=/path/to/your/certificate.pem
python script.py

```

Please let us know if this helps resolve the issue for you!

---

<div class="post-metadata">

**Author:** ![dawid.grygrzc](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@dawid.grygrzc](https://forum.ansible.com/u/dawid.grygrzc)\
**Post date:** [November 14, 2023, 1:33pm UTC](https://forum.ansible.com/t/awx-cli-problem/2193/5 "2023-11-14T13:33:25Z")

</div>

Thanks @djyasin for your sugesstion, but I solved it in another way.

For me below steps works fine:

1. Login via - awx login --conf.host [https://my-domain/](https://my-domain/) --conf.username $USER --conf.password $PASSWORD --conf.insecure
2. Export token generated by upper command (export TOWER\_OAUTH\_TOKEN=$TOKEN)
3. awx --conf.token $TOKEN\_GENERATED\_PREVIOUSLY --conf.username $USER --conf.insecure

---

<div class="post-metadata">

**Author:** ![TheRealHaoLiu](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/therealhaoliu/32/100_2.png) [@TheRealHaoLiu](https://forum.ansible.com/u/TheRealHaoLiu)\
**Post date:** [November 15, 2023, 8:01pm UTC](https://forum.ansible.com/t/awx-cli-problem/2193/6 "2023-11-15T20:01:05Z")

</div>

Hi @dawid.grygrzc glad to see you have found the fix for that issue.

Can you mark this topic as resolved ❤ thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [December 15, 2023, 8:01pm UTC](https://forum.ansible.com/t/awx-cli-problem/2193/7 "2023-12-15T20:01:13Z")

</div>

Closed on December 15, 2023, 8:01pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
