Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support active Debian/Ubuntu distributions from Wheezy up #3720

Closed
ejizba opened this issue Jun 14, 2017 · 50 comments · Fixed by #5470
Closed

Support active Debian/Ubuntu distributions from Wheezy up #3720

ejizba opened this issue Jun 14, 2017 · 50 comments · Fixed by #5470
Assignees
Milestone

Comments

@ejizba
Copy link

ejizba commented Jun 14, 2017

We install the azure cli on an Ubuntu 14.04 VM using apt-get in some of our automation scenarios and we started getting a new error yesterday. After running az login, we see this:

Please ensure you have network connection. Error detail: Can't connect to HTTPS URL because the SSL module is not available.

For reference this is how we install the cli:

sudo apt-get update && sudo apt-get install -y libssl-dev libffi-dev python-dev
echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/azure-cli/ wheezy main" | sudo tee /etc/apt/sources.list.d/azure-cli.list
sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
sudo apt-get install -y apt-transport-https
sudo apt-get -y update && sudo apt-get install -y azure-cli

Like I said, we do this in automation (aka it's a clean VM every time) and we haven't changed anything about how we install the CLI. I tried interactively installing with the https://aka.ms/InstallAzureCli command and did not reproduce this error.

@troydai
Copy link
Contributor

troydai commented Jun 14, 2017

@EricJizbaMSFT what's the version of the azure-cli did you get?

@ejizba
Copy link
Author

ejizba commented Jun 14, 2017

azure-cli (2.0.8)

acr (2.0.6)
acs (2.0.8)
appservice (0.1.8)
batch (3.0.1)
billing (0.1.1)
cdn (0.0.4)
cloud (2.0.4)
cognitiveservices (0.1.4)
command-modules-nspkg (2.0.0)
component (2.0.5)
configure (2.0.8)
consumption (0.1.1)
core (2.0.8)
cosmosdb (0.1.8)
dla (0.0.8)
dls (0.0.8)
feedback (2.0.4)
find (0.2.4)
interactive (0.3.4)
iot (0.1.7)
keyvault (2.0.6)
lab (0.0.6)
monitor (0.0.6)
network (2.0.8)
nspkg (3.0.0)
profile (2.0.6)
rdbms (0.0.3)
redis (0.2.5)
resource (2.0.8)
role (2.0.6)
sf (1.0.3)
sql (2.0.5)
storage (2.0.8)
vm (2.0.8)

Python (Linux) 3.6.1 (default, Jun 13 2017, 22:00:28)
[GCC 5.4.0 20160609]

Python location '/opt/az/bin/python3'

@troydai
Copy link
Contributor

troydai commented Jun 14, 2017

Thank you @EricJizbaMSFT, I'm looking into this.

@ejizba
Copy link
Author

ejizba commented Jun 14, 2017

On my Ubuntu 14.04 VM where I ran the interactive install script (aka where the issue did not repro), I noticed the python version looks different. Not sure if that matters:

Python (Linux) 2.7.6 (default, Oct 26 2016, 20:30:19)
[GCC 4.8.4]

Python location '/home/erijiz/lib/azure-cli/bin/python'

@troydai
Copy link
Contributor

troydai commented Jun 14, 2017

I'm on a Mint 18, and it works. I'll provision a Ubuntu 14 VM and give it a try.

@derekbekoe
Copy link
Member

I can repro on Ubuntu 14.04

@troydai troydai self-assigned this Jun 14, 2017
@troydai
Copy link
Contributor

troydai commented Jun 14, 2017

It seems to be an issue specific to Ubuntu 14.04. I'm rebuilding the package on Ubuntu 14.04.

@troydai
Copy link
Contributor

troydai commented Jun 14, 2017

I just republish a deb package to our repository. It will take a few minutes to take effect.

@troydai
Copy link
Contributor

troydai commented Jun 14, 2017

@EricJizbaMSFT I republished the package and tested on Ubuntu 14.04. It's working now. Please make sure you clean the apt-get cache before reinstall the azure-cli. Thank you for reporting the issue and sorry for the inconvenience.

@ejizba
Copy link
Author

ejizba commented Jun 15, 2017

Yep working for me now - thank you!

@ejizba ejizba closed this as completed Jun 15, 2017
@benalbrecht
Copy link

I have the exact same issue on debian stretch.
az --version:

azure-cli (2.0.8)

acr (2.0.6)
acs (2.0.8)
appservice (0.1.8)
batch (3.0.1)
billing (0.1.1)
cdn (0.0.4)
cloud (2.0.4)
cognitiveservices (0.1.4)
command-modules-nspkg (2.0.0)
component (2.0.5)
configure (2.0.8)
consumption (0.1.1)
core (2.0.8)
cosmosdb (0.1.8)
dla (0.0.8)
dls (0.0.8)
feedback (2.0.4)
find (0.2.4)
interactive (0.3.4)
iot (0.1.7)
keyvault (2.0.6)
lab (0.0.6)
monitor (0.0.6)
network (2.0.8)
nspkg (3.0.0)
profile (2.0.6)
rdbms (0.0.3)
redis (0.2.5)
resource (2.0.8)
role (2.0.6)
sf (1.0.3)
sql (2.0.5)
storage (2.0.8)
vm (2.0.8)

Python (Linux) 3.6.1 (default, Jun 14 2017, 11:33:22) 
[GCC 4.8.4]

Python location '/opt/az/bin/python3'

@qwazer
Copy link

qwazer commented Jun 28, 2017

The same issue with Debian Stretch

azure-cli (2.0.9)

acr (2.0.7)
acs (2.0.9)
appservice (0.1.9)
batch (3.0.2)
billing (0.1.2)
cdn (0.0.5)
cloud (2.0.5)
cognitiveservices (0.1.5)
command-modules-nspkg (2.0.0)
component (2.0.6)
configure (2.0.9)
consumption (0.1.2)
core (2.0.10)
cosmosdb (0.1.9)
dla (0.0.9)
dls (0.0.9)
feedback (2.0.5)
find (0.2.5)
interactive (0.3.5)
iot (0.1.8)
keyvault (2.0.7)
lab (0.0.7)
monitor (0.0.7)
network (2.0.9)
nspkg (3.0.0)
profile (2.0.7)
rdbms (0.0.4)
redis (0.2.6)
resource (2.0.9)
role (2.0.7)
sf (1.0.4)
sql (2.0.6)
storage (2.0.9)
vm (2.0.9)

Python (Linux) 3.6.1 (default, Jun 22 2017, 12:11:55) 
[GCC 4.8.4]

Python location '/opt/az/bin/python3

@troydai
Copy link
Contributor

troydai commented Jun 28, 2017

@qwazer and @benalbrecht thanks for reporting. Debian Stretch is very new, we haven't tested on it yet. We have an issue tracking this #3863. Please follow that issue.

@Elexy
Copy link

Elexy commented Aug 15, 2017

I am on stretch as well and can't seem to get it to work. I get the same error:
~$ az login Please ensure you have network connection. Error detail: HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: /common/oauth2/devicecode?api-version=1.0 (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",))

~$ az --version
azure-cli (2.0.13)

acr (2.0.10)
acs (2.0.12)
appservice (0.1.12)
batch (3.1.1)
billing (0.1.3)
cdn (0.0.6)
cloud (2.0.7)
cognitiveservices (0.1.6)
command-modules-nspkg (2.0.1)
component (2.0.7)
configure (2.0.10)
consumption (0.1.3)
container (0.1.8)
core (2.0.13)
cosmosdb (0.1.11)
dla (0.0.10)
dls (0.0.12)
eventgrid (0.1.1)
feedback (2.0.6)
find (0.2.6)
interactive (0.3.7)
iot (0.1.10)
keyvault (2.0.8)
lab (0.0.9)
monitor (0.0.8)
network (2.0.12)
nspkg (3.0.1)
profile (2.0.10)
rdbms (0.0.5)
redis (0.2.7)
resource (2.0.12)
role (2.0.10)
sf (1.0.6)
sql (2.0.9)
storage (2.0.12)
vm (2.0.12)

Python (Linux) 3.6.1 (default, Aug 11 2017, 17:14:09)
[GCC 4.8.4]

Python location '/opt/az/bin/python3'

@awilhelmer
Copy link

I get this error too on the official Jenkins Docker image. Azure CLI installed with apt-get described in the docs.

az --version
azure-cli (2.0.14)

acr (2.0.10)
acs (2.0.13)
appservice (0.1.13)
batch (3.1.1)
billing (0.1.3)
cdn (0.0.6)
cloud (2.0.7)
cognitiveservices (0.1.6)
command-modules-nspkg (2.0.1)
component (2.0.7)
configure (2.0.10)
consumption (0.1.3)
container (0.1.8)
core (2.0.13)
cosmosdb (0.1.11)
dla (0.0.10)
dls (0.0.12)
eventgrid (0.1.2)
feedback (2.0.6)
find (0.2.6)
interactive (0.3.7)
iot (0.1.10)
keyvault (2.0.8)
lab (0.0.9)
monitor (0.0.8)
network (2.0.12)
nspkg (3.0.1)
profile (2.0.10)
rdbms (0.0.5)
redis (0.2.7)
resource (2.0.12)
role (2.0.10)
sf (1.0.6)
sql (2.0.9)
storage (2.0.12)
vm (2.0.12)

Python (Linux) 3.6.1 (default, Aug 15 2017, 23:11:30)
[GCC 4.8.4]

Python location '/opt/az/bin/python3'

@cobordism
Copy link

same error with PureOS

@cobordism
Copy link

same error on PureOS
using deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ wheezy main

@JeremyLoy
Copy link

Can confirm that this is still a problem when using a custom Docker image based on Ubuntu 14.04.

Fails when installed with apt-get. Succeeds when installed via curl.

@troydai
Copy link
Contributor

troydai commented Nov 2, 2017

@derekbekoe ?

@derekbekoe
Copy link
Member

Related #4360

@derekbekoe
Copy link
Member

If anyone has steps to reproduce this, it would be useful:

$ docker run -it ubuntu:14.04 bash
# history
    1  apt-get update && apt-get install apt-transport-https
    2  apt-key adv --keyserver packages.microsoft.com --recv-keys 52E16F86FEE04B979B07E28DB02C46DF417A0893
    3  apt-get update && apt-get install azure-cli
    4  az login

I tried the following and was able to log in fine.

@derekbekoe derekbekoe reopened this Nov 3, 2017
@Gutek
Copy link

Gutek commented Nov 16, 2017

i'm having this issue with latest ubuntu shell for windows. basically i can't set login:

Please ensure you have network connection. Error detail: HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: /common/oauth2/devicecode?api-version=1.0 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f19559fdeb8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))

@sptramer
Copy link
Contributor

@derekbekoe Is apt-transport-https considered required for installation of the key on Ubuntu systems? This may be a missing requirement in some of our install instructions.

@derekbekoe
Copy link
Member

@sptramer We already document it for the apt-get install. I'm not aware of it being required elsewhere.

@sptramer
Copy link
Contributor

You're correct,it's just that the order is different. I'm not sure that it matters in this case, depending on how apt performs key transfer.

@Katana-Steel
Copy link

Katana-Steel commented Nov 27, 2017

looks like the apt-get install version comes with python3 the note on the apt-get install page,
seems unrelated and the python version installed with azure-cli is missing the ssl module:

# /opt/az/bin/python3 -m pip install gnutls
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting gnutls
  Could not fetch URL https://pypi.python.org/simple/gnutls/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
  Could not find a version that satisfies the requirement gnutls (from versions: )
No matching distribution found for gnutls
$ az --version
azure-cli (2.0.21)

acr (2.0.15)
acs (2.0.19)
appservice (0.1.20)
backup (1.0.3)
batch (3.1.7)
batchai (0.1.3)
billing (0.1.6)
cdn (0.0.10)
cloud (2.0.10)
cognitiveservices (0.1.9)
command-modules-nspkg (2.0.1)
component (2.0.8)
configure (2.0.12)
consumption (0.1.6)
container (0.1.13)
core (2.0.21)
cosmosdb (0.1.15)
dla (0.0.15)
dls (0.0.18)
eventgrid (0.1.5)
extension (0.0.6)
feedback (2.0.6)
find (0.2.7)
interactive (0.3.11)
iot (0.1.14)
keyvault (2.0.14)
lab (0.0.13)
monitor (0.0.12)
network (2.0.18)
nspkg (3.0.1)
profile (2.0.15)
rdbms (0.0.9)
redis (0.2.10)
reservations (0.1.0)
resource (2.0.18)
role (2.0.14)
servicefabric (0.0.6)
sql (2.0.15)
storage (2.0.19)
vm (2.0.18)

Python location '/opt/az/bin/python3'
Extensions directory '/home/user/.azure/cliextensions'

Python (Linux) 3.6.1 (default, Nov 10 2017, 16:23:17) 
[GCC 4.8.4]

Legal docs and information: aka.ms/AzureCliLegal

$ python --version
Python 2.7.14
$ python3 --version
Python 3.6.3
$ az --debug login
Command arguments ['login']
Loading all installed modules as module with name 'login' not found.
Installed command modules ['acr', 'acs', 'appservice', 'backup', 'batch', 'batchai', 'billing', 'cdn', 'cloud', 'cognitiveservices', 'component', 'configure', 'consumption', 'container', 'cosmosdb', 'dla', 'dls', 'eventgrid', 'extension', 'feedback', 'find', 'interactive', 'iot', 'keyvault', 'lab', 'monitor', 'network', 'profile', 'rdbms', 'redis', 'reservations', 'resource', 'role', 'servicefabric', 'sql', 'storage', 'vm']
Current cloud config:
{'endpoints': {'active_directory': 'https://login.microsoftonline.com',
               'active_directory_data_lake_resource_id': 'https://datalake.azure.net/',
               'active_directory_graph_resource_id': 'https://graph.windows.net/',
               'active_directory_resource_id': 'https://management.core.windows.net/',
               'batch_resource_id': 'https://batch.core.windows.net/',
               'gallery': 'https://gallery.azure.com/',
               'management': 'https://management.core.windows.net/',
               'resource_manager': 'https://management.azure.com/',
               'sql_management': 'https://management.core.windows.net:8443/',
               'vm_image_alias_doc': 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json'},
 'is_active': True,
 'name': 'AzureCloud',
 'profile': 'latest',
 'suffixes': {'azure_datalake_analytics_catalog_and_job_endpoint': 'azuredatalakeanalytics.net',
              'azure_datalake_store_file_system_endpoint': 'azuredatalakestore.net',
              'keyvault_dns': '.vault.azure.net',
              'sql_server_hostname': '.database.windows.net',
              'storage_endpoint': 'core.windows.net'}}
Registered application event handler 'CommandTableParams.Loaded' at <function add_id_parameters at 0x7f0d947a1400>
Registered application event handler 'CommandTable.Loaded' at <function add_id_parameters at 0x7f0d947a1400>
Loaded module 'acr' in 0.007 seconds.
Loaded module 'acs' in 0.001 seconds.
Registered application event handler 'CommandParser.Parsing' at <function deprecate at 0x7f0d94745510>
Loaded module 'appservice' in 0.011 seconds.
Loaded module 'backup' in 0.001 seconds.
Loaded module 'batch' in 0.027 seconds.
Loaded module 'batchai' in 0.001 seconds.
Loaded module 'billing' in 0.003 seconds.
Loaded module 'cdn' in 0.003 seconds.
Loaded module 'cloud' in 0.001 seconds.
Loaded module 'cognitiveservices' in 0.001 seconds.
Loaded module 'component' in 0.001 seconds.
Loaded module 'configure' in 0.000 seconds.
Loaded module 'consumption' in 0.001 seconds.
Loaded module 'container' in 0.001 seconds.
Registered application event handler 'CommandParser.Parsing' at <function deprecate at 0x7f0d94676840>
Loaded module 'cosmosdb' in 0.015 seconds.
Loaded module 'dla' in 0.002 seconds.
Loaded module 'dls' in 0.001 seconds.
Loaded module 'eventgrid' in 0.001 seconds.
Loaded module 'extension' in 0.001 seconds.
Loaded module 'feedback' in 0.001 seconds.
Loaded module 'find' in 0.000 seconds.
Loaded module 'interactive' in 0.001 seconds.
Loaded module 'iot' in 0.002 seconds.
Loaded module 'keyvault' in 0.002 seconds.
Loaded module 'lab' in 0.001 seconds.
Loaded module 'monitor' in 0.006 seconds.
Loaded module 'network' in 0.024 seconds.
Loaded module 'profile' in 0.001 seconds.
Loaded module 'rdbms' in 0.002 seconds.
Loaded module 'redis' in 0.001 seconds.
Loaded module 'reservations' in 0.003 seconds.
Loaded module 'resource' in 0.003 seconds.
Loaded module 'role' in 0.001 seconds.
Loaded module 'servicefabric' in 0.001 seconds.
Loaded module 'sql' in 0.003 seconds.
Loaded module 'storage' in 0.017 seconds.
Loaded module 'vm' in 0.005 seconds.
Loaded all modules in 0.150 seconds. (note: there's always an overhead with the first module loaded)
Extensions directory: '/home/user/.azure/cliextensions'
Application event 'CommandTable.Loaded' with event data {'command_table': {'login': <azure.cli.core.commands.CliCommand object at 0x7f0d94553898>}}
Application event 'CommandParser.Loaded' with event data {'parser': AzCliCommandParser(prog='az', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)}
Application event 'CommandTableParams.Loaded' with event data {'command_table': {'login': <azure.cli.core.commands.CliCommand object at 0x7f0d94553898>}}
Application event 'CommandParser.Parsing' with event data {'argv': ['login']}
Application event 'CommandParser.Parsed' with event data {'command': 'login', 'args': Namespace(_command_package='login', _jmespath_query=None, _log_verbosity_debug=False, _log_verbosity_verbose=False, _output_format='json', _parser=AzCliCommandParser(prog='az login', usage=None, description='Log in to access Azure subscriptions', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True), _validators=[], allow_no_subscriptions=False, command='login', func=<azure.cli.core.commands.CliCommand object at 0x7f0d945538 [...]
attempting to read file /home/rkjellerup/.azure/accessTokens.json as utf-8-sig
adal-python : b97082b5-2d91-45f1-b36e-1269d0df6c3f - Authority:Performing instance discovery: https://login.microsoftonline.com/common
adal-python : b97082b5-2d91-45f1-b36e-1269d0df6c3f - Authority:Performing static instance discovery
adal-python : b97082b5-2d91-45f1-b36e-1269d0df6c3f - Authority:Authority validated via static instance discovery
adal-python : b97082b5-2d91-45f1-b36e-1269d0df6c3f - CodeRequest:Getting user code info.
urllib3.connectionpool : Starting new HTTPS connection (1): login.microsoftonline.com
adal-python : b97082b5-2d91-45f1-b36e-1269d0df6c3f - OAuth2Client:Get Device Code request failed
Please ensure you have network connection. Error detail: HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: /common/oauth2/devicecode?api-version=1.0 (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",))

also looks like this process hangs in the background using 100% CPU of 1 core

/opt/az/bin/python3 /opt/az/lib/python3.6/site-packages/azure/cli/core/telemetry_upload.py

@derekbekoe
Copy link
Member

For all running into issues please provide the following for us to investigate:

  • Install method (looks like this is isolated to the .deb package only?)
  • the CLI version az --version. Just the first line is fine.
  • Ubuntu/Debian version for us to investigate (e.g. Ubuntu 17.10, Ubuntu 16.04.3 LTS, Ubuntu 16.04.2 LTS, Ubuntu 16.04.1 LTS, Ubuntu 16.04 LTS) lsb_release -a
  • openssl version on machine openssl version -v

@derekbekoe derekbekoe assigned derekbekoe and unassigned troydai Jan 23, 2018
@derekbekoe derekbekoe added this to the Sprint 31 milestone Jan 23, 2018
@andrewb-ms
Copy link

I am having the issue in Debian (Azure Image!), yes.

Here is the info you asked for:

$ az --version
azure-cli (2.0.24)

acr (2.0.18)
acs (2.0.23)
advisor (0.1.1)
appservice (0.1.23)
backup (1.0.4)
batch (3.1.8)
batchai (0.1.4)
billing (0.1.7)
cdn (0.0.11)
cloud (2.0.11)
cognitiveservices (0.1.10)
command-modules-nspkg (2.0.1)
configure (2.0.13)
consumption (0.2.1)
container (0.1.16)
core (2.0.24)
cosmosdb (0.1.16)
dla (0.0.16)
dls (0.0.19)
eventgrid (0.1.7)
extension (0.0.7)
feedback (2.0.7)
find (0.2.8)
interactive (0.3.12)
iot (0.1.16)
keyvault (2.0.16)
lab (0.0.14)
monitor (0.0.14)
network (2.0.20)
nspkg (3.0.1)
profile (2.0.17)
rdbms (0.0.10)
redis (0.2.11)
reservations (0.1.1)
resource (2.0.20)
role (2.0.16)
servicefabric (0.0.8)
sql (2.0.18)
storage (2.0.22)
vm (2.0.23)

Python location '/opt/az/bin/python3'
Extensions directory '/home/adm101/.azure/cliextensions'

Python (Linux) 3.6.1 (default, Jan 5 2018, 21:18:08)
[GCC 4.8.4]

Legal docs and information: aka.ms/AzureCliLegal

$ cat /etc/issue
Debian GNU/Linux 9 \n \l

$ openssl version -v
OpenSSL 1.0.2l 25 May 2017

@eric-wu
Copy link

eric-wu commented Jan 23, 2018

Both 2.0.24 and 2.0.25 are failing on Debian 4.9.65-3+deb9u2 (2018-01-04) x86_64.

azure-cli (2.0.24):

acr (2.0.18)
acs (2.0.23)
advisor (0.1.1)
appservice (0.1.23)
backup (1.0.4)
batch (3.1.8)
batchai (0.1.4)
billing (0.1.7)
cdn (0.0.11)
cloud (2.0.11)
cognitiveservices (0.1.10)
command-modules-nspkg (2.0.1)
configure (2.0.13)
consumption (0.2.1)
container (0.1.16)
core (2.0.24)
cosmosdb (0.1.16)
dla (0.0.16)
dls (0.0.19)
eventgrid (0.1.7)
extension (0.0.7)
feedback (2.0.7)
find (0.2.8)
interactive (0.3.12)
iot (0.1.16)
keyvault (2.0.16)
lab (0.0.14)
monitor (0.0.14)
network (2.0.20)
nspkg (3.0.1)
profile (2.0.17)
rdbms (0.0.10)
redis (0.2.11)
reservations (0.1.1)
resource (2.0.20)
role (2.0.16)
servicefabric (0.0.8)
sql (2.0.18)
storage (2.0.22)
vm (2.0.23)

Python location '/opt/az/bin/python3'
Extensions directory '/home/ewu/.azure/cliextensions'

Python (Linux) 3.6.1 (default, Jan  5 2018, 21:18:08) 
[GCC 4.8.4]

azure-cli (2.0.25):

acr (2.0.19)
acs (2.0.24)
advisor (0.1.1)
appservice (0.1.24)
backup (1.0.6)
batch (3.1.8)
batchai (0.1.4)
billing (0.1.7)
cdn (0.0.11)
cloud (2.0.11)
cognitiveservices (0.1.10)
command-modules-nspkg (2.0.1)
configure (2.0.13)
consumption (0.2.1)
container (0.1.16)
core (2.0.25)
cosmosdb (0.1.16)
dla (0.0.17)
dls (0.0.19)
eventgrid (0.1.8)
extension (0.0.7)
feedback (2.0.8)
find (0.2.8)
interactive (0.3.13)
iot (0.1.16)
keyvault (2.0.16)
lab (0.0.15)
monitor (0.1.0)
network (2.0.21)
nspkg (3.0.1)
profile (2.0.17)
rdbms (0.0.11)
redis (0.2.11)
reservations (0.1.1)
resource (2.0.21)
role (2.0.17)
servicefabric (0.0.9)
sql (2.0.19)
storage (2.0.23)
vm (2.0.24)

Python location '/opt/az/bin/python3'
Extensions directory '/home/ewu/.azure/cliextensions'

Python (Linux) 3.6.1 (default, Jan 12 2018, 17:31:35) 
[GCC 4.8.4]
$ cat /etc/issue

Debian GNU/Linux 9 \n \l

$ openssl version -v

OpenSSL 1.0.2n  7 Dec 2017

@derekbekoe
Copy link
Member

@eric-wu please provide the output of.
$ cat /etc/issue
$ openssl version -v

@JeremyLoy
Copy link

Notes from a working version (Ubuntu 14.04 Docker):

  • python3 is not installed globally, the version included with az-cli is used.
  • I had to change the order of installation commands slightly from these MS Docs. I had to apt-get update twice, and I had to install apt-transport-https first.

Ubuntu:14.04 Docker image

docker run -it ubuntu:14.04 /bin/bash

Install Method

$ apt-get update
$ apt-get install apt-transport-https
$ echo "deb https://packages.microsoft.com/repos/azure-cli/ wheezy main" | tee /etc/apt/sources.list.d/azure-cli.list
$ apt-key adv --keyserver packages.microsoft.com --recv-keys 52E16F86FEE04B979B07E28DB02C46DF417A0893
$ apt-get update
$ apt-get install azure-cli

AZ Version

root@eb3bbc8830bb:/# az --version azure-cli (2.0.25)

acr (2.0.19)
acs (2.0.24)
advisor (0.1.1)
appservice (0.1.24)
backup (1.0.6)
batch (3.1.8)
batchai (0.1.4)
billing (0.1.7)
cdn (0.0.11)
cloud (2.0.11)
cognitiveservices (0.1.10)
command-modules-nspkg (2.0.1)
configure (2.0.13)
consumption (0.2.1)
container (0.1.16)
core (2.0.25)
cosmosdb (0.1.16)
dla (0.0.17)
dls (0.0.19)
eventgrid (0.1.8)
extension (0.0.7)
feedback (2.0.8)
find (0.2.8)
interactive (0.3.13)
iot (0.1.16)
keyvault (2.0.16)
lab (0.0.15)
monitor (0.1.0)
network (2.0.21)
nspkg (3.0.1)
profile (2.0.17)
rdbms (0.0.11)
redis (0.2.11)
reservations (0.1.1)
resource (2.0.21)
role (2.0.17)
servicefabric (0.0.9)
sql (2.0.19)
storage (2.0.23)
vm (2.0.24)

Python location '/opt/az/bin/python3'
Extensions directory '/root/.azure/cliextensions'

Python (Linux) 3.6.1 (default, Jan 12 2018, 17:31:35)
[GCC 4.8.4]

Legal docs and information: aka.ms/AzureCliLegal

Open SSL Version

root@eb3bbc8830bb:/# openssl version -v

OpenSSL 1.0.1f 6 Jan 2014

Release Info

root@eb3bbc8830bb:/# lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description: Ubuntu 14.04.5 LTS

Release: 14.04

Codename: trusty

Python Version

root@eb3bbc8830bb:~# /opt/az/bin/python3 --version Python 3.6.1

@eric-wu
Copy link

eric-wu commented Jan 23, 2018

For those using azure-cli in Debian, a working alternative is to pip install azure-cli:

  1. Install miniconda
  2. Create a conda environment
  3. In the activated conda env, pip install azure-cli

@andrewb-ms
Copy link

andrewb-ms commented Jan 24, 2018

I recommend that the Microsoft team try the following:

(1) Create a Debian VM on Azure (using the public image)
(2) Try to install Azure CLI on it using the Microsoft documentation

This should repro.

(3) Setup gated checkin so that this doesn't happen again

@derekbekoe derekbekoe changed the title Az login fails with OpenSSL error on Ubuntu 14.04 apt-get installation Support active Debian/Ubuntu distributions from Wheezy up Jan 25, 2018
@derekbekoe
Copy link
Member

Here is a temporary .deb for Debian stretch:

curl https://azurecliprod.blob.core.windows.net/release-2-0-25/debian_stretch_azure-cli_2.0.25-1_all.deb -o debian_stretch_azure-cli_2.0.25-1_all.deb
dpkg -i debian_stretch_azure-cli_2.0.25-1_all.deb

For the next CLI release, we plan to publish for Debian 7 (wheezy), 8 (jessie), 9 (stretch) and Ubuntu trusty, xenial and artful.

@iremmats
Copy link

Having same issue on Mac OS X.

azure-cli (2.0.23)
OpenSSL 0.9.8zh 14 Jan 2016

Installed using brew.

@sptramer
Copy link
Contributor

@iremmats If you brew install openssl do you see the same problem? This should install openssl 1.0.2.

@iremmats
Copy link

iremmats commented Jan 30, 2018 via email

@andrewb-ms
Copy link

Cool so when will the fix go out?

@derekbekoe
Copy link
Member

The fix is out.
We have .debs for Ubuntu: trusty, xenial, artful & Debian: wheezy, jessie, stretch.

export AZ_REPO=$(lsb_release -cs)
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | sudo tee /etc/apt/sources.list.d/azure-cli.list

Then follow the rest of the instructions at https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest#install

@andrewb-ms
Copy link

Thanks!

@bureado
Copy link
Member

bureado commented Aug 17, 2018

I use azure-cli on testing. I normally reference xenial in my sources.list but as testing evolved I eventually ran into this issue. For those of us running testing or above, it's going to be really hard to rely on debs until a snap is available. In the meantime, I just go the pip way here:

sudo apt install python3 python3-pip libffi6 libssl1.1 -y
sudo pip3 install azure-cli
sudo sed -i 's/python/python3/' /usr/local/bin/az

All of which seems to be very unsupported.

@bureado
Copy link
Member

bureado commented Feb 16, 2019

For those of us running testing or above, it's going to be really hard to rely on debs until a snap is available

BTW, I did start using the snap and as soon as I did it was outdated in the stable channel so I had to switch to the edge channel so that isn't viable either. I'm now testing the nix overlay for azure-cli and if that doesn't work, there's linuxbrew as of a few weeks ago. None of which is really a substitute for first-party support 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.