Skip to content

Default ClientOptions port mismatch 7933 vs 7833 for version 4.0.0 #1043

@shuprime

Description

@shuprime

Description:

When using ClientOptions.defaultInstance() in the Cadence Java client, it attempts to connect to port 7933. However, when running Cadence locally using docker compose, the frontend service runs on port 7833 by default, causing connection failures.

Expected behavior:
The default port should match the local Cadence frontend service default port (7833).

Actual behavior:
Developers must manually create ClientOptions with the correct port:

ClientOptions options = ClientOptions.newBuilder()
    .setHost("127.0.0.1")
    .setPort(7833)
    .build();

Steps to reproduce:

  1. Start a local Cadence server locally using docker compose
    git clone https://github.com/cadence-workflow/cadence.git
    cd cadence/docker && docker-compose up
  2. Attempt to connect to the Cadence server using default ClientOptions
WorkflowClient workflowClient =
               WorkflowClient.newInstance(
                       new WorkflowServiceGrpc(ClientOptions.defaultInstance()),
                       WorkflowClientOptions.newBuilder().setDomain(DOMAIN).build());
  1. Connection fails due to port mismatch unless default port is overridden to 7833.

Environment:

  • Cadence Java Client version: 4.0.0
  • Local Cadence setup method: docker-compose

Suggested fix:

Update the value of DEFAULT_LOCAL_CADENCE_SERVER_PORT to 7833 in the ClientOptions.java file.
link:

private static final int DEFAULT_LOCAL_CADENCE_SERVER_PORT = 7933;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions