dash-licenses icon indicating copy to clipboard operation
dash-licenses copied to clipboard

[Guice/ErrorInjectingMethod]: RuntimeException: ConnectException at ClearlyDefinedSupport.bootstrap

Open dhendriks opened this issue 3 years ago • 2 comments

For Eclipse ESCET we have a nightly dependency license check Jenkins build. It has become quite unstable. It has failed on 15-2, 17-2, 19-2 and today, 23-2, so every few days. Rerunning it makes it succeed again.

The Jenkins log shows:

00:59:52  [ERROR] Failed to execute goal org.eclipse.dash:license-tool-plugin:0.0.1-SNAPSHOT:license-check (default-cli) on project org.eclipse.escet.root: Execution default-cli of goal org.eclipse.dash:license-tool-plugin:0.0.1-SNAPSHOT:license-check failed: Unable to create injector, see the following errors:
00:59:52  [ERROR] 
00:59:52  [ERROR] 1) [Guice/ErrorInjectingMethod]: RuntimeException: ConnectException
00:59:52  [ERROR]   at ClearlyDefinedSupport.bootstrap(ClearlyDefinedSupport.java:179)
00:59:52  [ERROR]   at LicenseToolModule.configure(LicenseToolModule.java:43)
00:59:52  [ERROR]   at LicenseChecker.clearlyDefinedService(LicenseChecker.java:24)
00:59:52  [ERROR]       \_ for field clearlyDefinedService
00:59:52  [ERROR]   at LicenseToolModule.configure(LicenseToolModule.java:41)
00:59:52  [ERROR] 
00:59:52  [ERROR] Learn more:
00:59:52  [ERROR]   https://github.com/google/guice/wiki/ERROR_INJECTING_METHOD
00:59:52  [ERROR] 
00:59:52  [ERROR] 1 error
00:59:52  [ERROR] 
00:59:52  [ERROR] ======================
00:59:52  [ERROR] Full classname legend:
00:59:52  [ERROR] ======================
00:59:52  [ERROR] ClearlyDefinedSupport: "org.eclipse.dash.licenses.clearlydefined.ClearlyDefinedSupport"
00:59:52  [ERROR] ConnectException:      "java.net.ConnectException"
00:59:52  [ERROR] LicenseChecker:        "org.eclipse.dash.licenses.LicenseChecker"
00:59:52  [ERROR] LicenseToolModule:     "org.eclipse.dash.licenses.context.LicenseToolModule"
00:59:52  [ERROR] ========================
00:59:52  [ERROR] End of classname legend:
00:59:52  [ERROR] ========================: UnresolvedAddressException
00:59:52  [ERROR] -> [Help 1]
00:59:52  [ERROR] 
00:59:52  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
00:59:52  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
00:59:52  [ERROR] 
00:59:52  [ERROR] For more information about the errors and possible solutions, please read the following articles:
00:59:52  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
00:59:52  [ERROR] 
00:59:52  [ERROR] After correcting the problems, you can resume the build with the command
00:59:52  [ERROR]   mvn <args> -rf :org.eclipse.escet.root

It seems this is a connection issue to Clearly Defined, where the address can't be resolved. Why is causing that? Is the DNS server down? Are we hitting usage/rate limits for raw.githubusercontent.com? Is there anything that could be done here to make this more stable?

dhendriks avatar Feb 23 '22 08:02 dhendriks

Are we hitting usage/rate limits for raw.githubusercontent.com? Is there anything that could be done here to make this more stable?

This seems like the most probable cause. We don't authenticate, so we're probably running into the 50 hits/hour limit. I didn't anticipate that. I'll drop in a work around while I sort out a better solution.

waynebeaton avatar Feb 23 '22 20:02 waynebeaton

I've pushed a potential fix.

ClearlyDefinedSupport.bootstrap(ClearlyDefinedSupport.java:179)

Based on this file/line, I'm confident that you've diagnosed the error correctly.

The list of valid types and sources doesn't change very often, so I've hard-coded it while I think of a better solution. I believe that the right approach is to ask the ClearlyDefined folks to add an endpoint that provides this information.

waynebeaton avatar Feb 23 '22 22:02 waynebeaton