azure-cli
azure-cli copied to clipboard
`az webapp deploy` fails because of an SSL error, (incorrectly) suggesting that I'm behind a proxy
This is autogenerated. Please review and update as needed.
Describe the bug
I was following this guide.. https://learn.microsoft.com/en-us/azure/app-service/deploy-zip?tabs=cli
... but I can't deploy an app service because of an SSL error. I'm trying to connect from home, I'm not using a VPN or a proxy. The following two sites were not able to detect a proxy either. https://www.whatismyip.com/proxy-check/ http://whatismyip.network/detect-isp-proxy-tool/
I also tried using a different Wi-Fi. Did not help.
I tried following some tricks from other issues, such as /opt/az/bin/python3 -m pip install pip-system-certs
, but that didn't change anything.
az login
works fine.
python3 -c "import requests;print(requests.get('https://aka.ms/').status_code)"
200
Command Name
az webapp deploy
Errors:
This is what I got the first time:
An error occured during deployment. Status Code: 502, Details: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>502 - Web server received an invalid response while acting as a gateway or proxy server.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>502 - Web server received an invalid response while acting as a gateway or proxy server.</h2>
<h3>There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.</h3>
</fieldset></div>
</div>
</body>
</html>
This is what I've gotten every time since that.
HTTPSConnectionPool(host='{}', port=443): Max retries exceeded with url: /api/publish?type=zip (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2396)')))
Certificate verification failed. This typically happens when using Azure CLI behind a proxy that intercepts traffic with a self-signed certificate. Please add this certificate to the trusted CA bundle. More info: https://docs.microsoft.com/cli/azure/use-cli-effectively#work-behind-a-proxy.
UPDATE: After waiting over the weekend and trying again, I got the first error again.
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
- Put any pre-requisite steps here...
-
az webapp deploy --resource-group {} --name {} --src-path deploy/deploy.zip
NOTE:
-
REQUESTS_CA_BUNDLE=/opt/az/lib/python3.10/site-packages/certifi/cacert.pem az webapp deploy --resource-group {} --name {} --src-path deploy/deploy.zip
doesn't work either.
Expected Behavior
A successful deployment
Environment Summary
Linux-5.19.16-76051916-generic-x86_64-with-glibc2.35, Pop!_OS 22.04 LTS
Python 3.10.5
Installer: DEB
azure-cli 2.41.0
Additional Context
The zip I'm trying to deploy is 300 MiB large. Is it possible that those timeouts are related to that? My colleague has been able to deploy the app service from Visual Studio before, so it shouldn't be a problem.
route to CXP team
Was there any resolution to this? I'm running into the same exact issue.
I was experiencing this too, in my case it was because I had blocked access to the "advanced tool site" in the networking settings of the App Service. The CLI deployment uses that site and needs access to it. Allowing access to the advanced tool site solved the issue for me.
Same issue here. I'm not behind a proxy.
Same issue here, suddenly, using the same deployment scripts I've used for years
We had the same problem and found that by downgrading our azure CLI from 2.48.1
to 2.44.1
caused the problem to go away. YMMV
I hit this 15 hours into 9 days of planned maintenance. 503 errors from other app service endpoints. This is actually making me recommend our client moves away from azure.
https://app.azure.com/h/W_8Y-9Z0/f12051
might be a dup of #26635
closing this as confirmed duplicate of #26635