dotnet / aspire-samples

MIT License
571 stars 158 forks source link

Fail to load the service page after running "azd up" for some samples #262

Closed Menghua1 closed 2 months ago

Menghua1 commented 2 months ago

Describe the issue: After running the azd up command, click the output link, and an error occurs when loading the page. The page is as follows: image

Repro Steps:

  1. Clone code.
  2. Cd to the sample folder.
  3. Run command azd init.
  4. Run command azd up.
  5. Click the output link.

Environment:

Expected behavior: After azd up, all services links can load normally.

@rajeshkamal5050, @vhvb1989 for notification.

DamianEdwards commented 2 months ago

I don't think it's expected you could azd up the entire samples repo. Each directory under the ./samples directory is an individual Aspire app and some of them will deploy successfully with azd but not all as each sample generally only includes enough specific code as is required to demonstrate the topic of the sample.

vicperdana commented 2 months ago

Did azd up return any errors? Try running azd up --debug to get more info.

Menghua1 commented 2 months ago

I don't think it's expected you could azd up the entire samples repo. Each directory under the ./samples directory is an individual Aspire app and some of them will deploy successfully with azd but not all as each sample generally only includes enough specific code as is required to demonstrate the topic of the sample.

Maybe my description is not clear enough. What I want to express is that for some projects in the ./samples directory, after running azd up, an error occurs on the page loading the service.

Menghua1 commented 2 months ago

Did azd up return any errors? Try running azd up --debug to get more info.

More log info is as follows: image image

vicperdana commented 2 months ago

So all deployed successfully? Hard to say from the screenshots.

Menghua1 commented 2 months ago

So all deployed successfully? Hard to say from the screenshots.

Yes, the deployment is successful, and the output in the container in the picture below is also normal, but the page cannot be loaded normally. We found that the service links with this issue all contained the word internal. Does this mean this is an internal service and the expected service page? image

rajeshkamal5050 commented 2 months ago

@Menghua1 are you seeing this for any endpoint/service which was configured in app-host to be public but is showing 404/stopped? Suspecting you are seeing this page 404/stopped page for internal endpoints/services. Which is the right behavior. ex:

starter-redis Services: apiservice https://apiservice.internal.braveflower-4335e738.eastus.azurecontainerapps.io/ - 404/stopped cache https://cache.internal.braveflower-4335e738.eastus.azurecontainerapps.io/ - 404/stopped webfrontend https://webfrontend.braveflower-4335e738.eastus.azurecontainerapps.io/ - accessible

Menghua1 commented 2 months ago

404/stopped page

@Menghua1 are you seeing this for any endpoint/service which was configured in app-host to be public but is showing 404/stopped? Suspecting you are seeing this page 404/stopped page for internal endpoints/services. Which is the right behavior. ex:

starter-redis Services: apiservice https://apiservice.internal.braveflower-4335e738.eastus.azurecontainerapps.io/ - 404/stopped cache https://cache.internal.braveflower-4335e738.eastus.azurecontainerapps.io/ - 404/stopped webfrontend https://webfrontend.braveflower-4335e738.eastus.azurecontainerapps.io/ - accessible

Yes, all 404/stopped pages are configured with app-host as internal, since this is expected I will close this issue.