1

Ok .. so I'm pretty much lost.

Task : execute a successful az login --service-principal -u XXX -p XXX --tenant something.onmicrosoft.com (Or tenant ID)

From A server on the Azure Cloud that has no internet , and no service endpoint connection of any kind to management.azure.com:443

Error :

Error occurred in request., ConnectTimeout: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions?api-version=2016-06-01 (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x7f1f12492250>, 'Connection to management.azure.com timed out. (connect timeout=100)'))
Traceback (most recent call last):
  File "/usr/lib64/az/lib/python2.7/site-packages/knack/cli.py", line 206, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/lib64/az/lib/python2.7/site-packages/azure/cli/core/commands/__init__.py", line 326, in execute
    raise ex
ClientRequestError: Error occurred in request., ConnectTimeout: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions?api-version=2016-06-01 (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x7f1f12492250>, 'Connection to management.azure.com timed out. (connect timeout=100)'))

What I've tried : 1. setting up a HAProxy on another server On Premise and funnel the HTTPS Traffic through it.

What I've noticed : azure cli couldn't be bothered less by a meakly https_proxy env. variable on the shell. It does it'S own thing and does not connect through the proxy .

Question : How can i get the az cli to go thought a proxy ? can I modify the /usr/lib64/az/lib/python2.7/site-packages/knack/cli.py somehow to force it to use the proxy .

I cannot set up a VPN on the on premise server.

I'm open to any ideas ...

Information :

Red Hat Enterprise Linux Server release 7.7 (Maipo)

3.10.0-957.10.1.el7.x86_64 #1 SMP Thu Feb 7 07:12:53 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

az --version

azure-cli                         2.0.72

command-modules-nspkg               2.0.3
core                              2.0.72
nspkg                              3.0.4
telemetry                          1.0.3
Miroot
  • 11

0 Answers0