This PCD practice question tests your understanding of deploying applications. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Exhibit
Refer to the exhibit.
```
ERROR: (gcloud.beta.run.deploy) The user-provided container failed to start and listen on the port defined by the PORT environment variable (8080). Logs for this revision might contain more information.
Logs:
2024-03-15 10:23:45.123456 Container called exit(1).
2024-03-15 10:23:45.123789 Fatal error: Unable to bind to port 8080: Permission denied
```
Refer to the exhibit. A developer is deploying a container to Cloud Run and receives the error shown. What is the most likely cause?
Clue words in this question
Noticing these words before you look at the options changes how you read each choice.
Clue: "most likely"
Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
Refer to the exhibit.
```
ERROR: (gcloud.beta.run.deploy) The user-provided container failed to start and listen on the port defined by the PORT environment variable (8080). Logs for this revision might contain more information.
Logs:
2024-03-15 10:23:45.123456 Container called exit(1).
2024-03-15 10:23:45.123789 Fatal error: Unable to bind to port 8080: Permission denied
```
A
The container's health check is failing because the startup command is incorrect.
Why wrong: Incorrect: The error is about binding to a port, not health checks.
B
The PORT environment variable is not set correctly in the Cloud Run service configuration.
Why wrong: Incorrect: The error message shows PORT is set to 8080, but the app may not be using it.
C
The container image does not exist in the specified registry.
Why wrong: Incorrect: The container started (log shows exit), so the image exists.
D
The container is trying to listen on a privileged port (e.g., 80) instead of the expected port 8080.
Correct: The 'Permission denied' error when binding to port 8080 is misleading; the application likely attempts to bind to a lower port (like 80) that requires root, but Cloud Run runs as non-root.
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The container is trying to listen on a privileged port (e.g., 80) instead of the expected port 8080.
Cloud Run requires containers to listen on the port specified by the PORT environment variable, which defaults to 8080. The error indicates the container is trying to bind to port 80, a privileged port, which is not allowed by the Cloud Run runtime sandbox. This mismatch causes the container to fail health checks and deployment.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
✗
The container's health check is failing because the startup command is incorrect.
Why it's wrong here
Incorrect: The error is about binding to a port, not health checks.
✗
The PORT environment variable is not set correctly in the Cloud Run service configuration.
Why it's wrong here
Incorrect: The error message shows PORT is set to 8080, but the app may not be using it.
✗
The container image does not exist in the specified registry.
Why it's wrong here
Incorrect: The container started (log shows exit), so the image exists.
✓
The container is trying to listen on a privileged port (e.g., 80) instead of the expected port 8080.
Why this is correct
Correct: The 'Permission denied' error when binding to port 8080 is misleading; the application likely attempts to bind to a lower port (like 80) that requires root, but Cloud Run runs as non-root.
Clue confirmation
The clue word "most likely" in the question point toward this answer.
Related concept
Read the scenario before looking for a memorised answer.
Common exam traps
Common exam trap: answer the scenario, not the keyword
Cisco often tests the misconception that the error is due to a missing image or incorrect health check, when in fact the container is failing to bind to the correct port because it ignores the PORT environment variable.
Trap categories for this question
Command / output trap
Incorrect: The error message shows PORT is set to 8080, but the app may not be using it.
Detailed technical explanation
How to think about this question
Cloud Run runs containers in a gVisor sandbox that restricts system calls, including binding to ports below 1024 (privileged ports). The container must read the PORT environment variable (injected by Cloud Run) and configure its web server to listen on that port. Common frameworks like Express.js or Flask often default to port 3000 or 5000, but the developer must explicitly set the port to the value of $PORT, typically 8080.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Deploying applications — This question tests Deploying applications — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: The container is trying to listen on a privileged port (e.g., 80) instead of the expected port 8080. — Cloud Run requires containers to listen on the port specified by the PORT environment variable, which defaults to 8080. The error indicates the container is trying to bind to port 80, a privileged port, which is not allowed by the Cloud Run runtime sandbox. This mismatch causes the container to fail health checks and deployment.
What should I do if I get this PCD question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Are there clue words in this question I should notice?
Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
This PCD practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCD exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.