AZ-204 Exam QuestionsBrowse all questions from this exam

AZ-204 Exam - Question 365


You need to investigate the http server log output to resolve the issue with the ContentUploadService.

Which command should you use first?

Show Answer
Correct Answer: AC

To investigate the HTTP server log output to resolve the issue with the ContentUploadService, the first command you should use is 'az webapp log'. This command allows you to view and manage the logs for an Azure web application, which is essential for identifying and diagnosing issues such as HTTP 502 responses reported by users. It provides access to detailed logs that can help pinpoint where the problem might be occurring within the web application, aiding in effective troubleshooting.

Discussion

17 comments
Sign in to comment
WhirlyOption: D
Apr 6, 2021

Answer is az container attach Ref: https://docs.microsoft.com/en-us/azure/container-instances/container-instances-get-logs

Zidimirite
Apr 9, 2021

It's not deployed to a container. This is a regular webapp so A, az webapp log is the correct answer.

clarionprogrammer
Apr 13, 2021

It is. Note the type in the ContentUploadService log.

somenkr
Jul 12, 2021

It is , Read the question again.

ning
Aug 29, 2021

az container attach only gives STDOUT and STDERR, not web server log ... web server log can have option to see STDOUT / STDERR as well as all other possible log files

ray01
Apr 16, 2021

Correct. If one will take a look at "CS09" line, it's clear that "ContentUploadService" is a container, so the first step should be "az container attach"

maukaba
Nov 19, 2021

A web app can be deployed both as source code and as a docker container. C it's correct see link https://docs.microsoft.com/en-us/azure/app-service/troubleshoot-http-502-http-503

1CY1
Jul 20, 2024

Also, this is probably what MS wants you to say. -> Ans : C

maukaba
Nov 19, 2021

C it's correct see link https://docs.microsoft.com/en-us/azure/app-service/troubleshoot-http-502-http-503

KingChuang
Dec 27, 2022

On my exam 2022-12-26. Chose:D

clarionprogrammerOption: B
Apr 14, 2021

It is not A. "az webapp log" by itself is not a command. It would need to be "az webapp log tail" or "az webapp log download". https://docs.microsoft.com/en-us/cli/azure/webapp/log?view=azure-cli-latest

EltoothOption: D
Jun 25, 2022

D is correct answer. az container attach

leonidnOption: D
Jan 29, 2022

ConentCotainerService is hosted in container services. Hense, the correct answer is az container attach. https://docs.microsoft.com/en-us/azure/container-instances/container-instances-get-logs#attach-output-streams

heisenberg33Option: D
Feb 16, 2022

ContentUploadService is a container, see line CS06-CS09. Ref: https://docs.microsoft.com/en-us/azure/container-instances/container-instances-get-logs#attach-output-streams

hubekpeterOption: D
Nov 27, 2022

https://learn.microsoft.com/en-us/azure/container-instances/container-instances-get-logs

uffuchsiOption: D
Feb 21, 2023

D - Scenario: The ContentAnalysisService is deployed with Azure Container Instances from a private Azure Container Registry named AmyImages. The solution will use eight CPU cores. When you have a misbehaving container in Azure Container Instances, start by viewing its logs with az container logs, and stream its standard out and standard error with az container attach. https://docs.microsoft.com/en-us/azure/container-instances/container-instances-get-logs

JH81Option: C
Jun 20, 2023

Another wonderfully obtuse question. I'm not going to disagree that ContentUploadService is hosted in a container but I think MS wants answer C.

gmishra88Option: C
Oct 8, 2022

Without knowing what Microsoft thinks it is difficult to answer this question. * az monitor activity-log alert create can be used to create an alert. If you follow the page then that is the first step. Monitor the service health and for that create alerts. Thi tool can be used for that. https://learn.microsoft.com/en-us/azure/app-service/troubleshoot-http-502-http-503 * az container attach : To get the current log output, but that is not a good option to debug this issue. I will bet on az monitor activity-log. And I'm changing my original answer from the first iteration of looking at the options

gmishra88
Oct 8, 2022

az monitor activity-log alert create -n {AlertName} -g {ResourceGroup} \ --condition category=ServiceHealth and level=Error

gmishra88
Oct 8, 2022

az container attach can be used in the second step of collect data (observer and monitor, collect data and mitigate) to get the log stream.

gmishra88
Oct 8, 2022

But it asks which you will use first then I guess Microsoft wants me to follow that step exactly like a machine and reading their manuals as soon as I face an issue. So it is definitely alerts in the first step; Observe and monitor. This is a horrible question to ask what I will do first. I will go get a coffee first, microsoft

OPT_001122Option: D
Nov 17, 2022

az container attach

TheExamMaster2020
Nov 15, 2022

Did my exam on 15th November 2022. This test case and question was on it.

AlexeyG
Feb 16, 2023

Got this in 16/02/2023

adilkhanOption: A
Apr 8, 2023

A is the right answer. ContentUploadService has nothing to do with the CONTAINER!

NightshadeRC
Jul 26, 2023

Had this question today: 2023-07-26

BaoNguyen2411
Jul 29, 2023

got this question on 29/06/2023

james2033Option: D
Mar 13, 2024

az container attach --resource-group myResourceGroup --name mycontainer https://learn.microsoft.com/en-us/azure/container-instances/container-instances-quickstart#attach-output-streams

DamianSawulaOption: D
May 16, 2024

On my exam 2024-05-16, answered D, 887/1000