Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Function Deployment failed with Azure CLI 2.2.0 updates in Azure Pipeline

everything was working fine with azure-cli 2.1.0 With new updates of azure-cli (2.2.0) on Azure Pipeline (with Ubuntu agent) getting an error.      

ERROR: HTTPSConnectionPool(host='****.scm.azurewebsites.net', port=443): Read timed out.

    

running below command

az functionapp deployment source config-zip -g $resourceGroupName -n $functionAppName --src "functionapp.zip"

Exception Details

 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='****.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 "<string>", line 2, in raise_from
   File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 383, in _make_request
     httplib_response = conn.getresponse()
   File "/opt/az/lib/python3.6/http/client.py", line 1331, in getresponse
     response.begin()
   File "/opt/az/lib/python3.6/http/client.py", line 297, in begin
     version, status, reason = self._read_status()
   File "/opt/az/lib/python3.6/http/client.py", line 258, in _read_status
     line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
   File "/opt/az/lib/python3.6/socket.py", line 586, in readinto
     return self._sock.recv_into(b)
   File "/opt/az/lib/python3.6/site-packages/urllib3/contrib/pyopenssl.py", line 317, in recv_into
     raise timeout('The read operation timed out')
 socket.timeout: The read operation timed out
 WARNING: 
 To open an issue, please run: 'az feedback'
 ##[error]Script failed with error: Error: The process '/bin/bash' failed with exit code 1
like image 986
Sagar Kulkarni Avatar asked Nov 06 '22 09:11

Sagar Kulkarni


1 Answers

the app deployment works perfectly fine when you use az webapp instead of az functionapp. This makes this whole issue a bit weirder, but maybe this is helping somebody ;-)

https://github.com/Azure/azure-cli/issues/13655#issuecomment-694102395

like image 151
Raj Kumar Avatar answered Dec 29 '22 12:12

Raj Kumar