Temporal sdk upgrade

We are upgrading temporal sdk from 1.11.o to 1.27.0 and temporal-server to 1.25.

The default temporal-sdk is using protobuf-java:3.21.7 and it works without any issue.

Temporal Java SDK recommends using protobuf-java(and protobuf-java-util) 4.x → I updated the maven to use 4.28.2.

io.temporal temporal-sdk 1.27.0
<dependency>
  <groupId>com.google.protobuf</groupId>
  <artifactId>protobuf-java-util</artifactId>
  <version>4.28.2</version>
</dependency>
<dependency>
  <groupId>com.google.protobuf</groupId>
  <artifactId>protobuf-java</artifactId>
  <version>4.28.2</version>
</dependency>

However, I am seeing error when connecting to temporal server “The gRPC request was cancelled”.
It fails at
WorkflowServiceStubs.newConnectedServiceStubs(serviceStubsOptions,
Duration.ofSeconds(45));

Stacktace:
Caused by: java.util.concurrent.CancellationException: The gRPC request was cancelled
at io.temporal.internal.retryer.GrpcRetryerUtils.createFinalExceptionIfNotRetryable(GrpcRetryerUtils.java:59) ~[temporal-serviceclient-1.27.0.jar:?]
at io.temporal.internal.retryer.GrpcSyncRetryer.retry(GrpcSyncRetryer.java:77) ~[temporal-serviceclient-1.27.0.jar:?]
at io.temporal.internal.retryer.GrpcRetryer.retryWithResult(GrpcRetryer.java:60) ~[temporal-serviceclient-1.27.0.jar:?]
at io.temporal.serviceclient.SystemInfoInterceptor.getServerCapabilitiesWithRetryOrThrow(SystemInfoInterceptor.java:117) ~[temporal-serviceclient-1.27.0.jar:?]
at io.temporal.serviceclient.ChannelManager.lambda$getServerCapabilities$3(ChannelManager.java:346) ~[temporal-serviceclient-1.27.0.jar:?]
at io.temporal.internal.retryer.GrpcRetryer.retryWithResult(GrpcRetryer.java:60) ~[temporal-serviceclient-1.27.0.jar:?]
at io.temporal.serviceclient.ChannelManager.connect(ChannelManager.java:320) ~[temporal-serviceclient-1.27.0.jar:?]
at io.temporal.serviceclient.WorkflowServiceStubsImpl.connect(WorkflowServiceStubsImpl.java:161) ~[temporal-serviceclient-1.27.0.jar:?]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at io.temporal.internal.WorkflowThreadMarker.lambda$protectFromWorkflowThread$1(WorkflowThreadMarker.java:83) ~[temporal-serviceclient-1.27.0.jar:?]
at jdk.proxy2/jdk.proxy2.$Proxy94.connect(Unknown Source) ~[?:?]
at io.temporal.serviceclient.WorkflowServiceStubs.newConnectedServiceStubs(WorkflowServiceStubs.java:93) ~[temporal-serviceclient-1.27.0.jar:?]

Any pointers on how to fix it?