Worker Factory not starting

I am scheduling jobs using Schedule on a self hosted cluster, and also created a client, factory and workers. I am able to list the workers for the factory, but getting error while doing “factory.start()”
Specifically getting an error for " this.workflowClient.getWorkflowServiceStubs().connect((Duration)null);"

Can you give more info on the exact error (including stack trace) what you are getting?
If you could show your code would help too i think

Actually, it’s working now.
I was creating worker in another function and starting it’s factory in the calling function.
Thanks anyways