Azure / static-web-apps

Azure Static Web Apps. For bugs and feature requests, please create an issue in this repo. For community discussions, latest updates, kindly refer to the Discussions Tab. To know what's new in Static Web Apps, visit https://aka.ms/swa/ThisMonth
https://aka.ms/swa
MIT License
327 stars 56 forks source link

Failed to contact content server #745

Open ThisIsJaruj opened 2 years ago

ThisIsJaruj commented 2 years ago

I am using simple hello-world, prebuild react app, that I want to deploy to Azure Static Web App. As It is prebuild, I am using skip_app_build: true.

I was able to deploy the same app using runner hosted on my customers virtualization solution, but when I try to use Azure hosted runner, this happens:

pictureforissue

I would like to describe the issue more, but this is the error that I get. There is no description provided, and it prints exactly the same message into the .log file.

Could anyone please elaborate it?

mkarmark commented 2 years ago

Hi @ThisIsJaruj, are you persistently getting this issue or is a retry successful?

ThisIsJaruj commented 2 years ago

Hello @mkarmark, the error is persistent, no matter if I re-run the run or I start a fresh one, the error persists.

Also I checked if the AZ SWA is reachable from the runner. It is.

miwebst commented 2 years ago

Likely you have a networking restriction blocking the task from reaching our content endpoint. Are there NSG/UDRs surrounding this VM? You may want to file a support ticket to supply the exact details, not sure if you want to share network details here :)

ThisIsJaruj commented 2 years ago

Yes, indeed we have some networking restrictions. Is there any documentation we could review regarding endpoints/ports to be opened for the action to properly communicate with the AZ SWA?

We have not been able to find any.

miwebst commented 2 years ago

We do not have any public documentation on doing this but after a growing amount of cases related to this we may need to add some. cc @craigshoemaker / @anthonychu

I'd recommend filing a support ticket until then and we can help you open things up.

mikedouglasdev commented 2 years ago

I'm running into the same issue but the inverse. it was working with the azure hosted agents with a SWA using a PE. However, when I'm trying to deploy from a self-hosted agent in the same subnet it fails. @ThisIsJaruj did you figure out what needed to be open?

vpatil-crestron commented 2 years ago

@mikedouglasdev /@ThisIsJaruj Did you figure out how to fix the issue.. We are running into the same problem

jaltin commented 2 years ago

We do not have any public documentation on doing this but after a growing amount of cases related to this we may need to add some. cc @craigshoemaker / @anthonychu

I'd recommend filing a support ticket until then and we can help you open things up.

I am also running into this issue. Any more work on this planned?

rbnmk commented 1 year ago

We are using Azure Firewall to scan outbound traffic and it seems that connectivity, in our case, was blocked to: content-am2.infrastructure.2.azurestaticapps.net. We are using a Self-hosted (Linux) agent and a SWA with a Private Endpoint.

derekvantonder commented 1 year ago

I am seeing this issue since yesterday after making a small code change. We only use Azure Static Web Apps, no private VMs or anything like that. We normally push to GitHub, and then GitHub actions builds for us and deploys to SWA.

Failing DeploymentId: 0ffb9247-0df7-434a-ac19-842a14462372

Please help, this is delaying product release.

craigomatic commented 1 year ago

Seeing this also with GH Actions -> SWA, nothing fancy going on.

Tried twice, here are two failed DeploymentIds:

685d275d-f720-469d-af5c-0985ae50580c bc69f576-1582-470c-9ae3-4d176d0fd135

Another with the same issue over at #1023

sjmcculloch commented 1 year ago

I am also seeing this since a few days ago.

derekvantonder commented 1 year ago

Still happening to me this morning (Eastern Australia time). I realise most of the MS people are probably on Christmas leave; it would be wonderful if there was a way to manually FTP and upload files when things like this happen, it's happened a few times.

DeploymentId: 7b143e55-8ec9-4845-8374-1605676663f5

App Directory Location: '/' was found. Looking for event info Failed to contact content server, stopping... An unknown exception has occurred

derekvantonder commented 1 year ago

Update: as of 8PM AEST, GitHub Actions deployment of my SWA project now seems to be up & running again, I'm getting green lights on my pushes.

iCodeSometime commented 1 year ago

Still an issue. At the least, it needs more information logged.

Codesleuth commented 1 year ago

For anyone still experiencing this issue, try to open HTTPS (443) to all subdomains in *.azurestaticapps.net. I see this being blocked in our firewall every time swa deploy fails with this message.

reece-mccarthy commented 10 months ago

We encountered the same issue while deploying one specific SWA using a VMSS agent. When we redeployed it using an MS self-hosted agent, the problem did not occur.

Is there a reason this problem seems to be isolated to just 1 out of our 50 SWAs? Any insights or suggestions on why this might be happening selectively to just one SWA would be greatly appreciated.