GRPC connection error with temporal when i try running jar while starting Temporal worker

||at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:271)
||at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:252)
||at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:165)
||at io.temporal.api.workflowservice.v1.WorkflowServiceGrpc$WorkflowServiceBlockingStub.getSystemInfo(WorkflowServiceGrpc.java:4299)
||at io.temporal.serviceclient.SystemInfoInterceptor.getServerCapabilitiesOrThrow(SystemInfoInterceptor.java:95)
||at io.temporal.serviceclient.ChannelManager.lambda$getServerCapabilities$3(ChannelManager.java:331)
||at io.temporal.internal.retryer.GrpcRetryer.retryWithResult(GrpcRetryer.java:60)
||at io.temporal.serviceclient.ChannelManager.connect(ChannelManager.java:297)
||at io.temporal.serviceclient.WorkflowServiceStubsImpl.connect(WorkflowServiceStubsImpl.java:161)
||at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_362]|
||at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_362]|
||at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_362]|
||at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_362]|
||at io.temporal.internal.WorkflowThreadMarker.lambda$protectFromWorkflowThread$1(WorkflowThreadMarker.java:83)
||at com.sun.proxy.$Proxy18.connect(Unknown Source) ~[?:?]|
||at io.temporal.worker.WorkerFactory.start(WorkerFactory.java:213)

@Sakshi_Patil were you able to resolve the issue? if so please suggest solution

Yes! Basically it happens due to fat jar creation. In case you are using maven , you need to add below snippet to your pom.xml and in deployment script need to refer to the new jar that got created. This will resolve the issue.

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.5.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <filters>
                                <filter>
                                    <artifact>*:*</artifact>
                                    <excludes>
                                        <exclude>META-INF/*.SF</exclude>
                                        <exclude>META-INF/*.DSA</exclude>
                                        <exclude>META-INF/*.RSA</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                            <transformers>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer">
                                </transformer>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>```

Thank you for the response