Skip to content

fix: update default server port from 8000 to 8080#439

Open
cstanger wants to merge 2 commits into
google:mainfrom
cstanger:main
Open

fix: update default server port from 8000 to 8080#439
cstanger wants to merge 2 commits into
google:mainfrom
cstanger:main

Conversation

@cstanger

@cstanger cstanger commented Jun 16, 2026

Copy link
Copy Markdown

#438

The default port for the ADK CLI (api_server and web commands) needs to be updated from 8000 to 8080.

Context & Necessity

Google Cloud Agent Engine's underlying infrastructure runs on top of Google Cloud Run, which expects the deployed container to listen on and expose port 8080 by default.

Currently, when deploying to Agent Engine, the custom port option specified via the CLI or configuration is not fully passed down/honored by the underlying Agent Engine orchestration layers. As a result, if the ADK server defaults to port 8000, the container will listen on 8000, but Cloud Run will attempt to route traffic and health checks to port 8080. This mismatch causes deployment to fail with container startup timeouts or health check failures.

By changing the default port in the ADK CLI to 8080, we ensure that out-of-the-box deployments align with the Cloud Run / Agent Engine expectations without requiring manual port configuration or facing deployment failures.

Comment thread dev/src/cli/cli.ts Outdated
'Optional. The port of the server',
).default('8000');
'Optional. The port of the server. Default: 8080',
).default('8080');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

we need to keep the 8000 for local setup to keep the parity with Python ADK.
We need to update the port value explicitly for deploy commands only

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I understand.

So it is the agent Engine which need to be hardcoded to port 8080.

I have drafted a commit for this change incl. tests

Comment thread dev/src/cli/cli.ts
description: options['description'],
tempFolder: options['temp_folder'],
port: parseInt(options['port'], 10),
port: 8080, // Agent Engine requires fixed port of 8080

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, but we need to respect the option provided by the user.
So we should keep the line 439 and just override the default value here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I additionally removed the Port option for agent engine deployments, so we do not override any user input. (see line 439) Agent Engine does not support any port config and requires 8080 by hard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants