E016 - Failed to connect to analysis service: 1

@petersear awaiting you response

Hi @Namrata_Devhare

Thanks for the update and the latest support log file. I still see the JUnit dependency mismatch warning but I don’t think that is the cause of the warning you are seeing. I also see Service heap size: 1820 MB. Earlier, I referenced the documentation for how to change this. Please find below a short summary to help clarify the steps I’m suggesting.

Requirements for system running Diffblue Cover (to avoid resource issues such as R024: Analysis service shutdown unexpectedly):

  • 16 GB RAM
  • 5 GB minimum available disk space
  • 4 CPU cores
  • 8 GB Java heap allocated

How to increase Java Heap space in IntelliJ:

  • (In IntelliJ menus) Go to Help → Change Memory Settings
  • Amend the Maximum Heap Size to at least 4096 (Note: this requires sufficient RAM to be available)

Best regards
Peter

@petersear T023 - Testability unknown: 1
Indicates that the testability could not be determined for the method. Diffblue Cover considers these methods as not testable. why this error ?

@petersear
support.log (252.9 KB)
user-20231203T074740.log (17.3 KB)
uploading files here for your reference

@petersear can we set up a meeting for 10 mins to resolve issues?

@petersear hii please check these resent logs as well
support.log (1.5 MB)
user-20231203T113428.log (55.3 KB)

Hi Namrata
The output code that you are seeing (T023) is one of many that can be returned by Diffblue Cover to help the user understand what can be done to get more unit tests. These are not error codes but are designed to provide useful feedback on the process of writing a test for a given method. In this case, Diffblue Cover is reporting that the code in question was found to be untestable but it is not able to give a specific reason. If you think a human developer would be able to write a unit test for the method in question, please start a new forum thread for this question as this is not directly related to the original topic on this thread.
Thanks and best regards
Peter

1 Like

Hi I am getting the same issue when I try to run the Diffblue plugin on IntelliJ 2024.1
E016 - Failed to connect to analysis service: 1
Cause: Failed to connect to analyzer service Make sure that local firewall settings allow connecting to a service at HOST:PORT.
Here are my support logs files, kindly suggest.
support-20240418T151433.log (72.4 KB)
user-20240418T151433.log (30.8 KB)

I just increased the heap size in IntelliJ to 4096 but still facing the same issue. Please find attached new log files
user-20240418T180407.log (30.8 KB)
support-20240418T180407.log (72.4 KB)

Hi @ShivangiP20
Thanks for using Diffblue Cover and for getting in touch.
The support log file you shared shows attempts to start Diffblue’s remote service, and the server is listening on localhost/127.0.0.1 at ports (50468, 50603, 50728), but "Failed to communicate with analyzer: No response after PT5M" This means that the plugin front end isn’t able to reach the backend service. Please check that the local firewall permits access to HOST:PORT.
Best regards
Peter Sear @ Diffblue

hi @petersear
Thank you for looking into the issue and responding. I am trying to run this Diffblue plugin on IntelliJ and I have attached a snapshot of my proxy settings. I have changed the settings to no proxy on IntelliJ and I also disconnected the VPN on my system. Could you please take a look at the proxy settings and suggest what changes needs to be made?


Also attached the support logs
user-20240422T154844.log (30.8 KB)
support-20240422T154844.log (72.4 KB)

Kindly help.

Hi @ShivangiP20
Thanks for sharing your IntelliJ proxy settings and for providing updated log files. The log file shows the same behaviour as before. Diffblue Cover comprises both a client side and server side (the “analysis service”, which actually writes the unit tests). E016 (Failed to connect to analysis service) says that the client side was unable to connect to the server side via localhost/127.0.0.1 (on ports 53371, 53394, 53526, 53548, 53672, 53694 according to the latest log files). The usual cause of this is firewall configuration that prevents such a connection. Please check that your local firewall allows this connection.
Best regards
Peter Sear @ Diffblue

hi @petersear
I understand what you are saying but what I am not able to understand is that if I have my settings as no proxy, how can the firewall prevent the connection. Is it possible to schedule some 5-10 mins to look into this and close it as I am not able to gather much information from any other source.

Hi,

What OS are you using?

And does your system have an IPv6 or IPv4 address (or both)?

Hi @ShivangiP20
In addition to the support log files you shared, there should also be a log file for the analysis service, which Diffblue Cover has not been able to connect to. Could you share the contents of that log file, which can be found at %USERPROFILE%\AppData\Local\Temp\diffblue\log\cover-server.log (I believe you are using Windows? If not, then location would be /tmp/diffblue/log).
Best regards
Peter Sear @ Diffblue

Hi @petersear

I’m sorry I didn’t see this earlier. I’m sharing the log file along with user and support logs. Kindly take a look and let me know.
user-20240506T144230.log (30.7 KB)
cover-server.log (1.9 KB)
support-20240506T144230.log (73.2 KB)

Hi @mlodge
I’m using a Windows OS and it has both ipv4 and ipv6.

Hi @ShivangiP20
From our investigation, we believe there is some conflict preventing the client/server connection on the system. This could potentially be diagnosed using network tools such as Wireshark. We have produced a simple Java tool to test if the analysis server could be started - if not, it may tell us why not. If you are able to use it, please download by clicking on diagnostic tool and run as follows:
java -jar diagnostic-2024.05.01-SNAPSHOT-jar-with-dependencies.jar
Please send us the output produced and we will look into this further.
Best regards
Peter Sear @ Diffblue

I installed diffblue and when I tried to write a test, I get E016 - Failed to connect to analysis service: 1 error while trying to write a test.

I did increase the heap size to 8 GB. And put the IntelliJ proxy setting on both “No Proxy” and “Autodetect”, but still I get errors.

In the LogFile I have E047 and E016 errors. I am using Java 1.8.0-211

[WARN] [Reporting] E047: Unsupported Java version Diffblue provides only community support for Java version 1.8.0_211. Diffblue supports LTS versions Java 8 351+, Java 11.0.17+,
Java 17.0.5+, or Java 21.0.1+ for production use.

Can you help me resolve the issue please?

Hi @rrahmani

It’s great that you are trying Diffblue Cover. I’m sorry to hear you have been unable to use it to write tests so far.
The E016 code tells us that there an issue preventing the client side of Diffblue Cover from connecting to the server side (the analysis server which writes the unit tests). If you see my previous post in this thread, you will see that we have created a diagnostic tool to help identify such issues. If you are happy to, please download and run that tool and send the resulting output to this thread.
I would also suggest updating your Java 8 build if you can, as 1.8.0_211 is now over 5 years old.

Best regards
Peter Sear @ Diffblue

Hello Peter @petersear , How can I send you the output?

Hello @rrahmani
You can either add it as a text file attachment on a reply here, or email the output to support@diffblue.com if you prefer.
Best regards
Peter Sear @ Diffblue