My last publish was probably about three weeks ago, today, I changed the code a bit and publish. Then I ran into the error below
Publish has encountered an error. The Publish URL https://functionName.scm.azurewebsites.net/ is unreachable. The application may be stopped, restarting or unavailable. Try again once the publish target is available.
The only similar post I found is suggesting to correct the pubxml field
<PublishUrl>https://waws-prod-<something>.publish.azurewebsites.windows.net/</PublishUrl>
To
<PublishUrl>https://<function-name>.scm.azurewebsites.net/</PublishUrl>
In my case, it is correct already.
If I call the function by HTTP get, it behaves as usual.
I'm relevant new to azure, not sure if I missed something obvious.
Additional remarks
In my case was related to the SCM Basic Auth Publishing Credentials parameter: it should be On to permit Visual Studio to log-in and publish the function app.
You can find this parameter in your Function App under Configuration -> General settings -> SCM Basic Auth Publishing Credentials
Update 20/06/2024
Today I fell again in the same connection error. In our particular case, the functions we are running are scheduled functions. For security reasons we are disabling all inbound traffic and SCM Basic Auth Publishing Credentials and FTP Basic Auth Publishing Credentials as well.
What I did to fix the today's connection error:
After function was published I disabled the SCM parameter and disallowed inbound traffic.
In my case, I didn't realize I had set up IP restrictions as this was a function app I had published a long time ago so obviously my IP had by this point changed. For me, the solution involved:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With