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

**URL:** <https://community.temporal.io/t/grpc-connection-error-with-temporal-when-i-try-running-jar-while-starting-temporal-worker/10571>\
**Category:** Community Support\
**Tags:** java-sdk\
**Created:** [January 4, 2024, 8:31am UTC](https://community.temporal.io/t/grpc-connection-error-with-temporal-when-i-try-running-jar-while-starting-temporal-worker/10571 "2024-01-04T08:31:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sakshi\_Patil](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/sakshi_patil/32/4293_2.png) [@Sakshi\_Patil](https://community.temporal.io/u/Sakshi_Patil)\
**Post date:** [January 4, 2024, 8:31am UTC](https://community.temporal.io/t/grpc-connection-error-with-temporal-when-i-try-running-jar-while-starting-temporal-worker/10571/1 "2024-01-04T08:31:25Z")

</div>

||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)

---

<div class="post-metadata">

**Author:** ![Mahith\_Khambhammettu](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/mahith_khambhammettu/32/4705_2.png) [@Mahith\_Khambhammettu](https://community.temporal.io/u/Mahith_Khambhammettu)\
**Post date:** [April 18, 2024, 2:10pm UTC](https://community.temporal.io/t/grpc-connection-error-with-temporal-when-i-try-running-jar-while-starting-temporal-worker/10571/2 "2024-04-18T14:10:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sakshi\_Patil](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/sakshi_patil/32/4293_2.png) [@Sakshi\_Patil](https://community.temporal.io/u/Sakshi_Patil)\
**Post date:** [May 29, 2024, 5:39am UTC](https://community.temporal.io/t/grpc-connection-error-with-temporal-when-i-try-running-jar-while-starting-temporal-worker/10571/3 "2024-05-29T05:39:42Z")

</div>

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.

````auto
<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>```
````

---

<div class="post-metadata">

**Author:** ![Mahith\_Khambhammettu](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/mahith_khambhammettu/32/4705_2.png) [@Mahith\_Khambhammettu](https://community.temporal.io/u/Mahith_Khambhammettu)\
**Post date:** [May 29, 2024, 8:54am UTC](https://community.temporal.io/t/grpc-connection-error-with-temporal-when-i-try-running-jar-while-starting-temporal-worker/10571/4 "2024-05-29T08:54:40Z")

</div>

Thank you for the response
