Open rohank-proarch opened 4 years ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ahmedelnably, @fabiocav.
thanks for reporting, routing to appropriate team
@rohank-proarch Can you please share with us the error message as well as your app name? Thanks. https://github.com/Azure/azure-functions-host/wiki/Sharing-Your-Function-App-name-privately
App Name: pa-dw-funcapp-dev.azurewebsites.net Error Message: WARNING: Setting SCM_DO_BUILD_DURING_DEPLOYMENT to false WARNING: Waiting SCM site to be updated with the latest app settings ERROR: The command failed with an unexpected error. Here is the traceback:
ERROR: HTTPSConnectionPool(host='pa-dw-funcapp-dev.scm.azurewebsites.net', port=443): Read timed out. (read timeout=3)
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/opt/az/lib/python3.6/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 641, in urlopen _stacktrace=sys.exc_info()[2]) File "/opt/az/lib/python3.6/site-packages/urllib3/util/retry.py", line 368, in increment raise six.reraise(type(error), error, _stacktrace) File "/opt/az/lib/python3.6/site-packages/urllib3/packages/six.py", line 686, in reraise raise value File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 603, in urlopen chunked=chunked) File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 389, in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 307, in _raise_timeout raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value) urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='pa-dw-funcapp-dev.scm.azurewebsites.net', port=443): Read timed out. (read timeout=3)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 206, in invoke cmd_result = self.invocation.execute(args) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 608, in execute raise ex File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 666, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 659, in _run_job six.reraise(sys.exc_info()) File "/opt/az/lib/python3.6/site-packages/six.py", line 693, in reraise raise value File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 636, in _run_job result = cmd_copy(params) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 306, in call return self.handler(args, kwargs) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/init.py", line 493, in default_command_handler return op(command_args) File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/custom.py", line 335, in enable_zip_deploy_functionapp remove_remote_build_app_settings(cmd, resource_group_name, name, slot) File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/custom.py", line 467, in remove_remote_build_app_settings should_contain=app_settings_should_contain) File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/custom.py", line 805, in validate_app_settings_in_scm scm_settings = _get_app_settings_from_scm(cmd, resource_group_name, name, slot) File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/utils.py", line 62, in call raise exception File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/utils.py", line 58, in call return func(*args, kwargs) File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/custom.py", line 834, in _get_app_settings_from_scm response = requests.get(settings_url, headers=headers, auth=(username, password), timeout=3) File "/opt/az/lib/python3.6/site-packages/requests/api.py", line 75, in get return request('get', url, params=params, kwargs) File "/opt/az/lib/python3.6/site-packages/requests/api.py", line 60, in request return session.request(method=method, url=url, kwargs) File "/opt/az/lib/python3.6/site-packages/requests/sessions.py", line 533, in request resp = self.send(prep, send_kwargs) File "/opt/az/lib/python3.6/site-packages/requests/sessions.py", line 646, in send r = adapter.send(request, **kwargs) File "/opt/az/lib/python3.6/site-packages/requests/adapters.py", line 529, in send raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='pa-dw-funcapp-dev.scm.azurewebsites.net', port=443): Read timed out. (read timeout=3)
Looks like the app was still restarting after changing the app setting when you started the deployment command. Can you either wait until the restart completes or change the setting after deployment is complete?
Even if I update the appsettings later after deployment it fails with same error. It started to fail after azure cli was updated to latest version on azure DevOps hosted agent
We are also seeing this issue on both v2.2.0 and v2.3.1 when deploying function apps. Last successful deployment was on v2.1.0
Also getting this issue when used from our yaml pipeline - very strange.
We actually switched to using Azure CLI for deploying functions from using the AzureFunctionApp@01 task in yaml due to a separate bug - only to find that we're faced with this issue!
I have a very similar issue, is there any consistently working way of deploying Azure functions through the CLI?
Having the same issue. Also found this SO question which describes similar situation: https://stackoverflow.com/questions/60770160/azure-function-deployment-failed-with-azure-cli-2-2-0-updates-in-azure-pipeline
Reported here as well https://github.com/Azure/azure-cli/issues/13655
Describe the bug
When deploying a .net core function app to Azure Functions on Windows App Service Plan, the deployment fails if it requires changes in app settings.
There's a race condition here:
To Reproduce
Expected behavior
The deployment should succeed.
Environment summary
DevOps Hosted Agent: Ubuntu 16.04 Azure CLI Task Shell Type: bash CLI Version: azure-cli 2.2.0
command-modules-nspkg 2.0.3 core 2.2.0 nspkg 3.0.4 telemetry 1.0.4
Extensions: azure-devops 0.17.0
Python location '/opt/az/bin/python3' Extensions directory '/opt/az/azcliextensions'
Python (Linux) 3.6.5 (default, Mar 6 2020, 14:41:35) [GCC 5.4.0 20160609]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context