Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The Publish URL https://waws-prod-am2-xxx.publish.azurewebsites.windows.net/ is unreachable

  • I created a function app on Azure Portal with below configuration.

enter image description here

  • And I created a simple HTTP trigger Function App on VS 2019 version of 16.7.6. The function is working successfuly on local machine. When I want to publish it to Azure, it returns below error;

Publish has encountered an error. The Publish URL https://waws-prod-am2-xxx.publish.azurewebsites.windows.net/ is unreachable. The application may be stopped, restarting or unavailable. Try again once the publish target is available.

  • The publishing summary is;

enter image description here

When I check the publish profile on VS (.pubxml file), I see the line

<PublishUrl>https://waws-prod-am2-311.publish.azurewebsites.windows.net/</PublishUrl>

But it should be

<PublishUrl>http://myfuncappdss.scm.azurewebsites.net</PublishUrl>

I change it manually and there is any other error that is not detected

Publish has encountered an error. Publish has encountered an error. We were unable to determine the cause of the error.

It hasn't published for 2 days. Before, I published successfully. I search it on google but I couldn't find any clue.

Btw, I can reach the FTP file of the function successfully. And the function running successfully on https://myfuncappdss.azurewebsites.net/ site. I tried it with az command also but it wasn't work, too. All my teammates can't publish also. So, the problem is not just about my computer. Why is the PublishUrl set with wrong URL?

like image 313
Aybuke Avatar asked Oct 19 '20 15:10

Aybuke


2 Answers

When I check the publish profile in Visual Studio (.pubxml file), I see the line:

<PublishUrl>https://waws-prod-am2-311.publish.azurewebsites.windows.net/</PublishUrl>

But it should be

<PublishUrl>https://myfuncappdss.scm.azurewebsites.net</PublishUrl>

I changed it manually and then it started working fine.

  • Step 1: Do the above URL changes and save the .pubxml file
  • Step 2: Close Visual Studio.
  • Step 3: Open your project in Visual Studio.
  • Step 4: Now publish, it should work as expected…

Here we have successfully deployed the Function App.

like image 156
Rajesh Haramkar Avatar answered Oct 09 '22 20:10

Rajesh Haramkar


Update:

Thanks for Aybuke's aharing, this is the reason of the problem:

The problem base is about function publish profile. When I follow the steps, (Go to Azure Portal-->Go to function app-->Overview menu-->Get Publish Profile) I can download the publish profile of function. So, I can see the publish settings of function. "publishUrl="https://waws-prod-am2-xxx.publish.azurewebsites.windows.net:443"" This line is in the publish profile file that I downloaded. But it should be "publishUrl="https://myfuncappdss.scm.azurewebsites.net"". That is why the published zip file is sent to wrong url. So, there are some problems while creating function on Azure Portal.

Original Answer:

Did you encounter this error?

enter image description here

I notice you change publish url to http://myfuncappdss.scm.azurewebsites.net, please change it to https://myfuncappdss.scm.azurewebsites.net and try again.

If I use http, I also can not publish my function app. I don't know why the publish url is not what you want, but the az command should work. Any details when you use az command?

Change http to https, it should work.

like image 35
Cindy Pau Avatar answered Oct 09 '22 20:10

Cindy Pau