Failed to start gauge API: Timed out connecting to [::]:52951" issue

1,226 views
Skip to first unread message

Jakub Pustelnik

unread,
Nov 6, 2015, 1:05:53 PM11/6/15
to getgauge
Hello,

I'm trying to migrate from serenity to Gauge but I have some stability problems when I run Gauge scenario from Maven pluggin.(I'm using Gauge 0.2.1 with maven plugin 1.0.6 and java plugin 0.3.3)

It takes a long time for maven to execute  "gauge-maven-plugin:1.0.6:execute (default)" and then I get this "[CRITICAL] Failed to start gauge API: Timed out connecting to [::]:52951" issue.

If I increase runner_connection_timeout to 60.000 in gauge.properties it starts but after a lot of time. I've SSD drive and Intel Core i5 with 3,2GHz and 8Gb ram. Even after I wait for this long amount of time there is chance my computer freezes after starting few Gauge specs.

Any idea how can I go through this issue and start using Gauge?

The other thing is that Gauge somehow scan throw reflection whole maven repository folder. Examples below:

pcomponents/httpmime/4.5.1/httpmime-4.5.1.jar with scanner MethodAnnotationsScanner
19:04:40.752 [INFO] 19:04:40.752 [main] DEBUG org.reflections.Reflections - could not scan file META-INF/DEPENDENCIES in url fil
pcomponents/httpmime/4.5.1/httpmime-4.5.1.jar with scanner SubTypesScanner
19:04:40.752 [INFO] 19:04:40.752 [main] DEBUG org.reflections.Reflections - could not scan file META-INF/NOTICE in url file:/C:/
nents/httpmime/4.5.1/httpmime-4.5.1.jar with scanner MethodAnnotationsScanner


Best Regards,
Jakub

Kashish Munjal

unread,
Nov 9, 2015, 9:38:07 AM11/9/15
to getg...@googlegroups.com
Hello Jakub,

Welcome to Gauge!

Gauge scans through all the dependencies and source files present in classpath to get the steps and the implementations.

Time taken by Gauge to execute specs depends on the number of source files and dependencies present in the project.

To reproduce the issue, please give us the following information
  • How many source files(java) and maven dependencies are there in your Gauge project?
  • Are you using any IDE to run specs?

The other thing is that Gauge somehow scan throw reflection whole maven repository folder. Examples below:


Gauge only scan those dependencies which are present in classpath.

--
Thanks,
Kashish Munjal

Jakub Pustelnik

unread,
Nov 10, 2015, 2:21:28 AM11/10/15
to getgauge
Hello Kashish,

Thanks for fast reply. I've ~840 Megabytes in my .m2/repositories folder. They are from my original project, which I would like to migrate to Gauge.
In my new project I've only few dependencies (34 Megabytes) but both projects use same repository folder in .m2/repositories. Is there any way to
exclude something from classpath? If it helps I can post my dependencies.

I'm using maven and Intellij to run specs. I use Intellij Gauge plugin version 0.14.

Thanks,
Jakub

Jakub Pustelnik

unread,
Nov 11, 2015, 3:04:00 PM11/11/15
to getgauge
Update:

I've deleted repositories folder and downloaded new dependencies for new project only (34mb). It didn't help. Gauge still need about 50 seconds to start running specs.
Next thing is that after running specs few times Window and apps are freezing. Any idea what could be the cause? (same for IDE and maven plugin runner)

Best regards,
Jakub

Apoorva M

unread,
Nov 12, 2015, 10:45:14 AM11/12/15
to getg...@googlegroups.com
Hello, 

Here is a brief on why you are facing delay in spec execution: 

1. Currently, Gauge scans all the dependencies. Depending on the size of these dependencies, execution could be slow(as you have seen). 

2. Why does Gauge scan all the dependencies in compile time?
  • Gauge searches for any step implementations i.e. methods with @Step or any other execution hooks annotated to a method in all the dependencies. 
  • These steps could be used in specs. 
3. What are our approaches now?
        We are investigating on if Gauge should scan only the source files in project and not all the dependencies. We think that its an anti-pattern to use any of the step implementations in dependencies.

4. What are the workarounds?
  • Abstraction
        If there is a step that contains its implementation in one of the dependencies, it should be invoked by step implementation present. 

        @Step("Say <hello> to <gauge>")
         public void greeting(String what, String who) {
              // call the methods inside dependency
         }
Let us know what are your opinions on this? Your feedback could be of great help. 

Thank you

Gauge Team

Jakub Pustelnik

unread,
Nov 15, 2015, 3:11:55 AM11/15/15
to getgauge
Hello,

I've tried everything to improve Gauge specification running on my system. What's weird on my system (win 8.1) it takes Gauge about 50-60 seconds to run and after that my OS starts slowing down, like something was blocking it. 
On my colleague system (win 7) with same project, Gauge is running specifications in 2-5 seconds. We both have Java 8 installed on system. How is Gauge connecting to API? Is :52951 a port number?

Regarding scanning all dependencies for step implementations, I think that it would be nice to have option to specify excludes (where I don't want it to scan) or scan for steps only in project files. 

Thanks
Jakub

Apoorva M

unread,
Nov 16, 2015, 3:14:24 AM11/16/15
to getg...@googlegroups.com
Hi Jakub, 

Gauge connects to its language runners(like Gauge Java runner) through TCP connection. Gauge chooses an available port for this, if user doesn't specify which port should be used. You can set an environment variable `GAUGE_PORT` to a value of port number to be used. 

If this issue is happening only in your machine, can you try these steps:

* Kill all the stale gauge or gauge-java processes, if present.
* Invalidate Cache and Restart IntelliJ. Make sure there are no other execution tabs.  
Let us know if you facing this execution delay even in a new Gauge project.

-- Apoorva
 

Apoorva MApplication Developer
ThoughtWorks

--
You received this message because you are subscribed to the Google Groups "getgauge" group.
To unsubscribe from this group and stop receiving emails from it, send an email to getgauge+u...@googlegroups.com.
To post to this group, send email to getg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/getgauge/d85edd3e-4268-4d3b-87e9-7c81239ea881%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Jakub Pustelnik

unread,
Nov 17, 2015, 9:20:35 AM11/17/15
to getgauge
Hello,

This issue is on all my team members machines. Only at one machines with Windows 7 it's working fine. I've created project using maven archetype following documentation instructions but I noticed that in Intellij Maven Tab keeps disappearing (so Intellij don't see my project as Maven project even if pom is there, I can still add pom file,
but second later it's gone). 

At the moment I've like three dependecies in pom. One of them is RestAssurred API.

There is no problem if I run new Gauge project. Is there a way run execute Gauge from server? For example I develop test on my laptop and run remotely from Intellij on Gauge runner installed on server? 

Thanks Jakub

Srikanth V

unread,
Nov 18, 2015, 6:09:21 AM11/18/15
to getgauge
Hi Jakub,

Thanks for the detailed analysis. We will investigate this on Windows 8.1 machine. I assume you are using a 64-bit flavour?

Regaring the Intellij-Maven tab disappearance, could you please log an issue here - https://github.com/getgauge/Intellij-plugin/issues. This is where we track things to work upon.

To your final question:
 Is there a way run execute Gauge from server? For example I develop test on my laptop and run remotely from Intellij on Gauge runner installed on server? 

Not currently, but we have been thinking about it. 

Thanks again for your emails, please feel free to log issues and feature requests on github as well.

best regards
Srikanth

Jakub Pustelnik

unread,
Nov 20, 2015, 5:07:39 PM11/20/15
to getgauge
Hello Srikanth,

Thanks for your answer. Yes I'm using 64 bit system. I managed to find out what is the cause of my problem with long running Gauge, timeouts and basically OS freezes. We use Trend Micro Office Scan
Antivirus which is somehow blocking Gauge. It has no events in logs and we can't turn it off (antivirus). I've no idea why Antivirus is blocking Gauge app. When I killed all antivirus processes test specs started
to run faster then before. But still it's not a solution for me If I have to turn off my antivirus :( 

Interesting thing is that even if antivirus is somehow related with long specs running they still run after ~60 seconds. Maybe it treats it as suspicious code.

Best Regards
Jakub 

Srikanth V

unread,
Nov 23, 2015, 11:22:42 AM11/23/15
to getg...@googlegroups.com
Dear Jakub,

Thanks again for the analysis, this clears some mystery. We had a few users report that their Antivirus flagged Gauge_Screenshot executable as malicious, and we had an issue logged, to sign the executables and packages. We hoped that this should increase the trust for Gauge executables.

Gauge_Screenshot does make some win32 system calls, which could be flagged as suspicious in some Antivirus definitions, but Gauge.exe shouldn't be seen as such. I have tried to test this with some antiviruses (Symantec and McAfee), but these two don't seem to mind, perhaps the virus definitions are different in our machines.

I will try to setup Trend Micro trial version and see if it flags Gauge on my machine. In any case, we are trying to find out if we can add Gauge to the whitelist in various antivirus.

best regards
Srikanth


Reply all
Reply to author
Forward
0 new messages