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

az bicep install error #25471

Closed
vinaydevmd opened this issue Feb 15, 2023 · 13 comments
Closed

az bicep install error #25471

vinaydevmd opened this issue Feb 15, 2023 · 13 comments
Assignees
Labels
ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. CXP Attention This issue is handled by CXP team. needs-author-feedback More information is needed from author to address the issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@vinaydevmd
Copy link

Related command

PS C:\Program Files\PowerShell\7> az bicep install
Error while attempting to retrieve the latest Bicep version: HTTPSConnectionPool(host='downloads.bicep.azure.com', port=443): Max retries exceeded with url: /releases/latest (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))).
PS

Resource Provider

bicep

Description of Feature or Work Requested

Getting error while running az bicep install in my office network, whereas its working fine in my personal laptop.
Same version of powershell and azure CLI.
I need help regarding where to fix this issue in my corporate network ?

Minimum API Version Required

2.045

Swagger PR link / SDK link

Getting error while running az bicep install in my office network, whereas its working fine in my personal laptop.
Same version of powershell and azure CLI.
I need help regarding where to fix this issue in my corporate network ?

Request Example

No response

Target Date

2023-02-16

Additional context

Getting error while running az bicep install in my office network, whereas its working fine in my personal laptop.
Same version of powershell and azure CLI.
I need help regarding where to fix this issue in my corporate network ?

@ghost ghost added customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot Installation labels Feb 15, 2023
@ghost ghost assigned jiasli Feb 15, 2023
@ghost ghost added this to the Backlog milestone Feb 15, 2023
@vinaydevmd
Copy link
Author

Bicep is also installed externally but below command is also not working,

az deployment sub create --location eastus --confirm-with-what-if --template-file main.bicep --parameters environmentType='dev'
Error while attempting to retrieve the latest Bicep version: HTTPSConnectionPool(host='downloads.bicep.azure.com', port=443): Max retries exceeded with url: /releases/latest (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))).

@vinaydevmd
Copy link
Author

PS C:\Program Files\PowerShell\7> az bicep install --debug
cli.knack.cli: Command arguments: ['bicep', 'install', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
Enable VT mode.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x033EA388>, <function OutputProducer.on_global_arguments at 0x035B7B20>, <function CLIQuery.on_global_arguments at 0x035D5778>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'bicep': ['azure.cli.command_modules.resource']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: resource 0.042 47 207
cli.azure.cli.core: Total (1) 0.042 47 207
cli.azure.cli.core: Loaded 47 groups, 207 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : bicep install
cli.azure.cli.core: Command table: bicep install
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x04326DF0>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\vinay.dev.azure\commands\2023-02-15.21-34-35.bicep_install.18088.log'.
az_command_data_logger: command args: bicep install --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x04355100>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x043551D8>, <function register_cache_arguments..add_cache_arguments at 0x04363610>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x035B7B68>, <function CLIQuery.handle_query_parameter at 0x035D57C0>, <function register_ids_argument..parse_ids_arguments at 0x043635C8>]
urllib3.connectionpool: Starting new HTTPS connection (1): aka.ms:443
urllib3.connectionpool: https://aka.ms:443 "GET /BicepLatestRelease HTTP/1.1" 301 0
urllib3.connectionpool: Starting new HTTPS connection (1): downloads.bicep.azure.com:443
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\urllib3/connectionpool.py", line 699, in urlopen
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\urllib3/connectionpool.py", line 382, in make_request
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\urllib3/connectionpool.py", line 1010, in validate_conn
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\urllib3/connection.py", line 416, in connect
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\urllib3/util/ssl
.py", line 449, in ssl_wrap_socket
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\urllib3/util/ssl
.py", line 493, in _ssl_wrap_socket_impl
File "ssl.py", line 513, in wrap_socket
File "ssl.py", line 1071, in _create
File "ssl.py", line 1342, in do_handshake
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\requests/adapters.py", line 439, in send
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\urllib3/connectionpool.py", line 755, in urlopen
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\urllib3/util/retry.py", line 574, in increment
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='downloads.bicep.azure.com', port=443): Max retries exceeded with url: /releases/latest (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/resource/_bicep.py", line 178, in get_bicep_latest_release_tag
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\requests/api.py", line 75, in get
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\requests/api.py", line 61, in request
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\requests/sessions.py", line 542, in request
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\requests/sessions.py", line 677, in send
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\requests/sessions.py", line 677, in
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\requests/sessions.py", line 237, in resolve_redirects
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\requests/sessions.py", line 655, in send
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\requests/adapters.py", line 514, in send
requests.exceptions.SSLError: HTTPSConnectionPool(host='downloads.bicep.azure.com', port=443): Max retries exceeded with url: /releases/latest (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 663, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 726, in _run_jobs_serially
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 697, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 333, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/resource/custom.py", line 3648, in install_bicep_cli
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/resource/_bicep.py", line 128, in ensure_bicep_installation
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/resource/_bicep.py", line 182, in get_bicep_latest_release_tag
azure.cli.core.azclierror.ClientRequestError: Error while attempting to retrieve the latest Bicep version: HTTPSConnectionPool(host='downloads.bicep.azure.com', port=443): Max retries exceeded with url: /releases/latest (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))).

cli.azure.cli.core.azclierror: Error while attempting to retrieve the latest Bicep version: HTTPSConnectionPool(host='downloads.bicep.azure.com', port=443): Max retries exceeded with url: /releases/latest (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))).
az_command_data_logger: Error while attempting to retrieve the latest Bicep version: HTTPSConnectionPool(host='downloads.bicep.azure.com', port=443): Max retries exceeded with url: /releases/latest (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (ssl.c:997)'))).
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x04326F10>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 4.729 seconds (init: 1.864, invoke: 2.865)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3584 in cache
telemetry.check: Returns Positive.
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry_init
.pyc C:\Users\vinay.dev.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.

@yonzhan yonzhan added the ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group label Feb 15, 2023
@yonzhan yonzhan added CXP Attention This issue is handled by CXP team. and removed Installation labels Feb 15, 2023
@ghost
Copy link

ghost commented Feb 15, 2023

Thank you for your feedback. This has been routed to the support team for assistance.

@yonzhan
Copy link
Collaborator

yonzhan commented Feb 15, 2023

route to CXP team

@navba-MSFT
Copy link
Contributor

@vinaydevmd Thanks for reaching out to us and reporting this issue. Could you please follow the steps mentioned in the below article depending on your environment to install the bicep CLI ? Hope this helps.

@navba-MSFT navba-MSFT self-assigned this Feb 17, 2023
@navba-MSFT navba-MSFT added the needs-author-feedback More information is needed from author to address the issue. label Feb 17, 2023
@navba-MSFT
Copy link
Contributor

@vinaydevmd I wanted to do quick follow-up to check if you had a chance to look at my above comment. Please let us know if you had any updates on this. Awaiting your reply.

@vinaydevmd
Copy link
Author

vinaydevmd commented Feb 21, 2023 via email

@ghost ghost added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-author-feedback More information is needed from author to address the issue. labels Feb 21, 2023
@navba-MSFT
Copy link
Contributor

Sure @vinaydevmd.

@navba-MSFT navba-MSFT added needs-author-feedback More information is needed from author to address the issue. and removed needs-team-attention This issue needs attention from Azure service team or SDK team labels Feb 21, 2023
@vinaydevmd
Copy link
Author

@navba-MSFT - I followed your steps to install on windows node, bicep will install and it works fine. but still the command az bicep calls still failes with same SSL issue.

I finally figured it out to set and environmental variable "AZURE_CLI_DISABLE_CONNECTION_VERIFICATION" set to "1" then run the az bicep install command, now it ran well with warning!! as shown below

cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x032C7BF8>, <function CLIQuery.handle_query_parameter at 0x032E5850>, <function register_ids_argument..parse_ids_arguments at 0x04072658>]
urllib3.connectionpool: Starting new HTTPS connection (1): aka.ms:443
D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\urllib3/connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'aka.ms'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
urllib3.connectionpool: https://aka.ms:443 "GET /BicepLatestRelease HTTP/1.1" 301 0
urllib3.connectionpool: Starting new HTTPS connection (1): downloads.bicep.azure.com:443
D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\urllib3/connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'downloads.bicep.azure.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
urllib3.connectionpool: https://downloads.bicep.azure.com:443 "GET /releases/latest HTTP/1.1" 200 37694
Installing Bicep CLI v0.14.46...
Successfully installed Bicep CLI to "C:\Users\vinay.dev.azure\bin\bicep.exe".

Can you help me what really blocking in my corporate network ? , so it helps me to fix the root cause.

@ghost ghost added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-author-feedback More information is needed from author to address the issue. labels Feb 21, 2023
@navba-MSFT
Copy link
Contributor

navba-MSFT commented Feb 23, 2023

@vinaydevmd Thanks for your reply. I am glad that you are able to install bicep. For the Azure CLI to work behind a proxy refer this article. https://learn.microsoft.com/en-us/cli/azure/use-cli-effectively?tabs=bash%2Cbash2#work-behind-a-proxy

For Linux environment, refer this.
For Windows environment refer this.

Please ensure that all the AzCLI endpoints are whitelisted for proxy bypass: https://learn.microsoft.com/en-us/cli/azure/azure-cli-endpoints?tabs=azure-cloud

Hope this helps.

@navba-MSFT navba-MSFT removed needs-team-attention This issue needs attention from Azure service team or SDK team feature-request labels Feb 23, 2023
@navba-MSFT navba-MSFT added question The issue doesn't require a change to the product in order to be resolved. Most issues start as that needs-author-feedback More information is needed from author to address the issue. labels Feb 23, 2023
@navba-MSFT
Copy link
Contributor

@vinaydevmd I wanted to do quick follow-up to check if you had a chance to look at my above comment. Please let us know if you had any updates on this. Awaiting your reply.

@navba-MSFT
Copy link
Contributor

@vinaydevmd The action is pending on you to follow the above suggestions and check if that helps. If you need any further assistance on this issue in future, please feel free to reopen this thread. We would be happy to help.

@dean-azure
Copy link

I am having the same issue still. I tried the workarounds in this post

#25471 (comment)

But I still cannot get bicep to install locally and we are not using any proxy servers of any kind. My co-workers are able to execute

az bicep install

without issue. I am able to install using the same on my personal laptop but on my work laptop where I need it most, i continue to get the error

az bicep install
Error while attempting to retrieve the latest Bicep version: HTTPSConnectionPool(host='aka.ms', port=443): Max retries exceeded with url: /BicepLatestRelease (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1006)'))).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. CXP Attention This issue is handled by CXP team. needs-author-feedback More information is needed from author to address the issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

5 participants