az scripts to stop function app in china cloud fails with cli version 2.48.1

R, Ranjith 1 Reputation point
2023-05-23T09:57:01.26+00:00

Below is the command we are using to get the function app.

az functionapp show `
    --name $($FunctionAppName) `
    --resource-group $($ResourceGroup) `
    --subscription $($SubscriptionId)

it fails with following error with new CLI version

 ERROR: The command failed with an unexpected error. Here is the traceback:
2023-05-22T12:15:37.3679569Z ERROR: HTTPSConnectionPool(host='management.chinacloudapi.cnsubscriptions', port=443): Max retries exceeded with url: /e98eacf8-6841-4b91-95b9-0917297053fa/resourceGroups/lz-rg-ecn-b-questionnaire/providers/Microsoft.Web/sites/lzfnap-ecn-b-bridge?api-version=2022-03-01 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x067EF598>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))
2023-05-22T12:15:37.3684738Z Traceback (most recent call last):
2023-05-22T12:15:37.3685252Z   File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\urllib3/connection.py", line 174, in _new_conn
2023-05-22T12:15:37.3685678Z   File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\urllib3/util/connection.py", line 73, in create_connection
2023-05-22T12:15:37.3686011Z   File "socket.py", line 955, in getaddrinfo
2023-05-22T12:15:37.3686294Z socket.gaierror: [Errno 11001] getaddrinfo failed

and it works as expected in older versions.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
3,018 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MuthuKumaranMurugaachari-MSFT 11,526 Reputation points
    2023-05-23T15:30:02.0133333+00:00

    R, Ranjith Thanks for posting your question in Microsoft Q&A. There is an open issue #26214 with Azure CLI extension which affects both az webapp config and az functionapp and there is a workaround https://github.com/Azure/azure-cli/issues/26214#issuecomment-1545213360 which may help you. I suggest you follow the GitHub issue, and I will also reach out to our product team to take a look at it.

    Sorry for the inconvenience caused by this issue. Let me know if you have any questions.

    0 comments No comments