Failed to communicate with analyzer (E020)

I was using diffblue cover as usual when suddenly the service stopped working. Now i’m getting E020 after 3 attempts (which takes about 15 minutes). I’m using JDK 1.8 64 bits and i was able to see the TCP service created using TCPView, but no data is transmitted.

Here’s a part of the log.

12:06:47.406 [INFO] [Creating] Server started. Waiting up to 300 seconds for a connection to be established…
12:06:48.033 [INFO] [Creating] Starting new remote monitor client
12:06:48.840 [INFO] [Creating] Attempting to start remote server.
12:06:49.120 [INFO] [Creating] Server started, listening on localhost/127.0.0.1:64265
12:06:49.409 [INFO] [Creating] Expect analyzer service to be listening on port 64265.
12:11:49.851 [INFO] [Creating] Service process output:
13:06:47,860 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [C:\Users\MATHEU~1.SAN\AppData\Local\Temp\diffblue\config\logback-remote-service.xml] at [file:/C:/Users/MATHEU~1.SAN/AppData/Local/Temp/diffblue/config/logback-remote-service.xml]
13:06:47,902 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
13:06:47,902 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [com.diffblue.cover.logging.RemoteLogAppender]
13:06:47,905 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [server-logger]
13:06:47,905 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [com.diffblue.cover.logging.appender.CoverRollingFileAppender]
13:06:47,906 |-ERROR in ch.qos.logback.core.joran.action.AppenderAction - Could not create an Appender of type [com.diffblue.cover.logging.appender.CoverRollingFileAppender]. ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type com.diffblue.cover.logging.appender.CoverRollingFileAppender
at ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type com.diffblue.cover.logging.appender.CoverRollingFileAppender
at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(SourceFile:69)
at at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(SourceFile:45)
at at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(SourceFile:34)
at at ch.qos.logback.core.joran.action.AppenderAction.begin(SourceFile:52)
at at ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(SourceFile:269)
at at ch.qos.logback.core.joran.spi.Interpreter.startElement(SourceFile:145)
at at ch.qos.logback.core.joran.spi.Interpreter.startElement(SourceFile:128)
at at ch.qos.logback.core.joran.spi.EventPlayer.play(SourceFile:50)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(SourceFile:165)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(SourceFile:152)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(SourceFile:110)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(SourceFile:53)
at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(SourceFile:65)
at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(SourceFile:140)
at at org.slf4j.impl.StaticLoggerBinder.init(SourceFile:84)
at at org.slf4j.impl.StaticLoggerBinder.(SourceFile:55)
at at org.slf4j.LoggerFactory.bind(SourceFile:150)
at at org.slf4j.LoggerFactory.performInitialization(SourceFile:124)
at at org.slf4j.LoggerFactory.getILoggerFactory(SourceFile:412)
at at org.slf4j.LoggerFactory.getLogger(SourceFile:357)
at at org.slf4j.LoggerFactory.getLogger(SourceFile:383)
at at com.diffblue.cover.logging.b.a(SourceFile:66)
at at com.diffblue.cover.service.a.a.b.(SourceFile:26)
at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at at java.lang.reflect.Method.invoke(Method.java:498)
at at com.diffblue.cover.launcher.Launcher.invokeMainMethod(Launcher.java:116)
at at com.diffblue.cover.launcher.Launcher.main(Launcher.java:72)
Caused by: java.lang.ClassNotFoundException: com.diffblue.cover.logging.appender.CoverRollingFileAppender
at at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at at com.diffblue.cover.launcher.FilteringClassLoader.findClass(FilteringClassLoader.java:53)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at at com.diffblue.cover.launcher.FilteringClassLoader.loadClassBasedOnPolicy(FilteringClassLoader.java:75)
at at com.diffblue.cover.launcher.FilteringClassLoader.loadClass(FilteringClassLoader.java:61)
at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(SourceFile:56)
at … 28 common frames omitted
13:06:47,906 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@7:110 - ActionException in Action for tag [appender] ch.qos.logback.core.joran.spi.ActionException: ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type com.diffblue.cover.logging.appender.CoverRollingFileAppender
at ch.qos.logback.core.joran.spi.ActionException: ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type com.diffblue.cover.logging.appender.CoverRollingFileAppender
at at ch.qos.logback.core.joran.action.AppenderAction.begin(SourceFile:76)
at at ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(SourceFile:269)
at at ch.qos.logback.core.joran.spi.Interpreter.startElement(SourceFile:145)
at at ch.qos.logback.core.joran.spi.Interpreter.startElement(SourceFile:128)
at at ch.qos.logback.core.joran.spi.EventPlayer.play(SourceFile:50)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(SourceFile:165)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(SourceFile:152)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(SourceFile:110)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(SourceFile:53)
at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(SourceFile:65)
at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(SourceFile:140)
at at org.slf4j.impl.StaticLoggerBinder.init(SourceFile:84)
at at org.slf4j.impl.StaticLoggerBinder.(SourceFile:55)
at at org.slf4j.LoggerFactory.bind(SourceFile:150)
at at org.slf4j.LoggerFactory.performInitialization(SourceFile:124)
at at org.slf4j.LoggerFactory.getILoggerFactory(SourceFile:412)
at at org.slf4j.LoggerFactory.getLogger(SourceFile:357)
at at org.slf4j.LoggerFactory.getLogger(SourceFile:383)
at at com.diffblue.cover.logging.b.a(SourceFile:66)
at at com.diffblue.cover.service.a.a.b.(SourceFile:26)
at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at at java.lang.reflect.Method.invoke(Method.java:498)
at at com.diffblue.cover.launcher.Launcher.invokeMainMethod(Launcher.java:116)
at at com.diffblue.cover.launcher.Launcher.main(Launcher.java:72)
Caused by: ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type com.diffblue.cover.logging.appender.CoverRollingFileAppender
at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(SourceFile:69)
at at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(SourceFile:45)
at at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(SourceFile:34)
at at ch.qos.logback.core.joran.action.AppenderAction.begin(SourceFile:52)
at … 25 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.diffblue.cover.logging.appender.CoverRollingFileAppender
at at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at at com.diffblue.cover.launcher.FilteringClassLoader.findClass(FilteringClassLoader.java:53)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at at com.diffblue.cover.launcher.FilteringClassLoader.loadClassBasedOnPolicy(FilteringClassLoader.java:75)
at at com.diffblue.cover.launcher.FilteringClassLoader.loadClass(FilteringClassLoader.java:61)
at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(SourceFile:56)
at … 28 common frames omitted
13:06:47,906 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.diffblue] to DEBUG
13:06:47,906 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting additivity of logger [com.diffblue] to false
13:06:47,906 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [server-logger] to Logger[com.diffblue]
13:06:47,907 |-ERROR in ch.qos.logback.core.joran.action.AppenderRefAction - Could not find an appender named [support-log-appender]. Did you define it below instead of above in the configuration file?
13:06:47,907 |-ERROR in ch.qos.logback.core.joran.action.AppenderRefAction - See Logback Error Codes for more details.
13:06:47,907 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to OFF
13:06:47,907 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
13:06:47,907 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@1b701da1 - Registering current configuration as safe fallback point

12:11:49.880 [INFO] [Creating] Failed service start-up with critical error: ServiceConnectionUnresponsiveException: Failed to communicate with analyzer: No response after PT5M
12:11:49.885 [INFO] [Reporting]
12:11:49.885 [INFO] [Reporting] Summary:
12:11:49.885 [INFO] [Reporting] --------
12:11:49.885 [INFO] [Reporting] Total: 5 methods
12:11:49.885 [INFO] [Reporting]
12:11:49.885 [INFO] [Reporting] No tests created for: 5 methods
12:11:50.141 [WARN] [Messaging] Failed to start up analysis service - Diffblue Cover uses an analysis service that performs the actual test case production.
Successfully starting up this service requires Cover to be able to start a process, to
set up a TCP server on localhost and to connect to the server set up by the analysis service;
the analysis service also needs to be able to set up a TCP server on localhost and to connect
the server started by Cover.

Diffblue Cover failed to start up the analysis service despite trying 3
times. The reasons for failure are summarized below:

Service startup timeout (3 times)

Diffblue Cover did not receive the "alive message" from the analyzer service after
waiting 5 minutes. If your machine is heavily loaded or very
slow, try reducing load before running Cover.

Please try the troubleshooting suggestions given above, if any.
See also https://diff.blue/E020. If the problem persists, contact
Diffblue Support and send the user log file that can be found in
C:\Users\MATHEU~1.SAN\AppData\Local\Temp\diffblue\log\user.log.
com.diffblue.cover.exception.environment.AnalysisServiceStartupException: Unable to start up analysis service
< … hidden frames … >
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)

Hi mathpontes
Have you looked at the suggestions on the following Diffblue Documentation page?

As you were successfully writing tests earlier it sounds like something has temporarily prevented the Diffblue Cover IntelliJ plugin from working.
Please try restarted IntelliJ. If the issues persists, I’d suggest reinstalling the plugin.
Please let us know if you are still unable to write tests.
Thanks
Peter Sear @ Diffblue

Thanks for your reply. I’ve followed the suggestions on the Documentation page but everything seems to be in order, my JDK is 64 bits, I can run both java and javac commands, set up TCP services and such. But still the plugin doesn’t work, even after reinstalling.
I was able to write tests with Cover CLI though, so it seems to be a problem with the plugin.

@petersear - Facing similar issue E020.
com.diffblue.cover.exception.environment.AnalysisServiceStartupException: Unable to start up analysis service
< … hidden frames … >
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)

Verified that we are using 64-bit JDK. Unable to verify whether I have permission in my office laptop for TCP server creation.

14:55:25.594 [INFO] [Creating] Starting new remote monitor client
14:55:28.024 [INFO] [Creating] Attempting to start remote server.
14:55:28.910 [INFO] [Creating] Server started, listening on localhost/127.0.0.1:62874
14:55:29.724 [INFO] [Creating] Expect analyzer service to be listening on port 62874.
15:00:30.217 [INFO] [Creating] Service process output:

15:00:30.273 [INFO] [Creating] Failed service start-up with critical error: ServiceConnectionUnresponsiveException: Failed to communicate with analyzer: No response after PT5M

I also have this problem
here is log:
Failed to start up analysis service: Diffblue Cover uses an analysis service that performs the actual test case production. Successfully starting up this service requires Cover to be able to start a process, to set up a TCP server on localhost and to connect to the server set up by the analysis service; the analysis service also needs to be able to set up a TCP server on localhost and to connect the server started by Cover.
Diffblue Cover failed to start up the analysis service despite trying 3 times. The reasons for failure are summarized below:
Service startup timeout (3 times)
Diffblue Cover did not receive the “alive message” from the analyzer service after waiting 5 minutes. If your machine is heavily loaded or very slow, try reducing load before running Cover.
Please try the troubleshooting suggestions given above, if any. See also Working with code E020 | Diffblue Docs. If the problem persists, contact Diffblue Support and send the user log file that can be found in /var/folders/rg/h_j8c4_d1rj588sdb9tgchsr0000gp/T/diffblue/log/user.log.

I’m also facing the same issue
plugin version: 223.8214.65

exception in user.log file is
java.lang.ClassNotFoundException: com.diffblue.cover.logging.appender.CoverRollingFileAppender

@Costas_Matrozos that exception sounds like your installation is broken - can you try reinstalling Cover? Note that this is an internal class that should be packaged inside the installation jar.

Hi @mathpontes
Thanks for your reply and apologies for the delay in getting back to you.
We are investigating. Would you be able to upload the whole support log file?
Please see documentation link below on locating the Diffblue support log file:

Thanks
Peter Sear @ Diffblue

Hi @kprabhu_m
Thanks for trying Diffblue Cover and joining the discussion.
Would you be able to upload the support log file?
And could you confirm the OS you are running on?
Please see documentation link below on locating the Diffblue support log file:

Thanks
Peter Sear @ Diffblue

Hi @kevin
Thanks for trying Diffblue Cover and joining the discussion.
Would you be able to upload your support log file?
And could you confirm the OS you are running on?
Please see documentation link below on locating the Diffblue support log file:

Thanks
Peter Sear @ Diffblue

user-20230215T122854.log (72.0 KB)
This is the complete log I encountered when trying to generate Test, can you help me troubleshoot the problem and give me some suggestions

Hi @xia540847092
Thanks for getting in touch.
I’m sorry that you have been unable to write unit tests using Diffblue Cover on this occasion.
The behaviour you have reported is known and is under investigation by our engineering team here at Diffblue. The next version of Diffblue Cover (2023.02.01), which is due to be released any time now, addresses the following exception reported in the log file you’ve attached:
Caused by: java.lang.ClassNotFoundException: com.diffblue.cover.logging.appender.CoverRollingFileAppender
Please try the new version when it is available.
If you have a reproducible test case you are able to share, please do.
Thanks
Peter Sear @ Diffblue

Hi,
Facing issue with version diffblue-cover-ij-2023.02.01-2022.3
22:18:06.703 [INFO] [Creating] Failed service start-up with critical error: ServiceConnectionUnresponsiveException: Failed to communicate with analyzer: No response after PT5M. Attached the logs. Can you please help
user-20230218T220243.log (13.4 KB)

Thanks,
Rahul

Hi @Rahul_raja
Thank for reporting this and uploading the related log file.
I’m sorry you have not been able to create tests using Diffblue Cover on this occasion.
I notice that the project you were using is called MavenTest. Would you be able to share this project with Diffblue? If it is a test project and you are happy to share it, I will arrange to do that offline if you prefer. A reproducible test case would help us in getting a resolution for this issue as quickly as possible.
Thanks
Peter Sear @ Diffblue

Hi @Rahul_raja @mathpontes @Costas_Matrozos @kprabhu_m @xia540847092 @kevin
We have reproduced this behaviour at Diffblue and narrowed it down to JDK version. According to our findings, all those reporting this have been using JDK 8, and upgrading to at least 1.8_261 should provide relief. Thank you for your patience while this was investigated.