Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

launchdarkly-java-server-sdk:6.3.0 : causing LdFeatureFlagClient not initialized after '10' seconds! Until we restart the machine intermittently. #27

Open
swapnil-kotwal-sp opened this issue Apr 23, 2024 · 2 comments

Comments

@swapnil-kotwal-sp
Copy link

swapnil-kotwal-sp commented Apr 23, 2024

Is this a support request?
This issue tracker is maintained by LaunchDarkly SDK developers and is intended for feedback on the SDK code. If you're not sure whether the problem you are having is specifically related to the SDK, or to the LaunchDarkly service overall, it may be more appropriate to contact the LaunchDarkly support team; they can help to investigate the problem and will consult the SDK team if necessary. You can submit a support request by going here or by emailing [email protected].

Note that issues filed on this issue tracker are publicly accessible. Do not provide any private account information on your issues. If your problem is specific to your account, you should submit a support request as described above.

Describe the bug
A clear and concise description of what the bug is.

We are using launchdarkly-java-server-sdk:6.3.0 and our pipelines are usually failing with error as

09:22:24.112 ERROR c.s.f.i.LDFeatureFlagClient    : Unable to start the LD feature flag client
java.lang.IllegalStateException: LdFeatureFlagClient not initialized after '10' seconds!

I found that I restarted my IDE(IntelliJ), flushed IntelliJ cache and even tried to console but every time the error persists. But, when I restarted the machine, error goes away. This is annoying as it is failing my release pipelines in intermittently.

To reproduce
Steps to reproduce the behavior.
Use launchdarkly-java-server-sdk:6.3.0 and run your tests, if you encountered with LdFeatureFlagClient not initialized after '10' seconds! you need to restart machine else the error won't go away.

Expected behavior
A clear and concise description of what you expected to happen.
LDClint should start within given 10 second time.

Logs
If applicable, add any log output related to your problem.

 1 error
[ERROR] 	at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987)
[ERROR] 	at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)

[ERROR] 	... 52 more
[ERROR] Caused by: java.lang.IllegalStateException: LdFeatureFlagClient not initialized after '10' seconds!
[ERROR] 	at com.abc.featureflag.impl.LDFeatureFlagClient.start(LDFeatureFlagClient.java:222)
[ERROR] 	at com.abc.test.service.LdFeatureFlagService.start(LdFeatureFlagService.java:117)
[ERROR] 	at com.abc.test.service.AuthenticationService.<init>(AuthenticationService.java:57)
[ERROR] 	at com.abc.test.service.abc$$FastClassByGuice$$99a16d84.newInstance(<generated>)
[ERROR] 	at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
[ERROR] 	at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:60)
[ERROR] 	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
[ERROR] 	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
[ERROR] 	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
[ERROR] 	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
[ERROR] 	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
[ERROR] 	at com.google.inject.Scopes$1$1.get(Scopes.java:65)
[ERROR] 	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
[ERROR] 	at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
[ERROR] 	at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
[ERROR] 	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:84)
[ERROR] 	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
[ERROR] 	at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
[ERROR] 	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
[ERROR] 	at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
[ERROR] 	... 55 more

....
java.lang.IllegalStateException: LdFeatureFlagClient not initialized after '10' seconds!

SDK version
The version of this SDK that you are using.
launchdarkly-java-server-sdk:6.3.0

Language version, developer tools
For instance, Go 1.11 or Ruby 2.5.3. If you are using a language that requires a separate compiler, such as C, please include the name and version of the compiler too.

JAVA-11

OS/platform
For instance, Ubuntu 16.04, Windows 10, or Android 4.0.3. If your code is running in a browser, please also include the browser type and version.

macOs: 14.4.1

Additional context
Add any other context about the problem here.

@tanderson-ld
Copy link
Contributor

tanderson-ld commented Apr 23, 2024

Hi @swapnil-kotwal-sp.

Have you ever seen any SocketTimouetExceptions or other connectivity exceptions ever when experiencing this issue?

How frequently do you see this issue?
Have you ever seen it on a production server environment?
Does the Mac you use run any firewall or VPN software?

I am not familiar with the logging well enough to know if the logs you attached are the debug level logs. If you see the issue again, would you mind enabling debug logging, reproducing it, and then attaching the full logs.

@swapnil-kotwal-sp
Copy link
Author

Thanks @tanderson-ld , this issue is intermittent but hit us once in blue moon. I'll enable logs if encountered with it again

@tanderson-ld tanderson-ld transferred this issue from launchdarkly/java-server-sdk May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants